7.3 In-System Reprogrammable Flash Program Memory

The ATtiny424/426/427 and ATtiny824/826/827 contains 4/8 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 as 4K x 16-bit pages. For write protection, the Flash program memory space can be divided into three sections (Figure 7-2): Boot 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 Nonvolatile Memory Controller (NVMCTRL) section for more details.

The Program Counter (PC) can address the whole program memory. The procedure for writing Flash memory is described in detail in the NVMCTRL section.

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 0x8000. The Flash memory can be read with the LPM instruction. For the LPM instruction, the Flash start address is 0x0000.

The ATtiny424/426/427 and ATtiny824/826/827 has a CRC module that is a host on the bus.
Table 7-1. Physical Properties of Flash Memory
PropertyATtiny42xATtiny82x
Size4 KB8 KB
Page size64B 64B
Number of pages64128
Start address in data space0x80000x8000
Start address in code space0x00x0
Figure 7-2. Flash Areas