2021-03-15 08:30 AM
In STM32F407, I have set bxCAN with CAN_MCR.ABOM=0 and CAN_MCR.NART=0.
With the bus lines after transceiver (PHY) left open, after trying to transmit, transmitter transmits continuously forever, with CAN_ESR.LEC=0b011 for Acknowledgement Error (which is expected, as there's no other party on the bus to acknowledge), and CAN_ESR.BOFF=0.
Also, CAN_ESR.TEC appears to permanently read 0x80.
Why?
Error management subchapter in RM0090 says:
The Bus-Off state is reached when TEC is greater than 255, this state is indicated by BOFF
bit in CAN_ESR register. In Bus-Off state, the bxCAN is no longer able to transmit and
receive messages.
[...]
If ABOM is cleared, the software must initiate the recovering sequence by requesting
bxCAN to enter and to leave initialization mode.
Can somebody please comment/explain this behaviour?
Thanks,
JW
2025-01-29 10:09 PM
I am facing the same issue on the STM32F69. When I disconnect bxCAN's CAN1 or CAN2 from the CAN bus, the Transmit Error Counter (TEC) in ESR register never exceeds 0x87, and the BOFF bit field is not set as expected.
AutoBusOff and AutoRetransmission are enabled in hcan2 initialize setting.
Thanks in advance.