5748G CAN bus frame drop problem

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

5748G CAN bus frame drop problem

Jump to solution
880 Views
longfeiwang
Contributor III

I have an application as follows:

can5 / can1 / can4 / can6 forwards the data through other buses after receiving the data on any one way. The requirement is not to drop frames, and the forwarding time difference cannot exceed 2ms (for example, data received from can5 to forwarded from can1 / can4 / can6).

The test plan is as follows:

DMA+FIFO enable DMA interrupt,can5 receive data can1 / can4 / can6 forward data received by can5。

1 When I continuously send the same message for example 0X100,Frame drop rate is 25%(From the test situation, 25% of the data is not forwarded by can1 / can4 / can6 )。

2 When the message  I send is as follows 0X100、0X105、0X10A....and Continuous sending,This situation can meet the delay conditions and there is no frame loss。

From the test situation, continuous sending the same data and continuous sending different data test results are different。Are there any optimization solutions or improvement suggestions for the first situation?

Labels (1)
0 Kudos
1 Solution
754 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if you want to use SDK driver, it is written in this way, you can try to modify it , but it is not recommended, unless you know well its functionality.

Some basic non-SDK code is given here; https://community.nxp.com/docs/DOC-328574 

BR, Petr

View solution in original post

4 Replies
754 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

there should be no difference with receiving messages with same ID and different IDs into RXFIFO, unless you have some user processing based on ID and new calling of FLEXCAN_DRV_RxFifo is done later or something like that.

So is the message rate on the bus similar for you 2 tests?

BR, Petr

0 Kudos
754 Views
longfeiwang
Contributor III

HI petr

The filter is not set to receive the specified ID ,I need to receive all the data on the bus.I think that if CAN + FIFO + DMA works in pingpong mode, it can solve the frame drop problem under certain circumstances(In this way, at least half of the time can handle DMA interrupted data), but the process expert can only configure the DMA TCD target buffer size to 1 and cannot enable the inthalf mode. Are there  some examples of this (pingpong) working mode for reference?

0 Kudos
755 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

if you want to use SDK driver, it is written in this way, you can try to modify it , but it is not recommended, unless you know well its functionality.

Some basic non-SDK code is given here; https://community.nxp.com/docs/DOC-328574 

BR, Petr

754 Views
longfeiwang
Contributor III

This demo project is very useful thanks

0 Kudos