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

DFU CRC error

Hi,

I'm using S130 v1.0 softdevice and bootloader (single bank) from SDK v9.0. When updating an application, I always get a CRC error at end of the upload. I generate the file using following command:

nrfutil.exe dfu genpkg --application app.hex --sd-req 0x67 update.zip

Is there anything additional I need to do?

Regards, Cyril.

  • Hi Cyril,

    You should generate the .zip file with full parameter. The command for a generic application DFU packet should look like this:

    nrfutil.exe dfu genpkg app.zip --application yourapplication.hex --application-version 0xffff --dev-revision 0xffff --dev-type 0xffff --sd-req 0xfffe
    

    You can change to match with your configuration, but application version, device revision, etc is needed.

    If the issue remains, could you try DFU with our example application and check if it worked ?

  • When I reduced the size of the image to be under 64K, then it worked. It seems that if the image is larger than 64K, it is not uploaded correctly (I compared the uploaded image in debugger and it was completely different). BTW On the PC I used MCP 3.10

  • @Cyril: You are hitting the limit of dual bank update. If you use dual bank update the size of the application should < (256- bootloader size - softdevice size)/2 =~ 64K If you want to update application with size >=64k you would need to use single bank update. To do that simply replace the dfu_dual_bank.c with dfu_single_bank.c (if you are using SDK 9.0).

  • I am using single bank update already as I also mentioned in the question.

  • Hi Cyril, Hung is away on business trip and he asked me to take a look into it. which version of nrf chip and nrfutil are using?? i tried to flash a 73KB application on pca10028 and it went ok.

    image description

    image description

    I used exactly same setup as you and like Hung suggested, replace dfu_dual_bank. with dfu_single_bank.c. I used MCP 3.10 and tried to flash the application directly from hex and also using the zip created by nrfutil. Both worked fine.

    Are you getting these CRC error consistently? This is post-processing validation done after all the transfer went through. Only thing i could think of is that somehow your initpacket in the zip file is generating wrong CRC. Can you try to update your application using the hex file directly and not use the zip. It is possible to do this in MCP 3.9 and 3.10

Related