2015-10-10 11:29 AM
Hello.
I have some problem and I can't do anything with it. So, I have CAN bus with two CAN. uP is stm32f407. When is normal work i send data by HAL_CAN_Transmit(&hcan2,5), and HAL_CAN_Transmit(&hcan1,5). I received them by HAL_CAN_ErrorCallback(CAN_HandleTypeDef* hcan). It is good until it not have any error. When error occurs then is invoking the errorcallback. Before that is invoked one of the function voidCAN1_SCE_IRQHandler(void) or void CAN2_SCE_IRQHandler(void). When one time occurs error, then every next time is invoked CAN_SCE_IRQ ,although dont have any error (don't have any errorcode, and every value REC, TEC and LEC is 0). Who tell me why? I add that, before occurs the first errorcallback, function CAN_SCE is never invoked.It cause that the main program is stopped, because it's all the time invoked one of the function CAN2_SCE_IRQHandler(void), CAN1_SCE_IRQHandler(void). What i can do?When i cleared ERRIE, then the CAN2_SCE_IRQHandler is not invoked. So it is something with ESR register. But it is equal to 0.2015-11-02 02:08 AM
Hi Sorix,
As you have already mentioned it, the problem root cause is a missing clear of ERRI flag in MSR register.This bug will be fixed in coming versions of STM32Cube packages.-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.