summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/zinger/hardware.c2
-rw-r--r--board/zinger/usb_pd_policy.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/board/zinger/hardware.c b/board/zinger/hardware.c
index 0bafa48839..52d2f4e057 100644
--- a/board/zinger/hardware.c
+++ b/board/zinger/hardware.c
@@ -13,6 +13,7 @@
#include "task.h"
#include "timer.h"
#include "util.h"
+#include "watchdog.h"
static void clock_init(void)
{
@@ -164,6 +165,7 @@ void hardware_init(void)
pins_init();
uart_init();
timers_init();
+ watchdog_init();
adc_init();
irq_init();
}
diff --git a/board/zinger/usb_pd_policy.c b/board/zinger/usb_pd_policy.c
index c8dfcb0ea2..1b52d0876c 100644
--- a/board/zinger/usb_pd_policy.c
+++ b/board/zinger/usb_pd_policy.c
@@ -186,6 +186,9 @@ int pd_board_checks(void)
int vbus_volt, vbus_amp;
int watchdog_enabled = STM32_ADC_CFGR1 & (1 << 23);
+ /* Reload the watchdog */
+ STM32_IWDG_KR = STM32_IWDG_KR_RELOAD;
+
if (watchdog_enabled)
/* if the watchdog is enabled, stop it to do other readings */
adc_disable_watchdog();