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

DFU Post Validate Fails at CRC16

Hi guys,

I've almost got DFU working on SDK10. However I am having issues at post validation of the image, specifically in the function dfu_init_postvalidate() in file dfu_init_template.c. In this function the CRC passed from the init file is compared to the locally calculated CRC via a crc16_compute() call. However this function does not seem to return a matching value. I know the init file has the correct the CRC of my image and it is correctly passed to the bootloader. However every time, the locally calculated CRC does not match (incorrect). I could easily bypass this step, but I'd rather keep it for an image integrity check.

If directly DFU the .hex file without .zip generation via NrfStudio I see that nrfStudio sends the same CRC calculation as my .zip file. So the only possible source of error is in the local crc16_compute() . How is crc16_compute() different from the way nrf.exe calculates the CRC? Has anyone faced this issue?

Thanks guys,

DC

Parents Reply
  • I was simply using the SDK 10 bootloader example project. I generated the zip and init file via nrf.exe (which matched the nrfStudio auto-init CRC generation). Via debugging on the dfu_init_postvalidate() function I saw that the received and correct CRC does not match the one calculated via crc16_compute(). I'm not sure I'm allow to share our encrypted image however. I'll see

Children
No Data
Related