beautypg.com

Entering the boot loader program, Atmega163(l) – Rainbow Electronics ATmega163L User Manual

Page 116

background image

ATmega163(L)

116

Figure 80. Memory Sections

Entering the Boot Loader Program

The SPM instruction can access the entire Flash, but can only be executed from the Boot Loader Flash section. If no Boot
Loader capability is needed, the entire Flash is available for application code. Entering the Boot Loader takes place by a
jump or call from the application program. This may be initiated by some trigger such as a command received via UART or
SPI interface, for example. Alternatively, 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.

$0000

$1FFF

Program Memory

BOOTSZ = '11'

Application Flash Section

(8064 x 16)

Boot Flash Section

(128 x 16)

$1F7F

$1F80

$0000

$1FFF

Program Memory

BOOTSZ = '10'

Application Flash Section

(7936 x 16)

Boot Flash Section

(256 x 16)

$1EFF

$1F00

$0000

$1FFF

Program Memory

BOOTSZ = '01'

Application Flash Section

(7680 x 16)

Boot Flash Section

(512 x 16)

$1DFF

$1E00

$0000

$1FFF

Program Memory

BOOTSZ = '00'

Application Flash Section

(7168 x 16)

Boot Flash Section

(1024 x 16)

$1BFF

$1C00

Pages

126

2

Pages

124

4

Pages

120

8

Pages

112

16