Can communication on MCIMX6DLAICPU2

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

Can communication on MCIMX6DLAICPU2

1,112 Views
abhirupmitra
Contributor II

Hi ,

I want to do can communication on two imx6 ( MCIMX6DLAICPU2 ) boards which has can interfaces along with  baseboard ( MCIMXABASEV1 ). The driver is already enabled , so I would like to know the procedure further.

If possible can you provide some sample application for experimenting purpose.

Thanks and Regards,

Abhirup Mitra

Labels (5)
4 Replies

864 Views
abhirupmitra
Contributor II

Hi  Artur ,

Thanks for your response ! 

As you mentioned above , I reffered the reference manual and tried :

$ip link set can0 up type can bitrate 125000

I was able to see logs by dmesg command and the interface was ready. But when I tried with cansend and candump command I was unable to get the can frames.

Also I noticed as I typed the following in command prompt:

$ip -details -statistics link show can0

It showed the can state as BUS OFF which was previously ERROR-ACTIVE.

I tried to restart the interface and again send cansend message but still it persist to give same output.

I used this cansend command:

$ cansend  123#112233445566

I also tried connecting two IMX boards , CAN_HI to CAN_HI and CAN_LOW to CAN_LOW taking reference from schematics and tried communicating with cansend and candump on the boards respectively , but still I was unable to see any can communication.

Please let me know how can I solve the problem?

Thanks and Regards,

Abhirup Mitra

0 Kudos

864 Views
indrajitkumar
Contributor II

Hi Abhirup Mithra,

I am also trying for getting CAN protocol up on the same boards (MCIMX6DLAICPU2 & MCIMXABASEV1). And I have also gone through i.MX_Linux_Reference_Manual.pdf regarding the configuration settings while doing menuconfig.

Unfortunately, I am not succeeding on this.

Following image show the details of the debug messages:

For the command:

1) ifconfig -a

2) ip link set can0 up type can bitrate 125000

ifconfig_b_ip_link.png

As you can see, for ifconfig -a, the HWaddr detail for CAN0 are value 0.

Queries:

1) Is it possible for you to share with me the binaries generated in your system? (the .sdcard image)

2) What could be reason that HWaddr detail for me is 0?

3) What results you are getting for ifconfig -a command?

Thanks in advance!

Best Regards,

Indrajit

0 Kudos

864 Views
art
NXP Employee
NXP Employee

Of course, at least two CAN nodes must be present on the bus for the operation to be possible.

Try to run 'cansniffer' on the one side of the bus and then try 'cansend' on the other side.

Artur

0 Kudos

864 Views
art
NXP Employee
NXP Employee

Please follow the Chapter 37 of the attached document.


Have a great day,
Artur

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos