Re #3340: Watchdog still disabled on Horus, but use -DWATCHDOG_DISABLED=OFF to enable it. Radio currently resets if WDT is enabled, because external module functions are not yet implemented. After the radio is stable default for WATCHDOG_DISABLED will be set to OFF
This commit is contained in:
@@ -202,8 +202,13 @@ void checkRotaryEncoder(void);
|
||||
#if !defined(SIMU)
|
||||
#define wdt_disable()
|
||||
void watchdogInit(unsigned int duration);
|
||||
#define wdt_enable(x) // watchdogInit(1500)
|
||||
#define wdt_reset() // IWDG->KR = 0xAAAA
|
||||
#if defined(WATCHDOG_DISABLED)
|
||||
#define wdt_enable(x)
|
||||
#define wdt_reset()
|
||||
#else
|
||||
#define wdt_enable(x) watchdogInit(1500)
|
||||
#define wdt_reset() IWDG->KR = 0xAAAA
|
||||
#endif
|
||||
#define WAS_RESET_BY_WATCHDOG() (RCC->CSR & (RCC_CSR_WDGRSTF | RCC_CSR_WWDGRSTF))
|
||||
#define WAS_RESET_BY_SOFTWARE() (RCC->CSR & RCC_CSR_SFTRSTF)
|
||||
#define WAS_RESET_BY_WATCHDOG_OR_SOFTWARE() (RCC->CSR & (RCC_CSR_WDGRSTF | RCC_CSR_WWDGRSTF | RCC_CSR_SFTRSTF))
|
||||
|
||||
Reference in New Issue
Block a user