NRF5 SDK 15.3.0 has an issue in a module nrfx_wdt.c. In function nrfx_wdt_init line of code: nrf_wdt_reload_value_set((p_config->reload_value * 32768) / 1000); causes to overflow when reload_value greater than 131072 ms. Please, fix this issue.
NRF5 SDK 15.3.0 has an issue in a module nrfx_wdt.c. In function nrfx_wdt_init line of code: nrf_wdt_reload_value_set((p_config->reload_value * 32768) / 1000); causes to overflow when reload_value greater than 131072 ms. Please, fix this issue.
Hi,
Thank you for reporting the issue. It has already been discussed here and should be fixed in a future SDK release.
Has a new SDK been released that addresses this overflow? We need something in the 2,000,000 (mSec) range.
thanks
Hi,
Yes, this is fixed in SDK 16.0.0 (which uses a newer version of nrfx where this is fixed).
The fix was to replace this from SDK 15.3:
nrf_wdt_reload_value_set((p_config->reload_value * 32768) / 1000);
With this in SDK 16.0:
uint64_t ticks = (p_config->reload_value * 32768ULL) / 1000; NRFX_ASSERT(ticks <= UINT32_MAX); nrf_wdt_reload_value_set((uint32_t) ticks);