4.2.1.1 SAFLOCK Bit Configuration Through MCC
For the application firmware generated using MCC and MPLAB X IDE, configure the bit in the Easy View window of the Configuration Bits module in MCC.
Since SAFLOCK is a OTP Configuration bit, an additional level of protection is provided for the Configuration bit in MCC. To access the bit configuration section, select the "Enable OTP Access Bits" option in the "One-Time Programmable (OTP) Registers" section of the Configuration Bits Easy View window, as shown in the SAFLOCK Configuration Bit Setting in MCC figure.
- In MCC, to open the Easy View window of Configuration Bits, navigate to Project Resources Management [MCC] > Project Resource > System > Configuration Bits, and click the “Configuration Bits” option, as shown in the Configuration Bits Easy View Selection in MCC figure.
- The
SAFLOCK feature can also be configured through the
ICSP commands, using the SPI-based programming method. To enable the
SAFLOCK feature through ICSP commands, follow the
sequence below:
- Send the Program Access Enable Command with the appropriate payload.
- Send the Program Data Command to write to the SAFLOCK bit.
For more information on the Program Access Enable Command and the Program Data Command, refer to the PIC18-Q24 Family Programming Specification.