9.2 In-System Reprogrammable Flash Program Memory
The ATmega324PB contains 32K bytes 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 32K x 16. For software security, the Flash Program memory space is divided into two sections - Boot Loader Section and Application Program Section in the device .
The Flash memory has an endurance of at least 10,000 write/erase cycles. The ATmega324PB Program Counter (PC) is 15 bits wide, thus addressing the 32K program memory locations. The operation of the Boot Program section and associated Boot Lock bits for software protection are described in detail in Boot Loader Support – Read-While-Write Self-Programming. Refer to Memory Programming for the description on Flash data serial downloading using the SPI pins or the JTAG interface.
Constant tables can be allocated within the entire program memory address space, using the Load Program Memory (LPM) instruction.
Timing diagrams for instruction fetch and execution are presented in Instruction Execution Timing.