7.3 In-System Reprogrammable Flash Program Memory
The ATtiny3216/3217 Automotive contains 32 KB on-chip in-system reprogrammable Flash memory for program storage. Since all AVR instructions are 16 or 32-bit wide, the Flash is organized as 4K x 16. For write protection, the Flash program memory space can be divided into three sections (see the illustration below): Bootloader section, Application code section, and Application data section, with restricted access rights among them.
The Program Counter (PC) is 14-bit wide to 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 entire Flash memory is mapped in the memory space and is accessible with
normal LD
/ST
instructions as well as the
LPM
instruction. For LD
/ST
instructions, the Flash is mapped from address 0x8000. For the LPM
instruction, the Flash start address is 0x0000.
The ATtiny3216/3217 Automotive also has a CRC peripheral that is a master on the bus.