Atmel SAM4S Xplained Pro Starter Kit Atmel ATSAM4S-XSTK ATSAM4S-XSTK Data Sheet

Product codes
ATSAM4S-XSTK
Page of 1125
 314
SAM4S [DATASHEET]
11100E–ATARM–24-Jul-13
Figure 20-6. Command State Chart
20.4.3.1 Getting Embedded Flash Descriptor
This command allows the system to learn about the Flash organization. The system can take full advantage of this
information. For instance, a device could be replaced by one with more Flash capacity, and so the software is able to
adapt itself to the new configuration. 
To get the embedded Flash descriptor, the application writes the GETD command in the EEFC_FCR register. The first
word of the descriptor can be read by the software application in the EEFC_FRR register as soon as the FRDY flag in the
EEFC_FSR register rises. The next reads of the EEFC_FRR register provide the following word of the descriptor. If extra
Check if FRDY flag Set
No
Yes
Read Status: MC_FSR
Write FCMD and PAGENB in Flash Command Register
Check if FLOCKE flag Set
Check if FRDY flag Set
No
Read Status: MC_FSR
Yes
Yes
Locking region violation
No
Check if FCMDE flag Set
Yes
No
Bad keyword violation
Command Successfull