Open AIRs in error handlers

This commit is contained in:
Jasper Blanckenburg 2023-04-15 22:12:35 +02:00
parent ca6bdec839
commit e86a0f90fb
2 changed files with 8 additions and 0 deletions

View File

@ -376,6 +376,9 @@ void Error_Handler(void) {
/* User can add his own implementation to report the HAL error return state */
__disable_irq();
while (1) {
ts_sm_set_relay_position(RELAY_NEG, 0);
ts_sm_set_relay_position(RELAY_POS, 0);
ts_sm_set_relay_position(RELAY_PRECHARGE, 0);
}
/* USER CODE END Error_Handler_Debug */
}

View File

@ -74,6 +74,7 @@ void NMI_Handler(void)
/* USER CODE BEGIN NonMaskableInt_IRQn 1 */
while (1)
{
Error_Handler();
}
/* USER CODE END NonMaskableInt_IRQn 1 */
}
@ -89,6 +90,7 @@ void HardFault_Handler(void)
while (1)
{
/* USER CODE BEGIN W1_HardFault_IRQn 0 */
Error_Handler();
/* USER CODE END W1_HardFault_IRQn 0 */
}
}
@ -104,6 +106,7 @@ void MemManage_Handler(void)
while (1)
{
/* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
Error_Handler();
/* USER CODE END W1_MemoryManagement_IRQn 0 */
}
}
@ -119,6 +122,7 @@ void BusFault_Handler(void)
while (1)
{
/* USER CODE BEGIN W1_BusFault_IRQn 0 */
Error_Handler();
/* USER CODE END W1_BusFault_IRQn 0 */
}
}
@ -134,6 +138,7 @@ void UsageFault_Handler(void)
while (1)
{
/* USER CODE BEGIN W1_UsageFault_IRQn 0 */
Error_Handler();
/* USER CODE END W1_UsageFault_IRQn 0 */
}
}