手头的板子是 iMX6DL Sabreauto,用的LTIB是L3.0.35_4.1.0_130816 ,目前使用 TFTP 加载 uImage,使用 NFS 挂载的 host 上的 Rootfs 。
由于以太网 与 CAN0 不能同时使用。计划使用另外还有一个独立的can接口,FlexCAN1。怎么样才能使能这个接口?
启动后,也可以看到如下信息,表明系统加载了 flexcan.1 的驱动。
vcan: Virtual CAN interface driver
CAN device driver interface
flexcan netdevice driver
flexcan imx6q-flexcan.1: device registered (reg_base=ea9a8000, irq=143)
登录后,查看 ifconfig,只能看到 can0 的信息。看不到 can1?
root@freescale ~$ 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:143
eth0 Link encap:Ethernet HWaddr 00:04:9F:20:B4:CA
inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3109 errors:0 dropped:0 overruns:0 frame:0
TX packets:1594 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3350536 (3.1 MiB) TX bytes:246172 (240.4 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 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)
继续查看 can 的信息,相关驱动应该是加载了的,但看不到 can1 啊!!!
root@freescale ~$ dmesg | grep can
Kernel command line: console=ttymxc3,115200 can1=1 root=/dev/nfs nfsroot=192.168.1.2:/work/ltib/y/ltib/rootfs ip=192p
Chip scan failed
vcan: Virtual CAN interface driver
flexcan netdevice driver
flexcan imx6q-flexcan.1: device registered (reg_base=ea9a8000, irq=143)
can: controller area network core (rev 20090105 abi 8)
can: raw protocol (rev 20090105)
can: broadcast manager protocol (rev 20090105 t)
还是看不到 can1,那注册 flexcan.1 的驱动干嘛?
root@freescale ~$ ifconfig can1
ifconfig: can1: error fetching interface information: Device not found
配置 can1,找不的设备,配置 can0,就配置到 flexCAN.1 啦,怎么回事,我做错了什么?
root@freescale ~$ ip link set can1 up type can bitrate 125000
Cannot find device "can1"
root@freescale ~$ ip link set can0 up type can bitrate 125000
flexcan imx6q-flexcan.1: writing ctrl=0x0e312005
另外,sw1,按原理图上说给一个脉冲,我在 Uboot 阶段和linux 起来以后都试过,但没有影响
初次尝试这个软硬件平台,问题比较初级,还请版主指点。 |