ATAVRSB202 Atmel, ATAVRSB202 Datasheet - Page 196

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.7
8042B–AVR–06/10
Addressing the Flash During Self-Programming
The Z-pointer is used to address the SPM commands.
Since the Flash is organized in pages (see
be treated as having two different sections. One section, consisting of the least significant bits, is
addressing the words within a page, while the most significant bits are addressing the pages.
This is shown in
addressed independently. Therefore it is of major importance that the Boot Loader software
addresses the same page in both the Page Erase and Page Write operation. Once a program-
ming operation is initiated, the address is latched and the Z-pointer can be used for other
operations.
The only SPM operation that does not use the Z-pointer is Setting the Boot Loader Lock bits.
The content of the Z-pointer is ignored and will have no effect on the operation. The LPM
instruction does also use the Z-pointer to store the address. Since this instruction addresses the
Flash byte-by-byte, also the LSB (bit Z0) of the Z-pointer is used.
Figure 29-3. Addressing the Flash During SPM
Note:
Bit
ZH (R31)
ZL (R30)
Z - REGISTER
1. The different variables used in
PROGRAM MEMORY
10 on page
BIT
PAGE
PROGRAM
COUNTER
15
Z15
15
Z7
7
Figure
PAGE ADDRESS
WITHIN THE FLASH
205.
ZPCMSB
PCMSB
Z14
14
Z6
29-3. Note that the Page Erase and Page Write operations are
6
PCPAGE
Z13
13
Z5
5
Figure 29-3
ZPAGEMSB
PAGEMSB
”Fuse Bits” on page
PCWORD
Z12
12
Z4
4
WORD ADDRESS
WITHIN A PAGE
(1)
are listed in
1
ATmega16HVB/32HVB
Z11
0
0
11
Z3
3
INSTRUCTION WORD
PAGE
Table 29-7 on page 204
Z10
10
Z2
2
209), the Program Counter can
Z9
Z1
9
1
PCWORD[PAGEMSB:0]:
00
01
02
PAGEEND
Z8
Z0
8
0
and
Table 29-
196

Related parts for ATAVRSB202