9.4.1 Code-Protect
Code-protect is a device locking option that prevents external readout and modification of the user program. Code-protect is enabled with a Configuration bit, CP (FCP[0]), in the UCA configuration area. The effects of enabling Code-protect are described in Table 9-3.
| Feature | Code-Protect ON | Code-Protect OFF | Notes |
|---|---|---|---|
| Debugging | Disabled | Enabled | |
| UCA Write Permissions | Disabled | Allowed | UCA can be write-protected via the FCP.WPUCA config bit. |
| Program memory access in ICSP mode | Disabled | Allowed | Execute, read and write permissions are disabled. |
| ECC error reporting in ICSP mode | Restricted | To prevent access to protected spaces using ECC error injection and reporting, ECC error reporting data is restricted to address only for user program in ICSP Programming mode when code-protect is enabled. | |
| NVM Controller CRC access | Depends on FCP.CRC and Flash protection regions | Depends on Flash protection regions | If code-protect is enabled with CRC allowed, the ICSP Programming mode may calculate the CRC over user program Flash pages. |
| Chip Erase |
|
|
|
| ICSP Programming Mode | Allowed | Allowed |
|
