Skip to content

Commit 6b272e2

Browse files
kasjerutzig
authored andcommitted
mynewt: Start watchdog when enable by syscfg
Code implied that WATCHDOG_INTERVAL will enable watchdog in bootloader however it never did hal_watchdog_init sets up some watchdog data but for most mcu is does not start watchdog. Now hal_watchdog_enable() is called when WATCHDOG_INTERVAL is set to non zero as git history suggested . Signed-off-by: Jerzy Kasenberg <jerzy@apache.org>
1 parent 572b8fb commit 6b272e2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

boot/mynewt/src/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ mynewt_main(void)
226226
#if !MYNEWT_VAL(OS_SCHEDULING) && MYNEWT_VAL(WATCHDOG_INTERVAL)
227227
rc = hal_watchdog_init(MYNEWT_VAL(WATCHDOG_INTERVAL));
228228
assert(rc == 0);
229+
hal_watchdog_enable();
229230
#endif
230231

231232
#if defined(MCUBOOT_SERIAL) || defined(MCUBOOT_HAVE_LOGGING) || \

0 commit comments

Comments
 (0)