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

ble_radio_notification_init causes early termination in DFU bootloader

My application uses ble_radio_notification_init. Every time I switch from my application to the DFU bootloader it drops the connection about 10 seconds after starting the bootloader.

If I remove ble_radio_notification_init the bootloader works fine, and the dfu process goes through with no interruption.

When I use radio_notification_init in my application code, the dfu process breaks about 10 seconds after switching from the application to the bootloader.

I tried to disable the notifications in my reset_prepare function with this code:

ble_conn_params_stop();   sd_radio_notification_cfg_set(NRF_RADIO_NOTIFICATION_TYPE_NONE,NRF_RADIO_NOTIFICATION_DISTANCE_NONE);
sd_nvic_DisableIRQ(SWI1_IRQn);
err_code = sd_nvic_ClearPendingIRQ(SWI1_IRQn);


nrf_delay_ms(500)

However it does NOT help the problem.

How do I disable ble_radio_notification_init so the DFU may work without a disconnect?

  • problem seems to only happen when I'm also enabling the watchdog timer with this code:

    // The WDT will be paused during debugging and in sleep mode
    NRF_WDT->CONFIG = (WDT_CONFIG_HALT_Pause << WDT_CONFIG_HALT_Pos) | ( WDT_CONFIG_SLEEP_Pause << WDT_CONFIG_SLEEP_Pos);
    	
    // Timeout period of 10 s
     NRF_WDT->CRV = WATCHDOG_TIMEOUT;
    	
    // Enable reload register 0
    NRF_WDT->RREN |= WDT_RREN_RR0_Msk;
    	
    // Enable interrupt
    NRF_WDT->INTENSET = WDT_INTENSET_TIMEOUT_Set;
    
    // Set up interrupt handler
    //	NVIC_ClearPendingIRQ(WDT_IRQn);
    //  NVIC_SetPriority(WDT_IRQn, APP_IRQ_PRIORITY_LOW);
    //	NVIC_EnableIRQ(WDT_IRQn);
    
    sd_nvic_ClearPendingIRQ(WDT_IRQn);
    sd_nvic_SetPriority(WDT_IRQn, APP_IRQ_PRIORITY_LOW);
    sd_nvic_EnableIRQ(WDT_IRQn);
    
    // Start the WDT counting
     NRF_WDT->TASKS_START = 1; 				// Watchdog start
    
  • found this thread very late, did you have any progress in this? seems interesting

Related