Commit 6b272e20 authored by Jerzy Kasenberg's avatar Jerzy Kasenberg Committed by Fabio Utzig
Browse files

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: default avatarJerzy Kasenberg <jerzy@apache.org>
parent 572b8fb2
Loading
Loading
Loading
Loading
+1 −0
Changes for boot/mynewt/src/main.c: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -226,6 +226,7 @@ mynewt_main(void)
#if !MYNEWT_VAL(OS_SCHEDULING) && MYNEWT_VAL(WATCHDOG_INTERVAL)
    rc = hal_watchdog_init(MYNEWT_VAL(WATCHDOG_INTERVAL));
    assert(rc == 0);
    hal_watchdog_enable();
#endif

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