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

enabling watchdog in nrf_bootloader_wdt

Hello,

I am using nRF52840 DevKit, SDK 16.0.0 and SoftDevice 113 v701

I am looking at nrf_bootloader example and want to configure a watchdog that keeps running even when the CPU is halted by a debugger.

I think I am missing the initialization function?

nrf_bootloader_wdt_init() just check if the wdt is running and exit with 

NRF_LOG_INFO("WDT is not enabled");

I tried looking at the sample code in (examples/peripheral/wdt), but that one is using nrf_drv_wdt APIs and nrf_wdt.h is using nrfx APIs

Is there a good sample of the expected initialization and enabling code that works with nrf_wdt.h or am I missing something?

Thanks for everyone's time.

Parents
  • Hi Richard, 

    The bootloader might not be the place to look for the WDT code. The bootloader wouldn't start WDT. Usually, it's the application does that, the Bootloader only keep the WDT being fed when the application switches to the bootloader.

    Please have a look at the wdt example in \examples\peripheral\wdt . The configuration of the WDT is defined by NRFX_WDT_CONFIG_BEHAVIOUR in sdk_config.h

  • Understood Hung, I am trying to add hardening to the bootloader where it does start the WDT so that if a debugger connects and halt the CPU, the watchdog will fire even in the bootloader. I did look at the example code. I was under the impression that the nrf_drv APIs are deprecated and using nrfx APIs are recommended, however I can't find examples of watchdog initialization using the nrfx API.

Reply
  • Understood Hung, I am trying to add hardening to the bootloader where it does start the WDT so that if a debugger connects and halt the CPU, the watchdog will fire even in the bootloader. I did look at the example code. I was under the impression that the nrf_drv APIs are deprecated and using nrfx APIs are recommended, however I can't find examples of watchdog initialization using the nrfx API.

Children
Related