English
Language : 

SAM7S321_14 Datasheet, PDF (110/775 Pages) ATMEL Corporation – ARM-based Flash MCU
Figure 19-5. Command State Chart
Read Status: MC_FSR
No
Check if FRDY flag set
Yes
Write FCMD and PAGENB in MC_FCR
Read Status: MC_FSR
No
Check if FRDY flag set
Yes
Yes
Check if LOCKE flag set
Locking region violation
No
Yes
Check if PROGE flag set
Bad keyword violation and/or Invalid command
No
Command Successful
In order to guarantee valid operations on the Flash memory, the field Flash Microsecond Cycle Number (FMCN) in
the Flash Mode Register MC_FMR must be correctly programmed (see “MC Flash Mode Register” on page 115).
19.2.4.1 Flash Programming
Several commands can be used to program the Flash.
The Flash technology requires that an erase must be done before programming. The entire memory plane can be
erased at the same time, or a page can be automatically erased by clearing the NEBP bit in the MC_FMR register
before writing the command in the MC_FCR register.
By setting the NEBP bit in the MC_FMR register, a page can be programmed in several steps if it has been erased
before (see Figure 19-6).
SAM7S Series [DATASHEET]
6175M–ATARM–26-Oct-12
110