您好,
我通过下面的方法来配置can:
canconfig can0 bitrate 50000 ctrlmode loopback on
会打印如下错误信息:
opening CAN interface 'can0' in sysfs failed, maybe not a CAN interface
No such file or directory
请问这是什么原因导致的,我需要做哪些修改??谢谢!
备注:我采用的内核版本为linux-3.12.10-ti2013.12.01.tar.gz。
另外,执行ifconfig -a,如有如下信息打印:
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:68
eth0 Link encap:Ethernet HWaddr 02:A8:90:48:59:5D inet addr:192.168.5.200 Bcast:192.168.5.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1500 errors:0 dropped:0 overruns:0 frame:0
TX packets:649 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000 RX bytes:1836798 (1.7 MiB) TX bytes:103338 (100.9 KiB)
Interrupt:56
eth1 Link encap:Ethernet HWaddr BE:5E:EF:18:0F:88 inet addr:192.168.2.1 Bcast:192.168.2.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 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:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 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:0 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Steven Liu1:
自己的板子还是TI的开发板?驱动的配置上是正确的吗?
hongwan weng:
回复 Steven Liu1:
您好,Steven,
板子是自己的板子,驱动的配置参考的是http://processors.wiki.ti.com/index.php/AM335X_DCAN_Driver_Guide
工具链是arm-linux-gnueabihf-
谢谢!