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

Dual bank bootloader and Application start

Hi all,

My configuration:

  • nrf52832 
  • Softdevice S132 V4.0.2
  • Nordic SDK 13.0

I'm using the secure bootloader example located at \examples\dfu\bootloader_secure_ble .

The dual bank configuration works correctly, but there is a problem:

When I interrupt the DFU process, the nrf52832 remains inside Bootloader, waiting for next connection that continues the previous interrupted DFU process.

The only way to forcing the starting of existing valid application is to reset physically the device.

Is there a way to re-start automatically the existing valid application when the device is inside the bootlaoder and no DFU process are in progress?

Many thanks

Leo

Parents
  • Hi Leo,

    If I were you, I would use the debug bootloader using an RTT client to see what happens when the DFU process fails. From my understanding, this function is called when the DFU process fails:

    void app_error_handler_bare(uint32_t error_code)
    {
       (void)error_code;
       NRF_LOG_ERROR("Received an error: 0x%08x!\r\n", error_code);
       NVIC_SystemReset();
    }

    NVIC_SystemReset() then resets the device & the main function in the bootloader is called again. Since DFU functionality is defined, it will wait inside the bootloader like you mention. The DFU bootloader should have a timeout which will reset the chip & boot up the normal application. It seems you can send a Reset System command to trigger a reset which should start the application again. (see link for more info).

Reply
  • Hi Leo,

    If I were you, I would use the debug bootloader using an RTT client to see what happens when the DFU process fails. From my understanding, this function is called when the DFU process fails:

    void app_error_handler_bare(uint32_t error_code)
    {
       (void)error_code;
       NRF_LOG_ERROR("Received an error: 0x%08x!\r\n", error_code);
       NVIC_SystemReset();
    }

    NVIC_SystemReset() then resets the device & the main function in the bootloader is called again. Since DFU functionality is defined, it will wait inside the bootloader like you mention. The DFU bootloader should have a timeout which will reset the chip & boot up the normal application. It seems you can send a Reset System command to trigger a reset which should start the application again. (see link for more info).

Children
No Data
Related