27.5.15 Chip Erase Hard Lock

It is possible to lock the DSU chip erase by issuing the Set Chip Erase Hard Lock command (SCEHL). After command execution, INTFLAG.DONE and DSU STATUSB.CEHL are set.

This command can be issued only if DSU STATUSB.PROT = 1. The SCEHL command is discarded if the device is not protected (DSU STATUSB.PROT = 0) and INTFLAG.PROGE rises. This means that the firmware has to issue the command. Once programmed, the fuse cannot be erased.

External tools can know whether the chip erase hard lock feature is applied or not by reading the DSU STATUSB.CEHL as the DSU STATUSB register is always readable. A one indicates that the chip erase is locked.

If a DSU Chip-Erase command (DSU CTRL.CE = 1) is issued when DSU STATUSB.CEHL = 1, the command is discarded and both DSU STATUSA.DONE and DSU STATUSA.FAIL are set.

If the Security Bit and the CEHL fuse are set, the device is hard-locked, meaning the debug port and full chip erase are permanently disabled, hence the ability to modify the Flash with external accesses is inhibited.
CAUTION: Microchip's failure analysis capabilities are limited when this feature is used.
Note: If the device chip erase is hard-locked (DSU STATUSB.CEHL = 1), the execution of SCEHL/CELCK/CEULCK and SBPDIS/CBPDIS commands have no effect. The device remains locked and the Boot section security properties are not modified. The commands are discarded and INTFLAG.PROGE is set.