Datasheet
103
SAM7X Series [DATASHEET]
6120K–ATARM–11-Feb-14
All the commands are protected by the same keyword, which has to be written in the eight highest bits of the MC_FCR
register.
Writing MC_FCR with data that does not contain the correct key and/or with an invalid command has no effect on the
memory plane; however, the PROGE flag is set in the MC_FSR register. This flag is automatically cleared by a read
access to the MC_FSR register.
When the current command writes or erases a page in a locked region, the command has no effect on the whole memory
plane; however, the LOCKE flag is set in the MC_FSR register. This flag is automatically cleared by a read access to the
MC_FSR register.
Figure 19-5. Command State Chart
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 108).
19.2.4.1 Flash Programming
Several commands can be used to program the Flash.
Check if FRDY flag set
No
Yes
Read Status: MC_FSR
Write FCMD and PAGENB in MC_FCR
Check if LOCKE flag set
Check if FRDY flag set
No
Read Status: MC_FSR
Yes
Yes
Locking region violation
No
Check if PROGE flag set
Yes
No
Bad keyword violation and/or Invalid command
Command Successful