WDT at 500ms. Needs thorough checking
This commit is contained in:
@@ -2649,7 +2649,7 @@ void opentxInit(OPENTX_INIT_ARGS)
|
||||
|
||||
startPulses();
|
||||
|
||||
wdt_enable(WDTO_500MS);
|
||||
wdt_enable(WDT_500MS);
|
||||
}
|
||||
|
||||
#if defined(SIMU)
|
||||
|
||||
@@ -1746,4 +1746,6 @@ extern JitterMeter<uint16_t> rawJitter[NUMBER_ANALOG];
|
||||
extern JitterMeter<uint16_t> avgJitter[NUMBER_ANALOG];
|
||||
#endif // defined(JITTER_MEASURE)
|
||||
|
||||
#define WDT_500MS 500
|
||||
|
||||
#endif // _OPENTX_H_
|
||||
|
||||
@@ -211,7 +211,7 @@ void watchdogInit(unsigned int duration);
|
||||
#define wdt_enable(x)
|
||||
#define wdt_reset()
|
||||
#else
|
||||
#define wdt_enable(x) watchdogInit(1500)
|
||||
#define wdt_enable(x) watchdogInit(x)
|
||||
#define wdt_reset() IWDG->KR = 0xAAAA
|
||||
#endif
|
||||
#define WAS_RESET_BY_WATCHDOG() (RCC->CSR & (RCC_CSR_WDGRSTF | RCC_CSR_WWDGRSTF))
|
||||
|
||||
@@ -233,7 +233,7 @@ void checkRotaryEncoder(void);
|
||||
#if !defined(SIMU)
|
||||
#define wdt_disable()
|
||||
void watchdogInit(unsigned int duration);
|
||||
#define wdt_enable(x) watchdogInit(1500)
|
||||
#define wdt_enable(x) watchdogInit(x)
|
||||
#define wdt_reset() IWDG->KR = 0xAAAA
|
||||
#define WAS_RESET_BY_SOFTWARE() (RCC->CSR & RCC_CSR_SFTRSTF)
|
||||
#define WAS_RESET_BY_WATCHDOG() (RCC->CSR & (RCC_CSR_WDGRSTF | RCC_CSR_WWDGRSTF))
|
||||
|
||||
Reference in New Issue
Block a user