Lines Matching full:watchdog
11 * @brief Nuvoton NPCX watchdog modules driver
13 * This file contains the drivers of NPCX Watchdog module that generates the
15 * system. It also provides watchdog reset signal generation in response to a
25 * +--->| Watchdog Prescale |--->| 8-Bit Watchdog |-----> Watchdog Event/Reset
37 #include <zephyr/drivers/watchdog.h>
45 /* Watchdog operating frequency is fixed to LFCLK (32.768) kHz */
49 * Maximum watchdog window time. Keep the timer and watchdog clock prescaler
50 * (TWCP) to 0x5. Since the watchdog counter is 8-bits, maximum time supported
51 * by npcx watchdog is 256 * (32 * 32768) / 32768 = 8192 sec.
53 * Thus, the maximum time of watchdog set here is 64 sec.
58 * Minimum watchdog window time. Ensure we have waited at least 3 watchdog
66 /* Timeout for stopping watchdog. (Unit:ms) */
79 /* Timestamp of touching watchdog last time */
81 /* Timeout callback used to handle watchdog event */
83 /* Watchdog feed timeout in milliseconds */
85 /* Indicate whether a watchdog timeout is installed */
124 /* If watchdog is still running? */ in wdt_wait_stopped()
129 LOG_ERR("Timeout: stop watchdog timer!"); in wdt_wait_stopped()
147 /* Handle watchdog event here. */ in wdt_t0out_isr()
177 /* If watchdog is already running */ in wdt_npcx_install_timeout()
182 /* No window watchdog support */ in wdt_npcx_install_timeout()
189 * Since the watchdog counter in npcx series is 8-bits, maximum time in wdt_npcx_install_timeout()
199 /* Save watchdog timeout */ in wdt_npcx_install_timeout()
251 /* Configure 8-bit watchdog counter in wdt_npcx_setup()
252 * Change the prescaler of watchdog clock for larger timeout in wdt_npcx_setup()
292 * Ensure we have waited at least 3 watchdog ticks before in wdt_npcx_disable()
293 * stopping watchdog in wdt_npcx_disable()
301 * Stop and unlock watchdog by writing 87h, 61h and 63h in wdt_npcx_disable()
312 /* Wait until watchdog is stopped. */ in wdt_npcx_disable()
322 /* Feed watchdog by writing 5Ch to WDSDM */ in wdt_npcx_feed()
347 * TWCFG (Timer Watchdog Configuration) setting in wdt_npcx_init()
349 * [5] - WDSDME = 1: Feed watchdog by writing 5Ch to WDSDM in wdt_npcx_init()
350 * [4] - WDCT0I = 1: Select T0IN as watchdog prescaler clock in wdt_npcx_init()
362 * Plan clock frequency of T0 timer and watchdog timer as below: in wdt_npcx_init()
364 * - Watchdog freq is T0CLK/32 Hz (ie. LFCLK/1024 Hz) in wdt_npcx_init()
366 inst->WDCP = 0x05; /* Prescaler is 32 in Watchdog Timer */ in wdt_npcx_init()