watchdog: Limitation with the current watchdog API for Nordic devices #37740
Replies: 2 comments
-
You will have to work around this problem without the "hacky" version because as quoted on that documentation page, once the watchdog has been activated, those registers become read only: "The watchdog must be configured before it is started. After it is started, the watchdog’s configuration registers, which comprise registers CRV, RREN, and CONFIG, will be blocked for further configuration" and the only way to change them is to reset the CPU and configure the watchdog again. |
Beta Was this translation helpful? Give feedback.
-
@carlescufi this seems like it should be converted to a discussion with the last comment basically being the answer. What do you think? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Context: At boot time my device can take a lot of time to initialize itself - mainly due to flash accesses by NVS and FCB modules.
While I initially setup the watchdog after all these initialization steps, it has recently been decided to move watchdog initialization at the early stage.
Unfortunately the watchdog window is too small for the boot phase.
So I was thinking to setup a first watchdog at boot time with a large time window, then to disable this boot phase watchdog with
wdt_disable()
and setup a new watchdog with a smaller time window.Unfortunately Nordic watchdog peripheral does not support to be disabled: https://github.com/zephyrproject-rtos/zephyr/blob/master/drivers/watchdog/wdt_nrfx.c#L65
I cannot keep the small window for the boot phase as I would need to feed the watchdog in NVS/FCB modules. And I do not want to change upstream modules to not have to maintain this delta.
The watchdog window I have in mind is too big for the running phase.
I have few solutions in mind:
Any suggestion? Have I missed anything?
Beta Was this translation helpful? Give feedback.
All reactions