#include "fw_conf.h"
#include "fw_types.h"
Go to the source code of this file.
◆ WDT_EnableCounterWhenIdle
| #define WDT_EnableCounterWhenIdle |
( |
|
__STATE__ | ) |
SFR_ASSIGN(WDT_CONTR, 3, __STATE__) |
Enable or disable watchdog counter in idle mode
Definition at line 41 of file fw_wdt.h.
◆ WDT_ResetCounter
| #define WDT_ResetCounter |
( |
| ) |
SFR_SET(WDT_CONTR, 4) |
Reset watchdog counter to avoid reset
Definition at line 37 of file fw_wdt.h.
◆ WDT_SetCounterPrescaler
| #define WDT_SetCounterPrescaler |
( |
|
__PRE_SCALER__ | ) |
(WDT_CONTR = WDT_CONTR & ~0x07 | (__PRE_SCALER__ & 0x07)) |
Set counter prescaler. The higher this value is, the longer counter overflow will take place
Toverflow (in seconds) = 12 * 32768 * 2^(PRE_SCALER + 1) / SYSCLK
Definition at line 47 of file fw_wdt.h.
◆ WDT_StartWatchDog
| #define WDT_StartWatchDog |
( |
| ) |
SFR_SET(WDT_CONTR, 5) |
Start watchdog. It cannot be stopped in code once it is started
Definition at line 33 of file fw_wdt.h.