This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL2-RM57L: CRC Values

Part Number: LAUNCHXL2-RM57L

I'm writing a bootloader that will calculate the CRC of an app elsewhere in flash and switch to load mode if there is a mismatch with the expected CRC value. Full CPU Mode will be used. 

1. Assume I convert app.out to app.bin using tiobj2bin. app.bin is of size S and is flashed to address A.

2. Running (on the dev PC) a CRC-64 calculating tool on app.bin yields result X.

3. sCrcModConfig.data_length = S and sCrcModConfig.src_data_pat = (uint64*)A

Q: Is X the value to check against the value returned by crcGetPSASig (after crcChanelReset and crcSigGen are called, naturally)? 

  • Q: Is X the value to check against the value returned by crcGetPSASig (after crcChanelReset and crcSigGen are called, naturally)? 

    Yes if the same polynomial is used. 

    You can also calculate the CRC value of the application in bootloader and store the CRC value to flash or FEE (only for the first time after the application is programmed):

    1. Bootloader programs the application to flash

    2. Bootloader calculate CRC of the application: CRC_new

    3. Check the CRC in flash or FEE (CRC_old), if CRC_old value is zero or a invalid value for example "0xbadbeef), write the CRC_new to flash or FEE to replace the CRC_old

    4. If CRC_old is a valid value, compare CRC_new and CRC_old, write "0xbadbeef" to flash or FEE to replace the CRC_old, and upload the application again

    This is just my rough idea, and may not be practical for your application.