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.

  • 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

  • Thanks. It works! But, when I change define CONFIG_GPIO_AS_PINRESET to CONFIG_NFCT_PINS_AS_GPIOS, it doesn't work. Do you know why? Are there other variables I need to change?

  • You should not remove the CONFIG_GPIO_AS_PINRESET, just add CONFIG_NFCT_PINS_AS_GPIOS as a separate Preprocessor Define. If you're using a nRF52 Dk, then you have to modify the board as stated here

    Pin 11 and pin 12 are by default configured to use the NFC antenna, but if pin 11 and pin 12 are needed as normal GPIOs, R25 and R26 must be NC and R27 and R28 must be shorted by 0R.

  • @AnnaSBX: Can you please create new questions and then provide a LINK to the similar questions instead of posting new question in the comment section of allready answered and closed questions!

Related