Lines Matching full:wdt

13 #include <reg/wdt.h>
17 struct wdt_regs *wdt; member
26 /* WDT api functions */
33 printk("No valid WDT timeout installed"); in wdt_kb1200_setup()
43 cfg->wdt->WDTCFG = WDT_ADCO32K; in wdt_kb1200_setup()
45 cfg->wdt->WDTCFG = WDT_PHER32K; in wdt_kb1200_setup()
48 cfg->wdt->WDTPF = (WDT_HALF_WAY_EVENT | WDT_RESET_EVENT); in wdt_kb1200_setup()
49 /* WDT enable */ in wdt_kb1200_setup()
50 cfg->wdt->WDTCFG |= WDT_FUNCTON_ENABLE; in wdt_kb1200_setup()
60 if (!(cfg->wdt->WDTCFG & WDT_FUNCTON_ENABLE)) { in wdt_kb1200_disable()
63 /* WDT disable, write bit 7~4 = 1001b */ in wdt_kb1200_disable()
64 cfg->wdt->WDTCFG = (cfg->wdt->WDTCFG & ~WDT_FUNCTON_ENABLE) | WDT_DISABLE_PASSWORD; in wdt_kb1200_disable()
66 cfg->wdt->WDTPF = (WDT_HALF_WAY_EVENT | WDT_RESET_EVENT); in wdt_kb1200_disable()
67 /* Need disable IE,or the wdt-half-event interrupt will be entered */ in wdt_kb1200_disable()
68 cfg->wdt->WDTIE &= ~WDT_HALF_WAY_EVENT; in wdt_kb1200_disable()
85 cfg->wdt->WDTM = (config->window.max * 1000) / WDT_TICK_TIME_US; in wdt_kb1200_install_timeout()
87 if (cfg->wdt->WDTM < WDT_MIN_CNT) { in wdt_kb1200_install_timeout()
95 cfg->wdt->WDTCFG_T = WDT_RESET_WHOLE_CHIP_WO_GPIO; in wdt_kb1200_install_timeout()
98 cfg->wdt->WDTCFG_T = WDT_RESET_WHOLE_CHIP; in wdt_kb1200_install_timeout()
101 cfg->wdt->WDTCFG_T = WDT_RESET_ONLY_MCU; in wdt_kb1200_install_timeout()
107 cfg->wdt->WDTIE |= WDT_HALF_WAY_EVENT; in wdt_kb1200_install_timeout()
112 cfg->wdt->WDTIE |= WDT_HALF_WAY_EVENT; in wdt_kb1200_install_timeout()
126 if (!(cfg->wdt->WDTCFG & WDT_FUNCTON_ENABLE)) { in wdt_kb1200_feed()
130 cfg->wdt->WDTCFG |= WDT_FUNCTON_ENABLE; in wdt_kb1200_feed()
132 cfg->wdt->WDTPF = WDT_HALF_WAY_EVENT; in wdt_kb1200_feed()
146 static DEVICE_API(wdt, wdt_kb1200_api) = {
167 .wdt = (struct wdt_regs *)DT_INST_REG_ADDR(0),