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

nRF52832 DK bootloader don't start application

Hello,

I'm currently trying to OTA update the firmware of my nRF52832 DK, I use the SDK 12.3.0.

I loaded the BLE Secure DFU Bootloader in the DK, it's advertising as DfuTarg. Then I use nRF Toolbox to DFU transfer a package generated from blinky example with nrfutil.

The update works fine but once finished the bootloader don't start the blinky application, it stays in DFU mode with LEDs 1 and 3 ON.

 

What am I doing wrong ?

Thanks for your answers.

Parents
  • When I debug the BLE Secure DFU Bootloader, I can see that the execution is stuck in this function:

    static void wait_for_event()
    {
        // Transport is waiting for event?
        while(true)
        {
            // Can't be emptied like this because of lack of static variables
            app_sched_execute();
        }
    }

    void app_sched_execute(void)
    {
        while (!is_app_sched_paused() && !APP_SCHED_QUEUE_EMPTY())
        {
            // Since this function is only called from the main loop, there is no
            // need for a critical region here, however a special care must be taken
            // regarding update of the queue start index (see the end of the loop).
            uint16_t event_index = m_queue_start_index;
    
            void * p_event_data;
            uint16_t event_data_size;
            app_sched_event_handler_t event_handler;
    
            p_event_data = &m_queue_event_data[event_index * m_queue_event_size];
            event_data_size = m_queue_event_headers[event_index].event_data_size;
            event_handler   = m_queue_event_headers[event_index].handler;
    
            event_handler(p_event_data, event_data_size);
    
            // Event processed, now it is safe to move the queue start index,
            // so the queue entry occupied by this event can be used to store
            // a next one.
            m_queue_start_index = next_index(m_queue_start_index);
        }
    }

  • Hi,

    Are you using the _debug project (\examples\dfu\bootloader_secure\pca10040_debug)? In that case you can check the RTT log output to see if the bootloader reports any errors, maybe the DFU process fails at the post-validation step or during activation.

    You could also try to rebuild the bootloader with the nrf_dfu_utils.c file I posted here: https://devzone.nordicsemi.com/f/nordic-q-a/31023/long-delay-after-dfu-completion-sdk-12-1. It should make the copy routine more robust against unexpected resets.  

      

Reply Children
Related