How to communicate pic controller with IMX 6 with the help of CAN protocol?

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

How to communicate pic controller with IMX 6 with the help of CAN protocol?

1,229 Views
harishankarir
Contributor I

Hi everyone! i am doing a project in CAN network communication. In this, I am using IMX 6 controller as the master and PIC 18F458 as the slave. I want them to communicate in either 125 Kbps or 500 Kbps. I programmed the PIC controller with a baud rate of 125 Kbps. But while giving linux commands after interfacing both PIC and IMX controllers, I didnt receive any message to the receiver (i.e) PIC. Rather, when i typed a command as ifconfig can0, i am getting as RX packets:2  and TX packets:0. Actually my doubt is that how the IMX controller will receive as it is the transmitter here. Moreover, I am a beginner in linux. Please guide me as I got stucked in this area.

Thanks & Regards,

Harishankari

0 Kudos
Reply
1 Reply

1,000 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

You can use libsoketcan for simple tests.

Here you can find a simple explanation of the needed setting and how to work with it.

All Boards FlexCAN

In case you are using Yocto you just need to add the libsocketcan and canutils packages in your local.conf file.

IMAGE_INSTALL_append = " libsocketcan canutils"

I hope that helps,

Alejandro

0 Kudos
Reply