English
Language : 

C8051F388-B Datasheet, PDF (131/285 Pages) Silicon Laboratories – Flash MCU Family
C8051F388/9/A/B
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
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 1s complement number represented by the Security Lock Byte. Note that the page
containing the Flash Security Lock Byte is also locked when any other Flash pages are locked. See exam-
ple below.
Security Lock Byte:
1s Complement:
Flash pages locked:
Addresses locked:
11111101b
00000010b
3 (2 + Flash Lock Byte Page)
First two pages of Flash: 0x0000 to 0x03FF
Flash Lock Byte Page: (0xFA00 to 0xFBFF for 64k devices; 0x7E00 to
0x7FFF for 32k devices)
Figure 18.1. Flash Program Memory Map and Security Byte
The level of FLASH security depends on the FLASH access method. The three FLASH access methods
that can be restricted are reads, writes, and erases from the C2 debug interface, user firmware executing
on unlocked pages, and user firmware executing on locked pages.
Rev. 1.1
131