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

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

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

1,218 次查看
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 项奖励
回复
1 回复

989 次查看
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 项奖励
回复