7.3 In-System Reprogrammable Flash Program Memory

The ATmega808/809/1608/1609 contains 8 or 16 KB On-Chip In-System Reprogrammable Flash memory for program storage. Since all AVR instructions are 16 or 32 bits wide, the Flash is organized with a 16-bit data width. For write protection, the Flash program memory space can be divided into three sections: Bootloader section, application code section, and application data section. Code placed in one section may be restricted from writing to addresses in other sections. See the NVMCTRL documentation for more details.

The Program Counter can address the whole program memory. The procedure for writing Flash memory is described in detail in the documentation of the Nonvolatile Memory Controller (NVMCTRL) peripheral.

The Flash memory is mapped into the data space and is accessible with normal LD/ST instructions. For LD/ST instructions, the Flash is mapped from address 0x4000. The Flash memory can be read with the LPM instruction. For the LPM instruction, the Flash start address is 0x0000.

The ATmega808/809/1608/1609 has a CRC module that is a host on the bus.
Table 7-1. Physical Properties of Flash Memory
PropertyATmega808 ATmega809ATmega1608 ATmega1609
Size8 KB16 KB
Page size64B64B
Number of pages128256
Start address in Data Space0x40000x4000
Start address in Code Space0x00000x0000