Delay transmission of every CAN message in CAN driver

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

Delay transmission of every CAN message in CAN driver

620 次查看
Jamier
Contributor III

HI,

I am using a imx8mm and Kirstone Yocto.

I have a requirement to delay the transmission of every CAN message by 1ms.

I have discovered I can't simply use msleep() in the mcp251xfd_start_xmit() function as that function does not execute in a thread. When I tried this, the kernel crashed.

I have found another way to use traffic control as described here linux - Netem - how to delay packets sent to/received from some host - Unix & Linux Stack Exchange but it relies on a qdisc kind of netem. This netem doesn't seem to be something that can be brought in to my Yocto build - at least I have been able to figure out how. Has anyone successfully been able to use netem with tc? 

Of course I can have a delay at the application level, and I am looking at that but it introduces other issues that I'd like to avoid.

Thanks.

 

0 项奖励
回复
1 回复

599 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

You can see the FlexCAN driver for MX8 in the documentation https://www.nxp.com/docs/en/reference-manual/IMX_REFERENCE_MANUAL.pdf  you can find the proper delay un CAN message, but the MX8MM don;t have CAN.

Regards

 

0 项奖励
回复