This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52 CRCSTATUS

I'm making my own protocol on nRF52832 devices and I'm wondering if there's any possibility to have data corruption when CRCSTATUS  contains CRCOK value.

I'd like to get rid of my extra CRC that put on the payload if CRCSTATUS can ensure data integrity.

Parents
  • Hi,

    The probability of having a corrupted data with right CRC24 is 1/(2^24). It's not related to nRF52832, just mathematics. If you need better reliablilty, you have to use CRC32 implemented in software.

  • Hi Dmitry, unrelated question, have you used BinaryFile.crc32() in Segger? script_class_BinaryFile.htm Looks like emScript allows calculation and placement of a 32-bit CRC. We currently use what looks like the same CRC32 but require a simple external tool to calculate and insert in the hex file rather than running the code then editing the project. srec_cat allows this, but gives a different hex CRC32.

    srec_cat manuf_driver3-832.hex -i -crop 0 0x0158D0 -fill 0xFF 0 0x0158D0 -STM32_Little_Endian 0x0158D4 -o a1.hex -i

    Worst-case we have to modify the code to match srec_cat calculation, but I'd rather use a SES script which runs on every build to populate the CRC vector. There is an example of build number increment on page 892 of the v4.52C manual, but time is short and I'd rather just copy something which already is tested ..

Reply
  • Hi Dmitry, unrelated question, have you used BinaryFile.crc32() in Segger? script_class_BinaryFile.htm Looks like emScript allows calculation and placement of a 32-bit CRC. We currently use what looks like the same CRC32 but require a simple external tool to calculate and insert in the hex file rather than running the code then editing the project. srec_cat allows this, but gives a different hex CRC32.

    srec_cat manuf_driver3-832.hex -i -crop 0 0x0158D0 -fill 0xFF 0 0x0158D0 -STM32_Little_Endian 0x0158D4 -o a1.hex -i

    Worst-case we have to modify the code to match srec_cat calculation, but I'd rather use a SES script which runs on every build to populate the CRC vector. There is an example of build number increment on page 892 of the v4.52C manual, but time is short and I'd rather just copy something which already is tested ..

Children
Related