![](http://datasheet.mmic.net.cn/220000/R80C52TXXX-L16SHXXX-D_datasheet_15505891/R80C52TXXX-L16SHXXX-D_435.png)
435
SAM4CM Series [DATASHEET]
Atmel-11203C-ATARM-SAM4CM32-SAM4CM16-SAM4CM8-Datasheet_06-Oct-14
1.
2.
3.
Send the Start Read User Signature (STUS) command by writing EEFC_FCR with the STUS command.
When the user signature is ready to be read, the bit EEFC_FSR.FRDY falls.
The user signature is located in the first 512 bytes of the Flash memory mapping, thus, at the address
0x1000000-0x10001FF.
To stop the user signature mode, the user needs to send the Stop Read User Signature (SPUS) command
by writing EEFC_FCR with the SPUS command.
When the SPUI command has been performed, the bit EEFC_FSR.FRDY rises. If an interrupt was enabled
by setting the bit EEFC_FMR.FRDY, the interrupt line of the interrupt controller is activated.
4.
5.
Note that during the sequence, the software cannot run out of Flash or the second plane in case of dual plane.
One error can be detected in EEFC_FSR after this sequence:
Command Error: A bad keyword has been written in EEFC_FCR.
To write the user signature, the sequence is:
1.
Write the full page, at any page address, within the internal memory area address space.
2.
Send the Write User Signature (WUS) command by writing EEFC_FCR with the WUS command.
3.
When programming is completed, the bit EEFC_FSR.FRDY rises. If an interrupt has been enabled by
setting the bit i EEFC_FMR.FRDY, the corresponding interrupt line of the interrupt controller is activated.
Two errors can be detected in EEFC_FSR after this sequence:
Command Error: A bad keyword has been written in EEFC_FCR.
Flash Error: At the end of the programming, the WriteVerify test of the Flash memory has failed.
To erase the user signature, the sequence is:
1.
Send the Erase User Signature (EUS) command by writing EEFC_FCR with the EUS command.
2.
When programming is completed, the bit EEFC_FSR.FRDY rises. If an interrupt has been enabled by
setting the bit EEFC_FMR.FRDY, the corresponding interrupt line of the interrupt controller is activated.
Two errors can be detected in EEFC_FSR after this sequence:
Command Error: A bad keyword has been written in EEFC_FCR.
Flash Error: At the end of the programming, the EraseVerify test of the Flash memory has failed.
22.4.3.10ECC Errors and Corrections
The Flash embeds an ECC module able to correct one unique error and able to detect two errors. The errors are
detected while a read access is performed into memory array and stored in EEFC_FSR (see
Section 22.5.3
“EEFC Flash Status Register” on page 440
). The error report is kept until EEFC_FSR is read.
There is one flag for a unique error on lower half part of the Flash word (64 LSB) and one flag for the upper half
part (MSB). The multiple errors are reported in the same way.
Due to the anticipation mechanism to improve bandwidth throughput on instruction fetch, a reported error can be
located in the next sequential Flash word compared to the location of the instruction being executed, which is
located in the previously fetched Flash word.
If a software routine processes the error detection independently from the main software routine, the entire Flash
located software must be rewritten because there is no storage of the error location.
If only a software routine is running to program and check pages by reading EEFC_FSR, the situation differs from
previous case. Performing a check for ECC unique errors just after page programming completion involves a read
of the newly programmed page. This read sequence is viewed as data accesses and is not optimized by the Flash
controller. Thus, in case of unique error, only the current page must be reprogrammed.