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

nRF52 single bank: REMOTE DFU INVALID CRC ERROR

Hi,

I've been trying to get DFU updates working on my device for a while now... I've got the single-bank bootloader compiled and seemingly working (and a combined hex file of sd+bootloader+app works great).

I used nrfutil (3.10.0.14) to create a zip file based on my application:

nrfutil.exe dfu genpkg dfu.zip --application firmware.hex --application-version 0xff --dev-revision 1 --dev-type 1 --sd-req 0x81

I can now upload the zip from my phone, and it gets all the way to 99% and then fails with: REMOTE DFU INVALID CRC ERROR

Any idea what could be causing this? Presumably nrfutil is calculating the CRC (in manifest.json and the .dat file), and this is going straight to the bootloader... What could be confusing things? Is something else part of the crc?

Parents
  • Found it. In pstorage_platform.h, there should be a typedef uint32_t pstorage_size_t;. However in 95% of the examples in the SDK, the file actually contains typedef uint16_t pstorage_size_t;

    Since I was trying to use the same build system with the same _platform.h files for my app and bootloader, I got hit with this.

    I hit another similar problem when trying to get NFC working. A simple #error if the typedef is wrong for the bootloader could save a lot of people a lot of time.

Reply
  • Found it. In pstorage_platform.h, there should be a typedef uint32_t pstorage_size_t;. However in 95% of the examples in the SDK, the file actually contains typedef uint16_t pstorage_size_t;

    Since I was trying to use the same build system with the same _platform.h files for my app and bootloader, I got hit with this.

    I hit another similar problem when trying to get NFC working. A simple #error if the typedef is wrong for the bootloader could save a lot of people a lot of time.

Children
No Data
Related