English
Language : 

ATMEGA88PA_14 Datasheet, PDF (241/326 Pages) ATMEL Corporation – ATMEL 8-BIT MICROCONTROLLER
Table 27-4. Boot Reset Fuse(1)
BOOTRST
Reset Address
1
Reset vector = Application reset (address 0x0000)
0
Reset vector = Boot loader reset (see Table 27-7 on page 247)
Note: 1. “1” means unprogrammed, “0” means programmed
27.7
Addressing the Flash during Self-programming
The Z-pointer is used to address the SPM commands.
Bit
15
14
13
12
11
10
9
8
ZH (R31)
Z15
Z14
Z13
Z12
Z11
Z10
Z9
Z8
ZL (R30)
Z7
Z6
Z5
Z4
Z3
Z2
Z1
Z0
7
6
5
4
3
2
1
0
Since the flash is organized in pages (see Table 28-9 on page 255), the program counter can 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 is1 shown in Figure 27-3. Note that the page erase and page write operations
are 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 programming 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 27-3. Addressing the Flash During SPM(1)
BIT 15
Z-REGISTER
ZPCMSB
PROGRAM
COUNTER
PCMSB
PCPAGE
PAGE ADDRESS
WITHIN THE FLASH
ZPAGEMSB 1 0
0
PAGEMSB
PCWORD
WORD ADDRESS
WITHIN PAGE
Program Memory
Page
Page
Instruction Word
PCWORD [PAGEMSB:0]
00
01
02
PAGEEND
Note: 1. The different variables used in Figure 27-3 are listed in Table 27-9 on page 247.
ATmega48PA/88PA/168PA [DATASHEET] 241
9223F–AVR–04/14