CAN protocol test on imx6 sabrelite board

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

CAN protocol test on imx6 sabrelite board

Jump to solution
15,750 Views
skurudi
Contributor II

Has anybody tested CAN protocol in imx6 sabrelite board?

Labels (2)
1 Solution
4,382 Views
RandyKrakora
NXP Employee
NXP Employee

I don’t know if it will cleanly apply to 12.08, but here it is:

https://github.com/boundarydevices/linux-imx6/commit/1bb46c20158b880950c5cb98cd76d149963a1c28

Regards,

Randy Krakora

Field Applications Engineer

Freescale Semiconductor

(765)-860-6622

View solution in original post

16 Replies
4,382 Views
RandyKrakora
NXP Employee
NXP Employee

We've tested it on Rev. C and Rev. D Sabre Lite boards. It's a little different HW between the two, but they both work.

-Randy

0 Kudos
4,382 Views
skurudi
Contributor II

Thx for your reply. We are using sabrelite rev D board. We Tried to test with cantest (LTIB utils) between two peers connected by molex 3 pin connector. The problem, we are experiencing - unable to see tx / rx pkt handshake with in two peer imx6 board, Though I can see Rx pkt count increasing for every "cantest can0 1234#1234567890", but peer side "cantest can0 &" NOT able to recieve can pkt.

Can you please suggest, is cantest right utility to test? Is my test env correct? Appreciate if you share your CAN utility or pointers.

Thanks in advance.

0 Kudos
4,382 Views
RandyKrakora
NXP Employee
NXP Employee

What BSP are you using? There is a patch for Rev. D HW, because it uses a different CAN transceiver ( which has a different polarity of the STBY input ).

If you are using an older BSP, Boundary has a patch to install.

Regards,

Randy Krakora

Field Applications Engineer

Freescale Semiconductor

(765)-860-6622

0 Kudos
4,382 Views
skurudi
Contributor II

We are using Freescale beta release 3.0 kernel, L3.0.35_12.08.00_ER_source.tar.gz. I am not sure about above patch present in release.

Can you please suggest patch reference .. may be commit id(git repo), It will help greatly.

Thanks again.

0 Kudos
4,383 Views
RandyKrakora
NXP Employee
NXP Employee

I don’t know if it will cleanly apply to 12.08, but here it is:

https://github.com/boundarydevices/linux-imx6/commit/1bb46c20158b880950c5cb98cd76d149963a1c28

Regards,

Randy Krakora

Field Applications Engineer

Freescale Semiconductor

(765)-860-6622

4,382 Views
skurudi
Contributor II

Thanks a lot. The patch applied cleanly. I was able to test CAN successfully. Thanks a lot for your timely reply.

Regards

Sharath

0 Kudos
4,382 Views
praveeng
Contributor II

Hello Sharath,

The  CAN communicatio for my iMX6q Sabrelite development board´is not working. Currently I am using kernel 2,6,38 where the CAN is disabled.

I have downloaded the kernel

https://github.com/boundarydevices/linux-imx6/tree/L3.0.35_12.09.03

Will the above patch posted by Randalla .K applicable for me too?

This is the first time I am compiling a Kenel, I want all the peripherals to be enabled .

Do you have any documentation/Suggestion so that I can just compile and get the Kernel IMG.

Currently I have a root file system over NFS and few application which work on Kernel version2,6,38

Best Regards,

Praveen G


0 Kudos
4,382 Views
RandyKrakora
NXP Employee
NXP Employee

What version of Sabre Lite board do you have? Rev. D? Or Rev. C?

Regards,

Randy

0 Kudos
4,382 Views
praveeng
Contributor II

Hi Randall,

I added a freescale BSP for CAN to my kernel version 2.6.38...I also see that a Socket CAN connection can be opened, but when I write send a CAN frame by just writing , it shows "Network down"... Can you please tell me where should I check to fix this error... I am using MCZ33902 CAN Transreceiver . . ... Further I have just given CAN_H and CAN_L connections from J22(8 pin molex) to the DB9 connector of CANcaseXL.

Regards,

Praveen

0 Kudos
4,382 Views
RandyKrakora
NXP Employee
NXP Employee

Did you try this:

ip link set can0 up type can bitrate 125000

ip -details -statistics link show can0

cantest can0 100#1122334455667788

Regards,

Randy Krakora

Field Applications Engineer

Freescale Semiconductor

(765)-860-6622

0 Kudos
4,382 Views
praveeng
Contributor II

Yes , I did try this from

http://www.armadeus.com/wiki/index.php?title=CAN_bus_Linux_driver#Driver_installation

However I find no 'ip' file which can support type ''can''.

Can you please tell me How do I configure the network so that my CAN tranreciever works.

Below is the failed attempt:

root@freescale ~$ ip link set can0 up type can bitrate 125000

ip: either "dev" is duplicate, or "type" is garbage

root@freescale ~$ which ip

/sbin/ip

root@freescale ~$ ifconfig can0 up

ifconfig: SIOCSIFFLAGS: Invalid argument

root@freescale ~$ ifconfig can0

can0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00

          NOARP  MTU:16  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:10

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

          Interrupt:142

0 Kudos
4,382 Views
RandyKrakora
NXP Employee
NXP Employee

So you are using 2.6.38 kernel? Did you build it yourself from ltib?

If you have the 12.08 BSP, why not use the later kernel? 3.0.35? I am currently using 12.09 BSP images ( rfs and 3.0.35 kernel ) and the ip commands all work for me.

Maybe the iproute package needs updated in your rfs? I would recommend updating to the 12.09 BSP ( at least try the kernel and rfs images first ), unless there is a specific reason you are using 2.6.38?

0 Kudos
4,382 Views
praveeng
Contributor II

Since many guys (in Continental) work on the kernel 2.6.38 , I wish not to change it

I will try and install the IP route package .

Later, Is it possible to include the CAN ISOTP  package ?.

What are the dependencies (modules like timers ...etc)  are needed  to make it compilable with kernel version 2.6.38?

0 Kudos
4,382 Views
RandyKrakora
NXP Employee
NXP Employee

What BSP are you using then? Is it 12.09 just building for 2.6.38? I would think since you are all using Sabre Lite you would want to use 12.09 BSP and 3.0.35 kernel, as there are updates that you might want to take advantage of. Maybe if you show the 3.0.35 kernel works well for you, others will update?

0 Kudos
4,382 Views
mohammedzakariy
Contributor I

12.09 BSP and 3.0.35 kernel works fine for CAN on Sabre Lite Rev D.

I have Tested it,for initial trials there is ready made application name "cantest" in /user/bin else we can creat our own application.

0 Kudos
4,379 Views
praveeng
Contributor II

Its Sabre Lite board Rev. D.?

Is there any documentation or minimum set of commands to compile the Kernel?

0 Kudos