zephyr/drivers/watchdog
Mulin Chao 1a2e59b2e9 driver: wdt: npcx: replace critical sections with timeout mechanism.
TWDT0 is loaded with a new value and the counter restarts counting with
it by written RST bit in Timer Control register (T0CSR) to 1. Then, the
RST bit in T0CSR register is cleared automatically on the 2nd rising
edge of T0IN clock. Since TWCP is set to 1:32, the maximum time that RST
bit is unset is 32 * (1 / 32768) ~= 980us.

Polling this bit within a critical section in current npcx watchdog
driver isn't a good approach since it might block the other interrupts
need to service them in time. This CL introduces a timeout mechanism and
removes the critical section to improve this disadvantage. Consider the
clock tolerance, 2 ms is a suitable timeout value for RST bit. We also
remove polling for WD_RUN bit in T0CSR. Npcx watchdog needs serval LFCLK
(32k Hz) clocks to stop watchdog. 1 ms is long enough for the timeout
mechanism.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-04-23 15:03:15 -05:00
..
CMakeLists.txt drivers: watchdog: cc32xx: Add support 2021-02-24 08:35:27 -06:00
Kconfig drivers: watchdog: cc32xx: Add support 2021-02-24 08:35:27 -06:00
Kconfig.cc32xx drivers: watchdog: cc32xx: Add support 2021-02-24 08:35:27 -06:00
Kconfig.cmsdk_apb Revert "drivers: watchdog: Remove useless Kconfig entry" 2020-09-09 17:19:43 +02:00
Kconfig.esp32
Kconfig.gecko drivers/watchdog: Add support for SiLabs Gecko Watchdog 2020-02-03 11:25:40 -08:00
Kconfig.mcux drivers: watchdog: mcux_wwdt: add driver for NXP LPC 55xxx WWDT 2020-08-04 15:13:25 -05:00
Kconfig.mcux_imx watchdog: Add watchdog driver 2020-10-23 12:52:13 +02:00
Kconfig.npcx drivers: wdt: add watchdog driver support for NPCX7 series. 2021-01-15 11:27:10 -05:00
Kconfig.nrfx
Kconfig.sam
Kconfig.sam0
Kconfig.sifive drivers: watchdog: implement SiFive FE310 watchdog driver 2021-01-14 21:31:05 -06:00
Kconfig.stm32 drivers/watchdog: stm32: Select watchdog using compatible 2021-02-02 08:15:51 -05:00
Kconfig.xec
wdt_cc32xx.c drivers: watchdog: cc32xx: Add support 2021-02-24 08:35:27 -06:00
wdt_cmsdk_apb.c drivers: watchdog: Convert drivers to new DT device macros 2020-12-11 08:14:23 -06:00
wdt_esp32.c device: Remove DEVICE_DT_DECLARE / DEVICE_DT_INST_DECLARE 2021-01-15 07:16:21 -06:00
wdt_gecko.c drivers: watchdog: Convert drivers to new DT device macros 2020-12-11 08:14:23 -06:00
wdt_handlers.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
wdt_iwdg_stm32.c drivers: watchdog: iwdg_stm32: Add support for STM32H7xx SoC 2021-02-17 16:19:21 -06:00
wdt_iwdg_stm32.h device: Apply driver_api/data attributes rename everywhere 2020-08-11 19:30:53 +02:00
wdt_mchp_xec.c device: Remove DEVICE_DT_DECLARE / DEVICE_DT_INST_DECLARE 2021-01-15 07:16:21 -06:00
wdt_mcux_imx_wdog.c drivers: watchdog: Convert drivers to new DT device macros 2020-12-11 08:14:23 -06:00
wdt_mcux_wdog32.c drivers: watchdog: NXP: Convert clock control to use DEVICE_DT_GET 2021-02-19 05:02:52 -06:00
wdt_mcux_wdog.c drivers: watchdog: NXP: Convert clock control to use DEVICE_DT_GET 2021-02-19 05:02:52 -06:00
wdt_mcux_wwdt.c drivers: watchdog: mcux_wwdt: fix validating window min vs max 2021-03-31 14:15:27 -05:00
wdt_npcx.c driver: wdt: npcx: replace critical sections with timeout mechanism. 2021-04-23 15:03:15 -05:00
wdt_nrfx.c device: Remove DEVICE_DT_DECLARE / DEVICE_DT_INST_DECLARE 2021-01-15 07:16:21 -06:00
wdt_sam0.c device: Remove DEVICE_DT_DECLARE / DEVICE_DT_INST_DECLARE 2021-01-15 07:16:21 -06:00
wdt_sam.c device: Remove DEVICE_DT_DECLARE / DEVICE_DT_INST_DECLARE 2021-01-15 07:16:21 -06:00
wdt_sifive.c watchdog: sifive: Remove use of DEVICE_DT_INST_DECLARE 2021-01-15 10:55:20 -05:00
wdt_wwdg_stm32.c drivers/watchdog: wwdg stm32: fix to support all available prescalers 2021-04-09 13:23:38 +02:00
wdt_wwdg_stm32.h device: Apply driver_api/data attributes rename everywhere 2020-08-11 19:30:53 +02:00