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

Uploading application and Secure DFU bootloader : application not starting

MY CHIP is NRF52840, EVB is PCA10056

SDK: nRF5_SDK_15.0.0_a53641a

bootloader use  secure DFU example:     \nRF5_SDK_15.0.0_a53641a\examples\dfu\secure_bootloader\pca10056_ble

use IDE:Keil 5 MDK ARM

looklike this  subject:https://devzone.nordicsemi.com/f/nordic-q-a/19068/uploading-application-and-bootloader-application-not-starting

I merged 3 hex files(softdevice.hex, bootloader.hex, application.hex) and uploaded this hex file to nrf52840 DK.

After uploading hex file to DK, although there is application hex file in memory,my DK is still in DFU mode.

util use DFU upload new application.

I have try this subject solve method.

But  bootloader_settings.c is not in my  secure_bootloader example.

There is also no  uint8_t m_boot_settings[CODE_PAGE_SIZE].

Parents
  • Hello,

     

    After uploading hex file to DK, although there is application hex file in memory,my DK is still in DFU mode.

     Yes. This is because the application that is now programmed in the flash doesn't have a matching CRC, so the bootloader will not accept it as a valid application, and hence enter DFU mode.

    When you update an application via DFU, the DFU image is signed with the private key. The bootloader will receive this signed image, and see that the calculated CRC matches the CRC in the init packet of the dfu image, and store this in the bootloader settings. 

    So if you don't have any bootloader settings, the application will never be accepted as a valid application, and it will enter dfu mode.

    You can generate the DFU settings using nrfutil:

    https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrfutil%2FUG%2Fnrfutil%2Fnrfutil_settings_generate_display.html&cp=6_5_6

    And then merge these settings with your application, bootloader and softdevice, and it should accept the application instead of booting up in DFU mode.

    Best regards,

    Edvin

Reply
  • Hello,

     

    After uploading hex file to DK, although there is application hex file in memory,my DK is still in DFU mode.

     Yes. This is because the application that is now programmed in the flash doesn't have a matching CRC, so the bootloader will not accept it as a valid application, and hence enter DFU mode.

    When you update an application via DFU, the DFU image is signed with the private key. The bootloader will receive this signed image, and see that the calculated CRC matches the CRC in the init packet of the dfu image, and store this in the bootloader settings. 

    So if you don't have any bootloader settings, the application will never be accepted as a valid application, and it will enter dfu mode.

    You can generate the DFU settings using nrfutil:

    https://infocenter.nordicsemi.com/index.jsp?topic=%2Fug_nrfutil%2FUG%2Fnrfutil%2Fnrfutil_settings_generate_display.html&cp=6_5_6

    And then merge these settings with your application, bootloader and softdevice, and it should accept the application instead of booting up in DFU mode.

    Best regards,

    Edvin

Children
No Data
Related