regarding ERROR frame

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

regarding ERROR frame

1,843 Views
arvindupadhyay
Contributor II

Hi Friends,

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.

Regards,

Arvind

Tags (1)
0 Kudos
Reply
4 Replies

1,387 Views
allen_willson
NXP Employee
NXP Employee

Hello Arvind,

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. 

Thank you!

-allen

0 Kudos
Reply

1,387 Views
arvindupadhyay
Contributor II

Hi allen,

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, "allen.willson@nxp.com" <admin@community.nxp.com>

0 Kudos
Reply

1,387 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi Arvind,

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 influence 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.

BR, Petr

0 Kudos
Reply

1,387 Views
arvindupadhyay
Contributor II

Hi Petr,

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.

Regards,

Arvind 

0 Kudos
Reply