ATAVRSB202 Atmel, ATAVRSB202 Datasheet - Page 199

no-image

ATAVRSB202

Manufacturer Part Number
ATAVRSB202
Description
KIT BATT MGMT FOR ATMEGA32HVB
Manufacturer
Atmel
Datasheets

Specifications of ATAVRSB202

Main Purpose
*
Embedded
*
Utilized Ic / Part
*
Primary Attributes
*
Secondary Attributes
*
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
29.8.8
29.8.9
8042B–AVR–06/10
Reading the Fuse and Lock Bits from Software
Reading the Signature Row from Software
It is possible to read both the Fuse and Lock bits from software. To read the Lock bits, load the
Z-pointer with 0x0001 and set the LBSET and SPMEN bits in SPMCSR. When an LPM instruc-
tion is executed within three CPU cycles after the LBSET and SPMEN bits are set in SPMCSR,
the value of the Lock bits will be loaded in the destination register. The LBSET and SPMEN bits
will auto-clear upon completion of reading the Lock bits. When LBSET and SPMEN are cleared,
LPM will work as described in the ”AVR Instruction Set” description.
The algorithm for reading the Fuse Low byte is similar to the one described above for reading
the Lock bits. To read the Fuse Low byte, load the Z-pointer with 0x0000 and set the LBSET and
SPMEN bits in SPMCSR. When an LPM instruction is executed within three cycles after the
LBSET and SPMEN bits are set in the SPMCSR, the value of the Fuse Low byte (FLB) will be
loaded in the destination register as shown below. Refer to
detailed description and mapping of the Fuse Low byte.
Similarly, when reading the Fuse High byte, load 0x0003 in the Z-pointer. When an LPM instruc-
tion is executed within three cycles after the LBSET and SPMEN bits are set in the SPMCSR,
the value of the Fuse High byte (FHB) will be loaded in the destination register as shown below.
Refer to
Fuse and Lock bits that are programmed, will be read as zero. Fuse and Lock bits that are
unprogrammed, will be read as one.
To read the Signature Row from software, load the Z-pointer with the signature byte address
given in
is executed within three CPU cycles after the SIGRD and SPMEN bits are set in SPMCSR, the
signature byte value will be loaded in the destination register. The SIGRD and SPMEN bits will
auto-clear 6 cycles after writing to SPMCSR, which is locked for further writing during these
cycles. When SIGRD and SPMEN are cleared, LPM will work as described in the Instruction set
Manual.
Table 29-3.
Bit
Rd
Bit
Rd
Bit
Rd
Signature Byte Description
Device ID 0, Manufacture ID
Device ID 1, Flash Size
Device ID 2, Device
FOSCCAL
FOSC SEGMENT
Reserved
SLOW RC Period L
SLOW RC Period H
Table 29-3
Table 30-3 on page 209
(1)
Signature Row Addressing.
FHB7
FLB7
(2)
7
7
7
(3)
and set the SIGRD and SPMEN bits in SPMCSR. When an LPM instruction
FHB6
FLB6
6
6
6
for detailed description and mapping of the Fuse High byte.
BLB12
FLB5
FHB5
5
5
5
BLB11
FLB4
FHB4
4
4
4
BLB02
ATmega16HVB/32HVB
FLB3
FHB3
3
3
3
BLB01
FLB2
FHB2
Z-Pointer Address
2
2
2
Table 30-4 on page 210
00H
02H
04H
01H
03H
05H
06H
07H
FLB1
FHB1
LB2
1
1
1
FLB0
FHB0
LB1
0
0
0
for a
199

Related parts for ATAVRSB202