4 Advanced Code Security Features in 8-bit PIC Family Microcontrollers
The 8-bit PIC microcontrollers, including the PIC18-Q24 family, introduce additional advanced code security features, such as PDID and SAFLOCK. These features are designed to inhibit unauthorized access to the microcontroller memory, thereby safeguarding the proprietary application firmware and the data stored within the memory.
Table 4-1 provides an overview of the advanced code protection settings on 8-bit PIC microcontroller memory sections.
Memory Region | Memory Section | Applicable Advanced Protection | Associated Configuration Bit | ICSP Access(2) | CPU Access | ||
---|---|---|---|---|---|---|---|
Read | Write | Read | Write | ||||
Program Flash Memory | Boot Block | PDID | ICSPDIS | No | No | Yes | Yes |
Application Block | PDID | ICSPDIS | No | No | Yes | Yes | |
SAF Block | PDID SAFLOCK(3) |
ICSPDIS SAFLOCK |
No | No | Yes | No(4) | |
User ID | PDID | ICSPDIS | No | No | Yes | Yes | |
Data Flash Memory | Data EEPROM | PDID | ICSPDIS | No | No | Yes | Yes |
Configuration Bytes | Configuration Bytes | PDID | ICSPDIS | No | No | Yes | Yes |
Device Configurations | DIA | PDID | ICSPDIS | No | No | Yes | No |
DCI | |||||||
Dev ID | PDID | ICSPDIS | Yes(5) | No | Yes | No | |
Rev ID |
- The code protection and write protection settings are disabled.
- Limited ICSP read access will be enabled in the form of commands through the ISCPEN setting. Refer to the "Restricted Access to ICSP Interface" section.
- The SAFLOCK feature is only applicable to the configured SAF area. Once SAFLOCK is enabled, the SAF area cannot be reduced.
- Self-write operations through NVM functions are prohibited.
- Dev ID and Rev ID can still be read using the dedicated ICSP commands. For more details, refer to the PIC18-Q24 Family Programming Specification.
This section provides more details about the advanced code protection features, their use cases and configuration through MPLAB® Code Configurator (MCC).