boot: zephyr: setup watchdog
The Zephyr watchdog API defines a setup function. This function needs to
be executed before the watchdog is functional in some cases. This commit
adds MCUBOOT_WATCHDOG_SETUP when using the generic watchdog0 alias
otherwise it is an empty define.
Fixes https://github.com/mcu-tools/mcuboot/issues/1659
Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
diff --git a/boot/zephyr/main.c b/boot/zephyr/main.c
index 2deef1e..50b9870 100644
--- a/boot/zephyr/main.c
+++ b/boot/zephyr/main.c
@@ -509,6 +509,7 @@
uint32_t reset_cause;
#endif
+ MCUBOOT_WATCHDOG_SETUP();
MCUBOOT_WATCHDOG_FEED();
#if !defined(MCUBOOT_DIRECT_XIP)