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

Secure Bootloader Downloads app but stays in Bootloader on Custom board

My DFU is staying in the bootloader, even after successful download of the application package.

I have modified the secure bootloader for my custom PCB (removed the GPIO for the button check), so that is not an issue.

I can make the DFU "work" if I just initially install the bootloader and softdevice only. The app will start nicely with my app only package.

However, if I generate the combined bootloader, SD and app hex file by manually creating the bootloader settings and adding it to the combined hex file according with the method in Hung Bui's blog ("Getting started with Nordic's Secure DFU bootloader, a step by step guide"), the OTA app will not start and the device stays in the bootloader mode.

When I generate the app package, I have increased the version by "1" over the value I put in the manually generated settings file (from 3 to 4) so it should be setting the app valid flag. I can't debug the bootloader, because I'm using the IAR platform and there seems to be a bug with debugging the bootloader.

Any suggestions to help figure out why the bootloader is not accepting the app would be appreciated.

Parents
  • Sure, I was in the middle of changing my application version numbers, so now it is 1 and 4.

    Also, if I DFU the exact same package twice it works, 3 times no, 4 times yes. Interesting. For the initial programming

    nrfutil settings generate --family NRF52 --application app.hex --application-version 1 --bootloader-version 2 --bl-settings-version 1 app_valid.hex

    For the update DFU package

    nrfutil pkg generate --hw-version 52 --sd-req 0x8C --application-version 4 --application app.hex --key-file ....\OTA_files\private.pem Stick_dfu_r1.3.1.zip

    Also for reference, SDK 12.1, SD 3.0.0, IAR 7.70 (workbench 7.5), not sure about MDK

Reply
  • Sure, I was in the middle of changing my application version numbers, so now it is 1 and 4.

    Also, if I DFU the exact same package twice it works, 3 times no, 4 times yes. Interesting. For the initial programming

    nrfutil settings generate --family NRF52 --application app.hex --application-version 1 --bootloader-version 2 --bl-settings-version 1 app_valid.hex

    For the update DFU package

    nrfutil pkg generate --hw-version 52 --sd-req 0x8C --application-version 4 --application app.hex --key-file ....\OTA_files\private.pem Stick_dfu_r1.3.1.zip

    Also for reference, SDK 12.1, SD 3.0.0, IAR 7.70 (workbench 7.5), not sure about MDK

Children
No Data
Related