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

Configuration of Watchdog timer

Hello,

 

I am using nRF52832 DK PCA10040 v1.2.4, SDK_15.3.0, S132 SoftDevice and Segger for flashing the image. I am using ‘ble_app_blinky’.

 

I have gone through wdt example. It says, the example is configured with 2 sec. Is this WDT_CONFIG_RELOAD_VALUE macro or this macro is CRV register value.

If it is CRV register value, it will not be 2sec.

 

Thanks & Regards

Vishnu Beema

Parents
  • Hi,

    The WDT example uses the WDT driver, and that is configured by the nrf_drv_wdt_config_t struct, which is typedefed to nrfx_wdt_config_t. It has a reload_value field, which is in milliseconds (ms). The example uses NRF_DRV_WDT_DEAFULT_CONFIG, which means that the value of WDT_CONFIG_RELOAD_VALUE in sdk_config is used, and this is set to 2000 (2s) by default.

    Unfortunately, the documentation string in sdk_config.h is wrong, which can cause some confusion, but you can clearly see that the value is in ms by looking at the implementation in nrfx:

    nrf_wdt_reload_value_set((p_config->reload_value * 32768) / 1000);

Reply
  • Hi,

    The WDT example uses the WDT driver, and that is configured by the nrf_drv_wdt_config_t struct, which is typedefed to nrfx_wdt_config_t. It has a reload_value field, which is in milliseconds (ms). The example uses NRF_DRV_WDT_DEAFULT_CONFIG, which means that the value of WDT_CONFIG_RELOAD_VALUE in sdk_config is used, and this is set to 2000 (2s) by default.

    Unfortunately, the documentation string in sdk_config.h is wrong, which can cause some confusion, but you can clearly see that the value is in ms by looking at the implementation in nrfx:

    nrf_wdt_reload_value_set((p_config->reload_value * 32768) / 1000);

Children
Related