English
Language : 

SAM4C_14 Datasheet, PDF (437/1303 Pages) ATMEL Corporation – Atmel | SMART ARM-based Flash MCU
Figure 22-9. Programming Bytes in the Flash
32 bits wide
32 bits wide
4 x 32 bits =
1 Flash word
FF FF FF FF
FF FF FF FF
FF FF FF FF
FF FF FF FF
FF FF FF FF
0xX1C
0xX18 address space
0xX14
for
0xX10 Page N
FF FF FF FF
FF FF FF FF
FF FF FF FF
FF FF FF FF
FF FF FF FF
0xX1C
0xX18
0xX14
0xX10
4 x 32 bits =
1 Flash word
FF FF FF FF
FF FF FF FF
xx xx xx xx
xx xx xx AA
0xX0C
0xX08
0xX04
0xX00
xx xx xx xx
xx xx xx 55
xx xx xx xx
xx xx xx AA
0xX0C
0xX08
0xX04
0xX00
Step 1: Flash array after programming first byte (0xAA)
64-bit used at address 0xX00 (write latch buffer + WP)
Step 2: Flash array after programming second byte (0x55)
64-bit used at address 0xX08 (write latch buffer + WP)
Note: The byte location shown here is for example only, it can be any byte location within a 64-bit word.
22.4.3.3 Erase Commands
Erase commands are allowed only on unlocked regions. Depending on the Flash memory, several commands can
be used to erase the Flash:
 Erase All Memory (EA): All memory is erased. The processor must not fetch code from the Flash memory.
 Erase a Memory Plane (EPL): For dual-plane devices, all pages in the memory plane are erased in parallel.
The processor must not fetch code from the erased Flash memory plane.
 Erase Pages (EPA): 8 or 16 pages are erased in the Flash sector selected. The first page to be erased is
specified in the FARG[15:2] field of the MC_FCR. The first page number must be modulo 8, 16 or 32
depending on the number of pages to erase at the same time.
 Erase Sector (ES): A full memory sector is erased. Sector size depends on the Flash memory. FARG must
be set with a page number that is in the sector to be erased.
If the processor is fetching code from the Flash memory while the EPA or ES command is being performed, the
processor accesses will be stalled until the EPA command is completed. To avoid stalling the processor, the code
can be run out of internal SRAM.
SAM4C Series [DATASHEET]
Atmel-11102E-ATARM-SAM4C32-SAM4C16-SAM4C8-Datasheet_06-Oct-14
437