Question
CAN Stuff Error - Acknowledge
Posted on July 23, 2015 at 11:27
I have a problem with the CAN Interrupt.
My application is only listening, then I disconnect the CAN plug and get sometimes a CAN Stuff Error, this is ok, because it happens really.I read out the error and acknowlege in the HAL_CAN_IRQHandler.after reading the LEC bits are 0x00only the Error Interrupt is not cleared -> ERRI is always 1. Therefore the CAN Interface generates always new interrupts and never comes back.The only solution for the moment is to shut down the whole system by: HAL_NVIC_SystemReset(); inside the ErrorHandler function.Is there really no better solution?I tried with HAL_CAN_DeInit() but this does not clear the ERRI bit. #stm32 #can