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:
@@ -18,6 +18,7 @@ option(AUTOSOURCE "Automatic source detection in menus" ON)
|
|||||||
option(AUTOSWITCH "Automatic switch detection in menus" ON)
|
option(AUTOSWITCH "Automatic switch detection in menus" ON)
|
||||||
option(JITTER_MEASURE "Enable ADC jitter measurement" OFF)
|
option(JITTER_MEASURE "Enable ADC jitter measurement" OFF)
|
||||||
option(JITTER_FILTER "Enable ADC jitter filtering" ON)
|
option(JITTER_FILTER "Enable ADC jitter filtering" ON)
|
||||||
|
option(WATCHDOG_DISABLED "Disable hardware Watchdog on Horus" ON)
|
||||||
|
|
||||||
enable_language(ASM)
|
enable_language(ASM)
|
||||||
set(OPT s)
|
set(OPT s)
|
||||||
@@ -784,6 +785,10 @@ if(JITTER_FILTER)
|
|||||||
add_definitions(-DJITTER_FILTER)
|
add_definitions(-DJITTER_FILTER)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WATCHDOG_DISABLED)
|
||||||
|
add_definitions(-DWATCHDOG_DISABLED)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(SDCARD)
|
if(SDCARD)
|
||||||
add_definitions(-DSDCARD)
|
add_definitions(-DSDCARD)
|
||||||
include_directories(${FATFS_DIR} ${FATFS_DIR}/option)
|
include_directories(${FATFS_DIR} ${FATFS_DIR}/option)
|
||||||
|
|||||||
+7
-1
@@ -272,7 +272,13 @@ int cliMemoryInfo(const char ** argv)
|
|||||||
int cliReboot(const char ** argv)
|
int cliReboot(const char ** argv)
|
||||||
{
|
{
|
||||||
#if !defined(SIMU)
|
#if !defined(SIMU)
|
||||||
NVIC_SystemReset();
|
if (!strcmp(argv[1], "wdt")) {
|
||||||
|
// do a user requested watchdog test by pausing mixer thread
|
||||||
|
pausePulses();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
NVIC_SystemReset();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,8 +202,13 @@ void checkRotaryEncoder(void);
|
|||||||
#if !defined(SIMU)
|
#if !defined(SIMU)
|
||||||
#define wdt_disable()
|
#define wdt_disable()
|
||||||
void watchdogInit(unsigned int duration);
|
void watchdogInit(unsigned int duration);
|
||||||
#define wdt_enable(x) // watchdogInit(1500)
|
#if defined(WATCHDOG_DISABLED)
|
||||||
#define wdt_reset() // IWDG->KR = 0xAAAA
|
#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_WATCHDOG() (RCC->CSR & (RCC_CSR_WDGRSTF | RCC_CSR_WWDGRSTF))
|
||||||
#define WAS_RESET_BY_SOFTWARE() (RCC->CSR & RCC_CSR_SFTRSTF)
|
#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))
|
#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