English
Language : 

C8051F321-GMR Datasheet, PDF (108/250 Pages) Silicon Laboratories – Full Speed USB, 16 k ISP FLASH MCU Family
C8051F320/1
11.3. Security Options
The CIP-51 provides security options to protect the Flash memory from inadvertent modification by soft-
ware as well as to prevent the viewing of proprietary program code and constants. The Program Store
Write Enable (bit PSWE in register PSCTL) and the Program Store Erase Enable (bit PSEE in register
PSCTL) bits protect the Flash memory from accidental modification by software. PSWE must be explicitly
set to ‘1’ before software can modify the Flash memory; both PSWE and PSEE must be set to ‘1’ before
software can erase Flash memory. Additional security features prevent proprietary program code and data
constants from being read or altered across the C2 interface.
A Security Lock Byte located at the last byte of Flash user space offers protection of the Flash program
memory from access (reads, writes, or erases) by unprotected code or the C2 interface. The Flash security
mechanism allows the user to lock n 512-byte Flash pages, starting at page 0 (addresses 0x0000 to
0x01FF), where n is the 1’s compliment number represented by the Security Lock Byte. See example below.
Security Lock Byte:
1’s Compliment:
Flash pages locked:
Addresses locked:
11111101b
00000010b
2
0x0000 to 0x03FF
Important Notes About the Flash Security:
1. Clearing any bit of the Lock Byte to ‘0’ will lock the Flash page containing the Lock Byte (in
addition to the selected pages).
2. Locked pages cannot be read, written, or erased via the C2 interface.
3. Locked pages cannot be read, written, or erased by user firmware executing from unlocked
memory space.
4. User firmware executing in a locked page may read and write Flash memory in any locked or
unlocked page excluding the reserved area.
5. User firmware executing in a locked page may erase Flash memory in any locked or unlocked
page excluding the reserved area and the page containing the Lock Byte.
6. Locked pages can only be unlocked through the C2 interface with a C2 Device Erase com-
mand.
7. If a user firmware Flash access attempt is denied (per restrictions #3, #4, and #5 above), a
Flash Error system reset will be generated.
Locked when any
other Flash pages are
locked
Access limit set
according to the Flash
security lock byte
C8051F320/1
Reserved
Lock Byte
0x3E00
0x3DFF
0x3DFE
0x3C00
Unlocked Flash Pages
Flash memory organized
in 512-byte pages
0x0000
Figure 11.1. Flash Program Memory Map and Security Byte
108
Rev. 1.4