3.3 Code Protection
Code protection is controlled using the CP bit. When code
protection is enabled, all program memory and Data EEPROM locations read as
‘0
’. Further programming is disabled for the program memory and
Data EEPROM until a Bulk Erase operation is performed on the configuration memory
region. The program memory and Data EEPROM can still be programmed and read during
program execution.
The User ID locations and Configuration Bytes can be programmed and read out regardless of the code protection settings.
The only way to disable code protection is to use the Bulk Erase Program Memory command
with bit 4 of the payload set to ‘1
’. This will clear the disable code
protection and erase all memory locations.