FAQ

  1. How do I Obtain Checksum Value from MPLAB X IDE or MPLAB IPE?
  2. How do I Troubleshoot Checksum Value Mismatches?

Obtaining A Checksum from MPLAB X IDE or MPLAB IPE:
Microchip’s MPLAB X IDE development tool and MPLAB IPE programming tool are both available from the MPLAB X IDE installer found at:

In order to get the checksum value from MPLAB X IDE, you need to have an openproject foryour device. In order to get the checksum value from MPLAB IPE, you need a generated hex file for your device.

Getting a Checksum from MPLAB X IDE andYour Project

  1. Launch MPLAB X IDE
  2. Open a project using your device (example: your_project)
  3. Set the project as the main project (Production  Set Main Project your_Project)
  4. Open the Dashboard (Window  Dashboard)
  1. Build the project (Production  Build Main Project)
  2. The device selected for the project and the Checksum value can be found in the Dashboard

Getting aChecksum from MPLAB IPE and Your Hex File

  1. Launch MPLAB IPE
  2. Select the device and click “Apply”

There is a Checksum field displayed on the upper right hand corner
This is the device’s checksum in its default state

  1. Click on “File”  “Import”  “Hex” and select the hex file using your device
  2. Checksum field should now be updated to reflect the expected checksum for the selected hex file and device

Note:If you are logged into Advanced Mode, there will be two different checksum fields. The checksum shown in the red box below is the one to submit for a production order.

“CP=OFF Checksum” will only be different from “Checksum” if the imported hex file is a code-protected hex file. “CP=OFF Checksum” displays the imported hex checksum as if code protection mode is disabled for the device with the current memory contents.

Troubleshooting Checksum Mismatches
There are six common causes for checksum mismatches

  1. Incorrect device is selected for the order
  2. Incorrect hex file was selected for the order
  3. Incorrect checksum was submitted for the order
  4. The development tool used to generate the hex file may be a 3rd party tool and has not been approved by Microchip
  5. The generated hex file may have Debug-bit enabled
  6. The generated hex file may have missing Configuration Settings information
  1. Incorrect device is selected for the order

It is common for devices of the same family to share and use the same algorithm and memory map. Therefore, the same project may be used for a different device within the family. Note that different devices have different IDs and sometimes device ID is included in the checksum calculation. Therefore, the same project compiled with different device may result in different checksum.

Please refer to the section above regarding how to get the correct checksum for a given device with its corresponding project in the MPLAB X IDE (Page 2).

  1. Incorrect hex file was selected for the order

Please refer to the section above regarding how to get the correct checksum for a given device with its corresponding hex file in the MPLAB IPE (Page 3).

  1. Incorrect checksum was submitted for the order

Please refer to the section above regarding how to get the correct checksum (Page 3).

Note:If you are logged into Advanced Mode, there will be two different checksum fields. The checksum shown in the red box below should be submitted for production order.

“CP=OFF Checksum” will only be different from “Checksum” if the imported hex file is a code-protected hex file. “CP=OFF Checksum” displays the imported hex checksum as if code protection mode is disabled for the device with the current memory contents.

  1. The development tool used to generate the hex file is a 3rd party tool not approved by Microchip
    It is important to make sure the 3rd party systems used are approved by Microchip and should generate checksums and hex files based on the devices’ programming specification from Microchip. In general, 3rd party development tools may generate hex files that are incompatible with Microchip’s programming utility.
  2. The generated hex file may have the Debugbit enabled

Microchip’s production programmersdo not program the Debugbit as Enabled regardless of how the hex file is defined; the bitis defaulted to Disabled. Therefore, hex files with this bit enabled will cause a checksum mismatch.

It is a common mistake for developers to accidentally submit a debug-enabled hex file. Developers set this bit to allow themselves or others to debug a project/device when using a development tool; hence, a debug-enabled hex file is created to allow them to troubleshoot or to make sure the device is working correctly. However, for the device to run correctly after development, the Debug bit must be cleared (disabled).

In MPLAB X IDE, go to “Production”  “Build Main Project” to ensure the project is building a production hex file.
In MPLAB IPE, a warning message will be displayed indicating that the Debug bit is enabled and that the IPE will clear it. If this is the case, go to “File”  “Export”  “Hex” to save a copy of the imported hex file with debugbit set to disabled. If the “Export”  “Hex” option is grayed out, it can be enabled by going to “Settings”  “Advanced Mode”, “Production Mode” tab and check checkbox “Allow Export Hex”.

  1. The generated hex file may have missing Configuration Settings information

Configuration settings are crucial to ensure a part operates correctly. If configuration settings information is missing from the hex file, it will result in checksum mismatch.

If a 3rd party tool is used to generate the hex file, make sure the configuration settings are in the generated hex file. Use MPLAB IPE to verify the configuration settings are indeed in the hex file by importing the hex file and cross checking the settings in IPE with the expected settings from the 3rd party tool.
Using MPLAB IPE to verify configuration settings in the hex file:

  1. Launch MPLAB IPE
  2. Select device and click “Apply”
  3. Go to “File”  “Import”  “Hex” to select the hex file
  4. Go to “View”  “Show Memory” and select “Config Memory” to review its settings

If “Show Memory” is disabled, simply login to Advanced Mode (“Settings”  “Advanced Mode” )

  1. If the configuration settings shown in IPE do not match the expected configuration settings, modify the setting manually (the checksum will change based on these settings) and go to “File”  “Export”  “Hex” to save a copy of the imported hex with the new configuration settings

Using MPLAB X IDE to set configuration settings in the project:
If Microchip’s development tool is used to generate the hex file, make sure configuration bits are set in code. There are two different ways to set configuration settings in code.
1.Set configuration settings in the code by using a_config/config command or a#pragma config

For example, in 32-bit code:
// FWDT
#pragma config FWDTEN = OFF // Watchdog Timer Disabled

Please refer to Language Tools Help for additional tips (Help  Tool Help Contents  Language Tools Help)

  1. Use MPLAB X IDE to generate the configuration settings for pasting into a source file
  2. Open/set project as Main Project
  3. Open the Configuration Bits Memory View Window (Window  PIC Memory Views  Configuration Bits)
  4. Change options for configuration settings
  5. Click on “Generate Source Code to Output”
  6. Copy/Paste the generated code in the output window (Output – Config Bits Source) into the source file
  7. Recompile project and the hex file should now include its configuration settings

1