ATmega88PA Automotive Atmel Corporation, ATmega88PA Automotive Datasheet - Page 282

no-image

ATmega88PA Automotive

Manufacturer Part Number
ATmega88PA Automotive
Description
Manufacturer
Atmel Corporation
27.6
27.7
282
Entering the Boot Loader Program
Addressing the Flash During Self-Programming
Atmel ATmega48PA/88PA/168PA [Preliminary]
Entering the Boot Loader takes place by a jump or call from the application program. This may
be initiated by a trigger such as a command received via USART, or SPI interface. Alterna-
tively, the Boot Reset Fuse can be programmed so that the Reset Vector is pointing to the
Boot Flash start address after a reset. In this case, the Boot Loader is started after a reset.
After the application code is loaded, the program can start executing the application code.
Note that the fuses cannot be changed by the MCU itself. This means that once the Boot
Reset Fuse is programmed, the Reset Vector will always point to the Boot Loader Reset and
the fuse can only be changed through the serial or parallel programming interface.
Table 27-4.
The Z-pointer is used to address the SPM commands.
Since the Flash is organized in pages (see
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
are addressed independently. Therefore it is of major importance that the Boot Loader soft-
ware 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.
Note:
Bit
ZH (R31)
ZL (R30)
BOOTRST
1
0
1. “1” means unprogrammed, “0” means programmed
Boot Reset Fuse
Z15
15
Z7
Reset Address
Reset Vector = Application Reset (address 0x0000)
Reset Vector = Boot Loader Reset (see
7
Z14
14
Z6
Figure
6
(1)
27-3. Note that the Page Erase and Page Write operations
Z13
13
Z5
5
Z12
12
Z4
4
Table 28-11 on page
Z11
Z3
11
Table 27-7 on page
3
Z10
Z2
10
2
299), the Program Counter
Z9
Z1
9
1
290)
Z8
Z0
9223B–AVR–09/11
8
0

Related parts for ATmega88PA Automotive