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

Watchdog is useless

Hello,

I have a secure bootloader and an application on nRF52840 with SD 15.2.

I try to add watchdog support in application based on watchdog exemple but if i remove feed, it not resets… 

Do someone have an idea please ?

Thank you.

Parents
  • I have used the Watchdog in more than one application and I can assure you it definately resets the chip.  Can you share some of the WD init code?

    Thanks

  • Sorry my title have several senses. I am sure that it works but not in my case :-)

    nrf_drv_wdt_channel_id m_channel_id;
    
    
    void wdt_event_handler(void)
    {
    }
    
    
    int main(void)
    {
    
    	// ...
    
    	//BSP configuration for button support: button pushing will feed the dog.
        uint32_t err_code = nrf_drv_clock_init();
        APP_ERROR_CHECK(err_code);
        nrf_drv_clock_lfclk_request(NULL);
    
    	//Configure WDT.
        nrf_drv_wdt_config_t config = NRF_DRV_WDT_DEAFULT_CONFIG;
        uint32_t err_code = nrf_drv_wdt_init(&config, wdt_event_handler);
        APP_ERROR_CHECK(err_code);
        err_code = nrf_drv_wdt_channel_alloc(&m_channel_id);
        APP_ERROR_CHECK(err_code);
        nrf_drv_wdt_enable();
    	nrf_drv_wdt_channel_feed(m_channel_id);
    	
    	ble_stack_init();
    	
    	
    	while (1)
    	{
    		//nrf_drv_wdt_channel_feed(m_channel_id); // commented to expect reset
    	}
    	
    	
    	// ...
    }
    

  • Some quick questions:

    • This is pretty much the same as the example code from the SDK, does that also fail "as-is"?
    • How do you ensure that the timeout does not occur?
    • Have you modified any parameter in NRF_DRV_WDT_DEAFULT_CONFIG from sdk_config.h?
    • What is the is markings on the nRF52840 ic you have?

    Best regards,
    Kenneth

Reply Children
Related