This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Uploading application and bootloader : application not starting

Hi,

I merged 3 hex files(softdevice.hex, bootloader.hex, application.hex)

I uploaded this hex file to nrf52382 DK.

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

Why does my DK work like this??

I want to change my DK automatically run in application mode after uploading.

How can I do this?

SDK : 11.0 DK : nrf52382 SoftDevice : 0x88

Thanks.

Parents
  • This is the defined behaviour of the bootloader, since it does not know that there is a valid application on the device. On startup the bootloader checks the bootloader settings page if the valid application flag is set or not. If it is set, then the bootloader will branch to the the application. If it is not set, then the device will stay in bootloader mode and wait for an application DFU.

    In order to flash the combined SoftDevice, Bootloader and Application, where the device branches to the application without having to perform a OTA update, you have to set the BANK_VALID_APP flag in bootloader_settings.c, i.e. change the line

    uint8_t  m_boot_settings[CODE_PAGE_SIZE]    __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS))) __attribute__((used));   
    

    to the following

    uint8_t  m_boot_settings[CODE_PAGE_SIZE]    __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS))) __attribute__((used)) = {BANK_VALID_APP};
    

    Best regards

    Bjørn

Reply
  • This is the defined behaviour of the bootloader, since it does not know that there is a valid application on the device. On startup the bootloader checks the bootloader settings page if the valid application flag is set or not. If it is set, then the bootloader will branch to the the application. If it is not set, then the device will stay in bootloader mode and wait for an application DFU.

    In order to flash the combined SoftDevice, Bootloader and Application, where the device branches to the application without having to perform a OTA update, you have to set the BANK_VALID_APP flag in bootloader_settings.c, i.e. change the line

    uint8_t  m_boot_settings[CODE_PAGE_SIZE]    __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS))) __attribute__((used));   
    

    to the following

    uint8_t  m_boot_settings[CODE_PAGE_SIZE]    __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS))) __attribute__((used)) = {BANK_VALID_APP};
    

    Best regards

    Bjørn

Children
Related