Watchdog timer use case sensitive application

Hi, 

Good day!

Statement of problem: In our application, we are using nrf52832 SoC to control critical components (heater). So I was suggested to use a watchdog timer to control the critical elements. I tried to search online about this watchdog timer application and did not quite get the application part of it.

Query:

How I can use this watchdog timer to clear any application lockup situation so that heater can be set to default state? 

Is it possible to retain the application data after the watchdog timer is reset? If so how it can be implemented?

Thank you,

Aim High!

Parents
  • Hi,

    The watchdog in the nRF is just a simple downwards counting timer that you configure to run with a predefined counter reset value. During normal operation, you reload the counter (feed/kick it). If the application for some reason fails to do this (due to a deadlock or something else), then the counter will reach 0 and trigger a watchdog reset. The application will be notified by an interrupt before the reset, giving you time to put external signals in a safe state,etc (but there is no time to write to flash).

    Essentially you should design your system so that the watchdog timeout is long enough that it does not occur during normal operations, and you should try to make sure that you don't feed it in an error condition. (For instance, don't use a high priority timer interrupt to reload it, since in that case it may very well be reloaded even though there is an error state).

    You can refer to the WDT example to see how it can be used.

Reply Children
No Data
Related