Currently I am using FlexCAN, I am having doubt like If any error occur during reception or transmission than ERROR will be transmitted by user or FlexCAN itself will send ERROR frame.
The FlexCAN will generate error frames under conditions defined by the CAN protocol. A user software cannot control if or when error frames are generated.
if i configure auto busoff recovery which is available in flexcan_ctr1
register, than 128th 11 consicutive bit flexcan its self will transmit on
can bus and reciver.
i just want to know how auto busoff recovery is working in flexcan.
On 22 Mar 2017 21:38, "firstname.lastname@example.org" <email@example.com>
Yes, as Alan wrote, once a FlexCAN module detects an error, it automatically sends an error frame and TX/RX error counters are updated according the CAN protocol. If the TX error counter becomes greater than 255 the module enters Bus-off state.
A Bus-off node is not allowed to have any inﬂuence on the bus, so output driver is switched off. The node only monitors the bus to be able to count 128 occurrences of 11 consecutive recessive bits.
So if auto Bus-off recovery is enabled and FlexCAN enters Bus-off state, after 128 sequences of 11 recessive bits occurred on the bus, then FlexCAN will automatically re-synchronizes to the bus by waiting for 11 recessive bits before joining the bus. Then it starts to transmit messages again.
Thank you for your explanation, it helps me a lot to understand busoff recovery by flexcan.
To simulate busoff condition i shot CAN_H and CAN_L, and enable CAN_CTRL1[BOFFREC] = 0. I am getting busoff occur interrupt and busoff done interrupt, i am not getting in this case who is sending 128th 11 successive consecutive recessive , and how busoff is recovering and busoff done interrupt is getting triggered.
Retrieving data ...