English
Language : 

C8051F960-B-GM Datasheet, PDF (247/492 Pages) Silicon Laboratories – Ultra Low Power 128K, LCD MCU Family
C8051F96x
18.2. Non-volatile Data Storage
The flash memory can be used for non-volatile data storage as well as program code. This allows data
such as calibration coefficients to be calculated and stored at run time. Data is written using the MOVX
write instruction and read using the MOVC instruction. Note: MOVX read instructions always target XRAM.
18.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 soft-
ware can erase flash memory. Additional security features prevent proprietary program code and data con-
stants 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 1024-byte flash pages, starting at page 0 (addresses 0x0000 to
0x03FF), where n is the 1s complement number represented by the Security Lock Byte. The page con-
taining the Flash Security Lock Byte is unlocked when no other flash pages are locked (all bits of
the Lock Byte are 1) and locked when any other flash pages are locked (any bit of the Lock Byte is
0). See example in Figure 18.1
The 128 kB flash devices (C8051F960/1/2/3) do not have a reserved area. The lock byte is at the top of
the flash area (0x1FFFF). Writing 0x80 to the lock byte of the 128 kB devices will lock the entire flash.
Security Lock Byte:
ones Complement:
Flash pages locked:
11111101b
00000010b
3 (First two flash pages + Lock Byte Page)
Locked when
any other FLASH
pages are locked
Reserved Area
Lock Byte
Lock Byte Page
Access limit set
according to the
FLASH security
lock byte
Unlocked FLASH Pages
Locked Flash Pages
Figure 18.1. Flash Security Example
Rev. 1.0
247