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.

CC2642R: Reading the flash address for CRC16 calculation

Part Number: CC2642R

Hello Experts,

We are trying to calculate the CRC16 for the software flashed on the BLE CC2642.

For this, is it possible to read from the flash in the application mode (to calculate CRC for the flashed s/w location 0x0000-0x58000)?
Or we would need to jump to the ROM bootloader mode and only then we can read from the flash to perform the CRC calculation ?

Also, as per the TRM there is a command for CRC32 calculation, but for CRC16 there is no command mentioned. In this case we would have to implement this function, is my understanding right here ?

Regards,
Shreyas

  • Hi,

    CRC16 is not implemented. If needed, you may want to review https://www.ti.com/lit/swra111

    I am not sure it would be relevant to compute the CRC on the whole Flash while running the Bluetooth stack. For example, Bluetooth bonding requires to store - and update periodically - crypto keys.

    You may want to refer to the nvsinternal example in the SDK for more details. You may also wan to refer to the BIM onchip example showing CRC32 calculation on the internal Flash.

    I hope this will help,

    Best regards,

  • Hi,

    Thanks for the response. After consideration, we have decided to go with the CRC32 implementation of the ROM bootloader.

    Just wanted to know what method is being used for CRC32 calculation(COMMAND_CRC32) ? Is there some documentation for the same ? 

    Thanks,

    Shreyas

  • Hello Shreyas,

      The CRC is calculated using CRC-32-IEEE802.3 with poly x32+x26+x23+x22+x16+x12+x11+x10+x8+x7+x5+x4+x2+x+1

        Best regards,

           David