STM32G431 FDCAN get into bus off status
Why STM32G431 CAN get into bus off status? I cannot find the reason in the reference manual.
Why STM32G431 CAN get into bus off status? I cannot find the reason in the reference manual.
This is a pure CAN protocol question and it's not related to the MCU itself.
Example read this article: https://www.linkedin.com/pulse/can-buss-off-management-vikesh-kumar-mishra/
Watch this: https://www.youtube.com/watch?v=jxLxf1Mnu68
HOT connecting and disconnecting to the CAN bus during communication could result to CAN communication errors. So you need to recover from the bus off state as described in the reference manual:

For example, try this code for example to recover from the bus off state:
if((*FDCAN1).PSR & FDCAN_PSR_BO) /* If the node goes to the Bus-off state */
{
(*FDCAN1).CCCR &= ~FDCAN_CCCR_INIT; /* Clear CCCR.INIT bit to exit from Bus-off state*/
while (((*FDCAN1).CCCR & FDCAN_CCCR_INIT) != 0); // wait for synchronization
}
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.