CAN0 : RX packets errors in iMX6Q

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

CAN0 : RX packets errors in iMX6Q

2,625 次查看
NANDESHSG
Contributor I

Hi All. 

I am working on iMX6Q Custom board and i am using the Yocto Project Linux kernel Version 4.9.168,

in our project we are using msp432e (MSP432E401Y Arm® Cortex®-M4F, windows Environment)  and iMX6Q processor (Linux Environment), The controller and processor interface using the CAN communication and both set to 1Mbps baud rate with triple sampling on, 

In Imx6Q side some CAN frame are missing. to find the missing frames one side i used the CAN sniper in between msp432 and iMX6Q to get the data before reaching to imx6q, the CAN sniper connected to the linux pc or busmaster pc tool and other side  i get the data from imx6q on target board,  then i compare the both the logs, in iMX6q side frames are missing please refer the below image. 

and on target side if i execute the ifconfig command in RX Packet errors are more appeared. 

Can any one help me to resolve this issue, 

I tried to decrease the baud rate 500000 also not work, and increase the #define FLEXCAN_MB_SIZE 16 to 32 here also Fail in CAN communication.   

NANDESHSG_1-1633622372007.png

 

NANDESHSG_0-1633622165604.png

 

0 项奖励
回复
5 回复数

2,509 次查看
NANDESHSG
Contributor I

Hello  All, 

i am trying to change the timeout delay as 50 to 250,

#define FLEXCAN_TIMEOUT_US (50)  and

/* 8 for RX fifo and 2 error handling */
#define FLEXCAN_NAPI_WEIGHT (8 + 2) as #define FLEXCAN_NAPI_WEIGHT ( 64 ) /* 64 MB's */ 
but when is increase the time out error occurred bit late. but issue is same, can any one help me to come out of this problem.

Best Regards

Nandish S.G  

 

0 项奖励
回复

2,597 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Nandish

 

for that issue may be recommended to try nxp linux from source.codeaurora.org/external/imx/linux-imx repository (as linux kernel version 4.9.168 is not supported by nxp)

https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_4.9.88_2.0.0_ga

use simple can tests:

https://source.codeaurora.org/external/imx/imx-test/tree/test/can/doc?h=imx_4.9.88_2.0.0_ga

 

Best regards
igor

0 项奖励
回复

2,618 次查看
kef2
Senior Contributor V

It could be timing mismatch. Perhaps odd CAN module clock on either iMX or MSP432, something like 66.(6) MHz, which doesn't divide by CAN bit rate. You may check it with 

ip -details link show can0

 

0 项奖励
回复

2,608 次查看
NANDESHSG
Contributor I

Hi  Kef2,

Thanks for your quick reply, 

i executed the above command it gives the following result. 

NANDESHSG_0-1633672806859.png

 

BR

SGN

0 项奖励
回复

2,600 次查看
kef2
Senior Contributor V

30.0 MHz is OK. 

Then try checking timings using scope. Disconnect node from the bus, let it send something and observe minimum pulse width on CANH/CANL. It should precisely match expected bitrate, 1.0us for 1Mbps, 2.0us for 500kbps etc. Any visible timing mismatch confirms timing is bad. Repeat the same with you other node.

Edward

 

0 项奖励
回复