8.2 Code Protection
Program memory code protection is controlled using the CP bit.
When code protection is enabled, all program memory locations read as
‘0
’. Further programming is disabled for the program memory until a
Bulk Erase operation is performed on the configuration memory region. Program memory 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 disable code protection
and erase all memory locations.