English
Language : 

C8051F970-A-GM Datasheet, PDF (65/454 Pages) Silicon Laboratories – Low Power Capacitive Sensing MCU with up to 32 kB of Flash
C8051F97x
10. Flash Memory
On-chip, re-programmable flash memory is included for program code and non-volatile data storage. The flash
memory is organized in 512-byte pages. It can be erased and written through the C2 interface or from firmware by
overloading the MOVX instruction. Any individual byte in flash memory must only be written once between page
erase operations.
10.1. Security Options
The CIP-51 provides security options to protect the flash memory from inadvertent modification by software 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 in flash user space offers protection of the flash program memory from access (reads,
writes, or erases) by unprotected code or the C2 interface. See Section “8. Memory Organization” on page 54 for
the location of the security byte. 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 complement number represented by the
Security Lock Byte. Note that the page containing 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’). An example is shown in Figure 10.1.
Security Lock Byte:
1s Complement:
Flash pages locked:
11111011b
00000100b
5 (First four flash pages + Lock Byte Page)
Figure 10.1. Security Byte Decoding
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. Table 10.1 summarizes the flash security features of the C8051F97x
devices.
Rev 1.0
65