
18
8210C–AVR–09/11
Atmel AVR XMEGA D
All AVR CPU instructions are 16 or 32 bit wide, and each flash location is 16 bits wide. The flash
memory is organized in two main sections, the application section and the boot loader section,
as shown in
. The sizes of the different sections are fixed, but device-
dependent. These two sections have separate lock bits, and can have different levels of protec-
tion. The store program memory (SPM) instruction,used to write to the flash from the application
software, will only operate when executed from the boot loader section.
The application section contains an application table section with separate lock settings. This
enables safe storage of nonvolatile data in the program memory.
Figure 4-1.
Flash memory sections.
4.3.1
Application Section
The Application section is the section of the flash that is used for storing the executable applica-
tion code. The protection level for the application section can be selected by the boot lock bits
for this section. The application section can not store any boot loader code since the SPM
instruction cannot be executed from the application section.
4.3.2
Application Table Section
The application table section is a part of the application section of the flash memory that can be
used for storing data. The size is identical to the boot loader section. The protection level for the
application table section can be selected by the boot lock bits for this section. The possibilities
for different protection levels on the application section and the application table section enable
safe parameter storage in the program memory. If this section is not used for data, application
code can reside here.
4.3.3
Boot Loader Section
While the application section is used for storing the application code, the boot loader software
must be located in the boot loader section because the SPM instruction can initiate program-
Application Flash
Section
0x000000
End Application
Start Boot Loader
Flashend
Application Table
Flash Section
Boot Loader Flash
Section