diff --git a/bsp/stm32f4xx-HAL/drivers/drv_can.c b/bsp/stm32f4xx-HAL/drivers/drv_can.c index 603a2a745b908ea9b4d86c0021ef9d51b90fe031..c19ce2584ebecb761f74006c64780d5e59890f93 100644 --- a/bsp/stm32f4xx-HAL/drivers/drv_can.c +++ b/bsp/stm32f4xx-HAL/drivers/drv_can.c @@ -362,12 +362,16 @@ void CAN2_SCE_IRQHandler(void) */ void HAL_CAN_ErrorCallback(CAN_HandleTypeDef *hcan) { - /* TODO Error Callback */ - /* Prevent unused argument(s) compilation warning */ - UNUSED(hcan); - /* NOTE : This function Should not be modified, when the callback is needed, - the HAL_CAN_ErrorCallback could be implemented in the user file - */ + __HAL_CAN_ENABLE_IT(hcan, CAN_IT_EWG | + CAN_IT_EPV | + CAN_IT_BOF | + CAN_IT_LEC | + CAN_IT_ERR | + CAN_IT_FMP0| + CAN_IT_FOV0| + CAN_IT_FMP1| + CAN_IT_FOV1| + CAN_IT_TME); } /**