Vybrid FlexCAN and Timesys linux

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

Vybrid FlexCAN and Timesys linux

跳至解决方案
2,000 次查看
kef2
Senior Contributor V

Hello

Did anyone succeed to use Timesys linux FlexCAN driver? Any guidance available?

Looks like it is not possible to use existing FlexCAN driver with SocketCAN without mods to kernel sources. A piece of trouble for embedded linux newbe :-(
. Driver seems initializing, but no chances to make any canX device.

Edward

标签 (4)
0 项奖励
回复
1 解答
1,324 次查看
kef2
Senior Contributor V

Finally got some time to make it working. Perhaps not the right fix in the sense of Linux kernel coding rules (I'm newbe in Linux), etc, but at least it works with Timesys 3.0 kernel. Send/receive using cansend and candump tools, bitrate configuration with iproute2, all are working well. Those who are interested in, see attached sources for replacement in kernel sources. After enabling FlexCAN in kernel and compiling, can0 device in Linux will correspond to Vybrid CAN1, which is wired to and available in J3 connector on TWR-SER2 board.

在原帖中查看解决方案

0 项奖励
回复
8 回复数
1,324 次查看
timesyssupport
Senior Contributor II

Hello Edward,

Unfortunately, the FlexCAN driver is not validated in the Linux 3.0 release for the Vybrid Tower. If this is something you require, Timesys can assist under a services agreement. Let me know if you have any questions.

Thanks,

Timesys Support

0 项奖励
回复
1,324 次查看
kef2
Senior Contributor V

Thanks for reply. I don't mind is this driver validated or not, I would like this driver to work somehow. In fact it is partially integrated into kernel, so that we see some FlexCAN message at boot time, which doesn't mean driver is working. Driver is never probed, FlexCAN clocks are kept gated, no can? device accessible via ifconfig etc  etc.. Comparing Vybrid to other targets source files in kernel I found about 10 files which need to be modified to make it working. Now driver is probed, but something still is wrong, since kernel crashes. I'm trying to debug it using DS-5 for linux, but for some silly reason Vybrid Tower card CMSIS-DAP interface is not recognised by DS-5 for linux. DS-5 for Windows sees CMSIS-DAP, DS-5 for linux doesn't. I tried building OpenOCD and OpenOCD sees no problems communicating with CMSIS-DAP. Linux is very priceful :-(

Edward

0 项奖励
回复
1,324 次查看
timesyssupport
Senior Contributor II

Hello Edward,

When installing DS-5 for Linux, try doing so with 'sudo' - this is necessary for the CMSIS-DAP connection to succeed, as additional drivers will be installed.

If you are looking to debug the Linux kernel, and need to do more than use printk's, you can use KGDB. We have a document published that explains how to use KGDB:

https://linuxlink.timesys.com/docs/kgdb

Thanks,

Timesys Support

0 项奖励
回复
1,324 次查看
kef2
Senior Contributor V

DS-5 installer asks for sudo when installing. Yes, I did it.

Thanks for KGDB, I'll look at it.

Regards,

Edward

0 项奖励
回复
1,324 次查看
kef2
Senior Contributor V

Dear Karina Valencia Aguilar,

please stop producing false solved threads. No, my question is not answered, FlexCAN driver in TimeSys Linux is not working. Please don't fool people.

0 项奖励
回复
1,324 次查看
karina_valencia
NXP Apps Support
NXP Apps Support

HI  Ed,

please update the progress on this case  and  timesyssupport will continue with the follow up.

0 项奖励
回复
1,324 次查看
karina_valencia
NXP Apps Support
NXP Apps Support

Ed, can you share the progress here?

0 项奖励
回复
1,325 次查看
kef2
Senior Contributor V

Finally got some time to make it working. Perhaps not the right fix in the sense of Linux kernel coding rules (I'm newbe in Linux), etc, but at least it works with Timesys 3.0 kernel. Send/receive using cansend and candump tools, bitrate configuration with iproute2, all are working well. Those who are interested in, see attached sources for replacement in kernel sources. After enabling FlexCAN in kernel and compiling, can0 device in Linux will correspond to Vybrid CAN1, which is wired to and available in J3 connector on TWR-SER2 board.

0 项奖励
回复