Disable Watchdog in manual mode
This commit is contained in:
parent
f9256860e8
commit
3fedb7117b
|
@ -141,6 +141,8 @@ const mission_t mission2next[] = {M_MANUAL , M_SKIDPAD , M_AUTOX , M_EBSTEST
|
|||
|
||||
mission_t mission = M_NONE;
|
||||
|
||||
bool setup_done = false;
|
||||
|
||||
#ifdef WATCHDOG_STM
|
||||
bool pHeartbeat = false;
|
||||
bool WD_OK = false;
|
||||
|
@ -268,11 +270,17 @@ int main(void)
|
|||
}
|
||||
}
|
||||
|
||||
MX_IWDG_Init();
|
||||
WD_initialized = true;
|
||||
setup_done = true;
|
||||
|
||||
// TEMP: Only enable WD if in autonomous mode because EMI currently messes it up during R2D
|
||||
if (HAL_GPIO_ReadPin(ASMS_GPIO_Port, ASMS_Pin) == GPIO_PIN_RESET) {
|
||||
MX_IWDG_Init();
|
||||
WD_initialized = true;
|
||||
}
|
||||
|
||||
while (true) {
|
||||
|
||||
// Compare with RESET for signals obtained via inverting buffer
|
||||
bool TS_activate_MUXed = HAL_GPIO_ReadPin(TS_activate_MUXed_GPIO_Port, TS_activate_MUXed_Pin) == GPIO_PIN_RESET;
|
||||
bool ASMS = HAL_GPIO_ReadPin(ASMS_GPIO_Port, ASMS_Pin) == GPIO_PIN_RESET;
|
||||
#ifdef WATCHDOG_UCC
|
||||
|
@ -513,7 +521,7 @@ void HAL_CAN_RxFifo0MsgPendingCallback(CAN_HandleTypeDef *hcan) {
|
|||
}
|
||||
pHeartbeat = rxData.signals.heartbeat;
|
||||
|
||||
bool close_sdc = WD_initialized && rxData.signals.as_close_sdc;
|
||||
bool close_sdc = setup_done && rxData.signals.as_close_sdc;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.stlink_txt_serial_number" value=""/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlink.watchdog_config" value="none"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkenable_rtos" value="false"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkrestart_configurations" value="{"fItems":[{"fDisplayName":"Reset","fIsSuppressible":false,"fResetAttribute":"Software system reset","fResetStrategies":[{"fDisplayName":"Software system reset","fLaunchAttribute":"system_reset","fGdbCommands":["monitor reset\n"],"fCmdOptions":["-g"]},{"fDisplayName":"Hardware reset","fLaunchAttribute":"hardware_reset","fGdbCommands":["monitor reset hardware\n"],"fCmdOptions":["-g"]},{"fDisplayName":"Core reset","fLaunchAttribute":"core_reset","fGdbCommands":["monitor reset core\n"],"fCmdOptions":["-g"]},{"fDisplayName":"None","fLaunchAttribute":"no_reset","fGdbCommands":[],"fCmdOptions":["-g"]}],"fGdbCommandGroup":{"name":"Additional commands","commands":[]}}]}"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.debug.stlinkrestart_configurations" value="{"fVersion":1,"fItems":[{"fDisplayName":"Reset","fIsSuppressible":false,"fResetAttribute":"Software system reset","fResetStrategies":[{"fDisplayName":"Software system reset","fLaunchAttribute":"system_reset","fGdbCommands":["monitor reset\n"],"fCmdOptions":["-g"]},{"fDisplayName":"Hardware reset","fLaunchAttribute":"hardware_reset","fGdbCommands":["monitor reset hardware\n"],"fCmdOptions":["-g"]},{"fDisplayName":"Core reset","fLaunchAttribute":"core_reset","fGdbCommands":["monitor reset core\n"],"fCmdOptions":["-g"]},{"fDisplayName":"None","fLaunchAttribute":"no_reset","fGdbCommands":[],"fCmdOptions":["-g"]}],"fGdbCommandGroup":{"name":"Additional commands","commands":[]},"fStartApplication":true}]}"/>
|
||||
<booleanAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.enableRtosProxy" value="false"/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyCustomProperties" value=""/>
|
||||
<stringAttribute key="com.st.stm32cube.ide.mcu.rtosproxy.rtosProxyDriver" value="threadx"/>
|
||||
|
|
Loading…
Reference in New Issue