I am using PIC32MZ2048EFH064, MPLABx3.40, XC32 V1.42, Harmony V2.01b. And my PC app is using MS Visual C++ 2010 Express. Instead of using microchip's Pic32 downloader I want to build my own downloader and, I want to download my custom encrypted firmware using PC host application. Now problem is, I am able to connect and download the bootloader firmware using my custom app, but CRC verification (i.e. program verification) is failed. Because the CRC calculated (and sent) by firmware doesn't matches to the CRC calculated by my custom app for the hex file. Now my observations are :
Both are using same address range and same program length over which CRC is calcuated.
Address range is : 0x9FC00000 - 0x9FC0FFF4.
Both are using same CRC table, CRC routine to calculate CRC.
I want to ask that, whether calculating CRC should include config register area also?