18.1 Theory

The checksum is calculated as the 32-bit summation of all bytes (8-bit quantities) in program Flash, Boot Flash (except device Configuration Words), the Device ID register with applicable mask, and the device Configuration Words with applicable masks. Then the 2’s complement of the summation is calculated. This final 32-bit number is presented as the checksum.
Note: The PIC32MKXXXXGPK/MCM/GPG/ MCJXXX devices use the CRC32 checksum. For additional information on the CRC32 checksum, refer to the “Checksum Changes” chapter of the document “Readme for MPLABX IDE.htm”, which can be found at <MPLABX Installation Path>\<MPLABX Revision>\docs.