Vybrid FlexCAN and Timesys linux

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

Vybrid FlexCAN and Timesys linux

Jump to solution
1,498 Views
kef2
Senior Contributor IV

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

Labels (4)
0 Kudos
1 Solution
822 Views
kef2
Senior Contributor IV

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.

View solution in original post

0 Kudos
8 Replies
822 Views
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 Kudos
822 Views
kef2
Senior Contributor IV

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 Kudos
822 Views
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 Kudos
822 Views
kef2
Senior Contributor IV

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

Thanks for KGDB, I'll look at it.

Regards,

Edward

0 Kudos
822 Views
kef2
Senior Contributor IV

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 Kudos
822 Views
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 Kudos
822 Views
karina_valencia
NXP Apps Support
NXP Apps Support

Ed, can you share the progress here?

0 Kudos
823 Views
kef2
Senior Contributor IV

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 Kudos