SWRA466D February 2015 – August 2021 CC1310 , CC1310 , CC1352R , CC1352R , CC2538 , CC2538 , CC2620 , CC2620 , CC2630 , CC2630 , CC2640 , CC2640 , CC2640R2F , CC2640R2F , CC2640R2F-Q1 , CC2640R2F-Q1 , CC2642R , CC2642R , CC2642R-Q1 , CC2642R-Q1 , CC2650 , CC2650 , CC2650MODA , CC2650MODA , CC2652R , CC2652R , CC2652R7 , CC2652R7 , CC2652RB , CC2652RB , CC2652RSIP , CC2652RSIP
To verify that the firmware was successfully programmed into the Flash memory, the SBL function calculateCrc32 can be used to get a CRC32 checksum of a specified part of the Flash memory from the bootloader. The calculateCrc32 function uses the command CMD_CRC32 together with a start address and the number of bytes to include in the CRC32 checksum.
For CC26x0 and CC26x2, the bootloader also expects a read repeat count. Setting this to 0x00000000 ensures that the data locations are only read once.
The CC2538, CC26x0, and CC26x2 bootloaders uses the CRC-32-IEEE 802.3 with the following polynomial to calculate CRC checksum.
CRC32poly = x32 + x26 + x23 + x22 + x16 + x12 + x11 + x10 + x8 + x7 + x5 + x4 + x2 + x + 1
An example of how to calculate the checksum using the CRC32poly is implemented in the SBL example project. The sequence chart for the calculateCrc32 function is shown in Figure 4-7.