4.1.3 Restricted Access to ICSP Interface

PDID feature-enabled microcontrollers have the ability to temporarily re-enable the ICSP interface in a limited capacity through bootloader code that was programmed onto the device before ICSPDIS was enabled in order to offer limited Failure Analysis capabilities. This includes the ability to perform ICSP read commands as long as code protection has not been enabled. Writing to PFM, performing bulk erase or page erasure commands, and reprogramming the microcontroller through the ICSP interface will continue to be unsupported.

To temporarily re-enable the ICSP interface, it is necessary to preload bootloader firmware into the microcontroller Boot Block that will be capable of programming the correct unlock sequence to the ICSPLOCK register and subsequently setting the EN bit of the ICSPEN register. Below is the code snippet of bootloader firmware that shows the unlock sequence required to correctly set the EN bit of the ICSPEN register.

INTCON0bits.GIE = 0; // Disable Interrupts;
ICSPLOCK = 0x55;
ICSPLOCK = 0xAA;
ICSPENbits.EN = 1;
INTCON0bits.GIE = 1; // Enable Interrupts;
Tip: The contents of the ICSPLOCK and ICSPEN registers will reset on a Power-On Reset (POR) event, meaning that upon power-up these bits will be cleared and the ICSP interface will be disabled until re-activated by the bootloader.

The limited access to the ICSP interface is beneficial for conducting failure analysis on microcontrollers that have the PDID feature enabled and have been reported as defective or have failed after being deployed in the field. It is important to ensure that the bootloader firmware, which programs the correct unlock sequence to the ICSPLOCK register, is stored in the microcontroller's Boot Block prior to enabling the PDID feature. In addition, if the code protection settings for the respective memory sections are also configured on the microcontroller, external ICSP read commands will not be permitted for those memory sections. However, a microcontroller configured with the PDID feature still retains limited failure analysis capabilities. Without the bootloader firmware, the chances of performing a failure analysis on the microcontroller are extremely limited.

CAUTION: Use extreme caution with the ICSPDIS bit when using Microchip Technology's Quick Turn Programming (QTP) or Serialized Quick Turn Programming (SQTP) services. Devices that have this Configuration bit enabled will permanently have their programming and debugging interface disabled. This means that it will no longer be possible to reprogram or erase those devices ever again, and they will have extremely limited FA capabilities.