How to stop FlexCan "CAN_RX_MSG_BUFFER_OVERRUN", message rate to high, how to select just one message every 100ms

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

How to stop FlexCan "CAN_RX_MSG_BUFFER_OVERRUN", message rate to high, how to select just one message every 100ms

512 Views
Cdn_aye
Senior Contributor I

We are using a k20dx256 with the FlexCan controllers.

The test code works fine from MQX between two of our boards, when I attach a third node and try to read the messages I get an error, CAN_RX_MSG_BUFFER_OVERRUN.

In looking at the sending node I can see it is dumping messages on the bus at about 1k/sec. The first message is received correctly and then all others get the overrun error. I think the data is invalid in the mailbox because of the overrun error. It does not change and should be changing.


I don't have control over the sender of the messages, so I would like to read messages at the rate of 10/sec instead of 1000/sec. But I am not sure how to do this or the best practice. Should I turn off interrupts and is there then a polling mechanism, or should I disable and re-enable the interrupts based on a timer for a single message.

I am trying to learn the basics of FlexCan so any help would be very welcome.

Robert

0 Kudos
1 Reply

307 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Robert

There is an API "flexcan_set_bitrate" in FSL FlexCAN driver,  not sure whether it is what you are looking for.

Can you specify you detail settings of each node?

Regards

Daniel

0 Kudos