19.3 Program Write Protection (PWP) Bits
The PIC32 families of devices feature write protection, which prevents designated boot and program Flash regions from erasing or writing during program execution.
In PIC32MX devices, write protection is implemented in Configuration memory by the Device Configuration Words, while in PIC32MZ and PIC32MK family devices, this feature is implemented through SFRs in the Flash controller.
When write protection is implemented by Device Configuration Words, the write protection register must only be written when all boot and program Flash memory has been programmed. Refer to the “Special Features” chapter in the specific device data sheet for details.
If write protection is implemented using SFRs, certain steps may be required during initialization of the device by the external programmer prior to programming Flash regions. Refer to the “Flash Program Memory” chapter in the specific device data sheet for details.