From 0461692ea59ff27afc6911f026e1d271d43b5c03 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 22 Apr 2019 12:53:10 +1000 Subject: [PATCH] HAL_ChibiOS: enable watchdog on IOMCU --- libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp b/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp index 7664c4a9d9..5cfc416a2e 100644 --- a/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp +++ b/libraries/AP_HAL_ChibiOS/HAL_ChibiOS_Class.cpp @@ -204,15 +204,17 @@ static void main_loop() */ chThdSetPriority(APM_MAIN_PRIORITY); +#ifndef IOMCU_FW // setup watchdog to reset if main loop stops if (AP_BoardConfig::watchdog_enabled()) { stm32_watchdog_init(); } -#ifndef IOMCU_FW if (hal.util->was_watchdog_reset()) { AP::internalerror().error(AP_InternalError::error_t::watchdog_reset); } +#else + stm32_watchdog_init(); #endif while (true) {