File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
bsp/stm32/libraries/HAL_Drivers/drivers Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -615,10 +615,11 @@ void HAL_FDCAN_ErrorCallback(FDCAN_HandleTypeDef *hfdcan)
615615 {
616616 tmp_u32Errcount = st_DrvCan1 .fdcanHandle .Instance -> ECR ;
617617 tmp_u32status = st_DrvCan1 .fdcanHandle .Instance -> PSR ;
618-
619618 st_DrvCan1 .device .status .rcverrcnt = (tmp_u32Errcount >>8 )& 0x000000ff ;
620619 st_DrvCan1 .device .status .snderrcnt = (tmp_u32Errcount )& 0x000000ff ;
621620 st_DrvCan1 .device .status .lasterrtype = tmp_u32status & 0x000000007 ;
621+ rt_hw_can_isr (& st_DrvCan1 .device , RT_CAN_EVENT_TX_FAIL );
622+
622623 }
623624#endif /*BSP_USING_FDCAN1*/
624625 }
@@ -640,6 +641,7 @@ void HAL_FDCAN_ErrorCallback(FDCAN_HandleTypeDef *hfdcan)
640641 st_DrvCan2 .device .status .rcverrcnt = (tmp_u32Errcount >>8 )& 0x000000ff ;
641642 st_DrvCan2 .device .status .snderrcnt = (tmp_u32Errcount )& 0x000000ff ;
642643 st_DrvCan2 .device .status .lasterrtype = tmp_u32status & 0x000000007 ;
644+ rt_hw_can_isr (& st_DrvCan2 .device , RT_CAN_EVENT_TX_FAIL );
643645 }
644646#endif /*BSP_USING_FDCAN2*/
645647 }
You can’t perform that action at this time.
0 commit comments