361
SAM4CP [DATASHEET]
43051E–ATPL–08/14
It is possible to clear lock bits previously set. Then the locked region can be erased or programmed. The unlock
sequence is:
1.
The Clear lock bit (CLB) command and a page number to be unprotected are written in EEFC_FCR.
2.
When the unlock completes, the bit EEFC_FSR.FRDY rises. If an interrupt has been enabled by setting the bit
EEFC_FMR.FRDY, the interrupt line of the interrupt controller is activated.
Note:
The value of the FARG argument passed together with CLB command must not exceed the higher lock bit index
available in the product.
Two errors can be detected in EEFC_FSR after a programming sequence:
Command Error: a bad keyword has been written in EEFC_FCR.
Flash Error: at the end of the programming, the EraseVerify or WriteVerify test of the Flash memory has failed.
The status of lock bits can be returned by the EEFC. The Get lock bit status sequence is:
1.
The Get lock bit (GLB) command is written in EEFC_FCR. The FARG field is meaningless.
2.
Lock bits can be read by the software application in EEFC_FRR. The first word read corresponds to the 32 first
lock bits, next reads providing the next 32 lock bits as long as it is meaningful. Extra reads to EEFC_FRR return
0.
For example, if the third bit of the first word read in EEFC_FRR is set, then the third lock region is locked.
Two errors can be detected in EEFC_FSR after a programming sequence:
Command Error: a bad keyword has been written in EEFC_FCR.
Flash Error: at the end of the programming, the EraseVerify or WriteVerify test of the Flash memory has failed.
Note:
Access to the Flash in read is permitted when a set, clear or get lock bit command is performed.
22.4.3.5 GPNVM Bit
GPNVM bits do not interfere with the embedded Flash memory plane. Refer to specific product details for information on
GPNVM bit action.
The set GPNVM bit sequence is:
1.
Start the Set GPNVM Bit (SGPB) command by writing EEFC_FCR with the SGPB command and the number of
the GPNVM bits to be set.
2.
When the GPNVM bit is set, 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.
3.
The result of the SGPB command can be checked by running a Get GPNVM Bit (GGPB) command.
Note:
The value of the FARG argument passed together with SGPB command must not exceed the higher GPNVM
index available in the product. Flash Data Content is not altered if FARG exceeds the limit. Command Error is
detected only if FARG is greater than 8.
Two errors can be detected in EEFC_FSR after a programming sequence:
Command Error: a bad keyword has been written in EEFC_FCR.
Flash Error: at the end of the programming, the EraseVerify or WriteVerify test of the Flash memory has failed.
It is possible to clear GPNVM bits previously set. The clear GPNVM bit sequence is:
1.
Start the Clear GPNVM Bit (CGPB) command by writing EEFC_FCR with CGPB and the number of the GPNVM
bits to be cleared.
2.
When the clear completes, the bit EEFC_FSR.FRDY rises. If an interrupt has been enabled by setting the bit
EEFC_FMR.FRDY, the interrupt line of the interrupt controller is activated.
Note:
The value of the FARG argument passed together with CGPB command must not exceed the higher GPNVM
index available in the product. Flash data content is not altered if FARG exceeds the limit. Command Error is
detected only if FARG is greater than 8.
Two errors can be detected in EEFC_FSR after a programming sequence:
Command Error: a bad keyword has been written in EEFC_FCR.
Flash Error: at the end of the programming, the EraseVerify or WriteVerify test of the Flash memory has failed.