5748G CAN bus frame drop problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

5748G CAN bus frame drop problem

跳至解决方案
891 次查看
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?

标签 (1)
0 项奖励
1 解答
765 次查看
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

在原帖中查看解决方案

4 回复数
765 次查看
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 项奖励
765 次查看
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 项奖励
766 次查看
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

765 次查看
longfeiwang
Contributor III

This demo project is very useful thanks

0 项奖励