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.

CC3220MODA: Checksum for flash image

Part Number: CC3220MODA

Hi,

What's the best practice for computing the checksum of a CC3220 flash image?  Is it necessary due to the secure flash feature?  

I know the hex file contains the program image plus the filesystem contents, etc., so I'm not sure if it's even possible.

Thanks for your help!

Best,
Joe K.

  • Hi Joseph,

    Calculating the checksum during an OTA update or similar can be done by running the downloaded image through the hardware SHA accelerators. The cryptohmac example in the SDK shows how to use the crypto drivers to access the hashing functions.

    However, the OTA library should be robust against bad update packages. First, each individual file in the image is already hashed. If you look at metadata for an OTA bundle, each file already has a hash that the OTA library will check against when applying the update. Also, when the new OTA image is applied it is done in failsafe mode, so if the update is corrupt or otherwise causes the system to crash the image will be rolled back to the previous working state upon a reset. Since the OTA library uses the hardware watchdog to automatically reset the system in case of such a crash, there should be no way a bad image gets successfully applied to the device.

    Let me know if you need more clarification, or have further questions on this topic.

    Regards,
    Michael