File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 #include " watchdog.h"
3131 #include < IWatchdog.h>
3232
33- void watchdog_init () { IWatchdog.begin (4000000 ); } // 4 sec timeout
33+ void watchdog_init () {
34+ #if DISABLED(DISABLE_WATCHDOG_INIT)
35+ IWatchdog.begin (4000000 ); // 4 sec timeout
36+ #endif
37+ }
3438
3539 void HAL_watchdog_refresh () {
3640 IWatchdog.reload ();
Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ void watchdogSetup() {
5252 * @details The watchdog clock is 40Khz. We need a 4 seconds interval, so use a /256 preescaler and 625 reload value (counts down to 0)
5353 */
5454void watchdog_init () {
55- // iwdg_init(IWDG_PRE_256, STM32F1_WD_RELOAD);
55+ #if DISABLED(DISABLE_WATCHDOG_INIT)
56+ iwdg_init (IWDG_PRE_256, STM32F1_WD_RELOAD);
57+ #endif
5658}
5759
5860#endif // USE_WATCHDOG
Original file line number Diff line number Diff line change 3333 #define BOARD_INFO_NAME "Malyan M200"
3434#endif
3535
36+ // Prevents hanging from an extra watchdog init
37+ #define DISABLE_WATCHDOG_INIT
38+
3639// Assume Flash EEPROM
3740#if NO_EEPROM_SELECTED
3841 #define FLASH_EEPROM_EMULATION
You can’t perform that action at this time.
0 commit comments