Write Protection
The NFC provides a hardware mechanism to protect full or part of the memory against
any spurious writing. This is achieved by using the NFWP signal and connecting it to the
WP pins of the memories.
The NFWP signal is automatically asserted in the following conditions:
•
•
•
•
The internal voltage is out of specified value (brown-out detection)
An external reset has been applied to the device
A watchdog reset has been triggered (bad code execution)
A write or erase to the protected area has been triggered (bad code execution)
User Whole Memory Protection The user has the possibility to protect all the flash devices (NF and SMC) by asserting
the external NFWP signal. This is achieved by setting the NFWP bit in NFCON. All the
memories are protected at the same time, i.e. NF and SMC if a SMC is present.
Hardware Protected Area
A user defined area in the memories (a certain amount of blocks) can be locked against
writing or erasing. This is done by giving to the controller the first protected block (FPB)
address, the last protected block address (LPB) and the device number to be locked
(PDEV). All this information is part of the Configuration Descriptor. Table 198 summa-
rizes which device is locked or not.
The protected area is practically used for user firmwares, codec firmwares, fonts and
other configuration data.
Table 198. Protected Device versus PDEV Value
PDEV3 PDEV2 PDEV1 PDEV0 Description
0
x
x
x
0
x
x
1
0
x
1
x
0
1
x
x
No locked devices
The blocks [FPB; LPB] of NF device 0 are locked
The blocks [FPB; LPB] of NF device 1 are locked
The blocks [FPB; LPB] of NF device 2 are locked
The blocks [FPB; LPB] of NF device 3 (SMCEN=0) or of SMC
(SMCEN=1) are locked
1
x
x
x
Then, if a device is protected, the following policy is applied:
•
•
•
If FPB is lower than LPB, the protected area is a contiguous area starting from FPB
to LPB.
If FPB is higher than LPB, there are two protected areas: any block address that is
below LPB and any block address that is above FPB.
If FPB is equal to LPB, all the flash is protected.This is the default behavior.
180
AT85C51SND3Bx
7632A–MP3–03/06