summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoe Xu <[email protected]>2019-01-07 00:27:01 -0800
committerNoe Xu <[email protected]>2019-01-13 23:37:15 -0800
commit5e47dc41b3b28534782ed6f7447e46badae6bb9a (patch)
tree00d87faf18c81a679161e191d326ee5189f34ad7
parentd55a9cd62ab936711d07c22c37fc978be896b84b (diff)
[STM32] Fix issue that CAN driver won't receive any messages once OV iterrupt occurs.
Change-Id: I4cd98ca4840f32925e89e8c467ec78e03e9a2836
-rw-r--r--bsp/stm32f4xx-HAL/drivers/drv_can.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/bsp/stm32f4xx-HAL/drivers/drv_can.c b/bsp/stm32f4xx-HAL/drivers/drv_can.c
index 603a2a745b..c19ce2584e 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);
}
/**