HI:
我正在调试imx6的CAN 总线,但是现在当我量CAN1_TX的时候总是没有数据
我的操作过程是这样的,
我首先在board-mx6q_sabresd.h里面定义了特殊功能引脚
如下: MX6Q_PAD_GPIO_7__CAN1_TXCAN,
MX6Q_PAD_GPIO_8__CAN1_RXCAN,
然后我运行了下面的几条命令
dmesg | grep can
ip link set can0 up type can bitrate 125000
ifconfig can0 up
ifconfig can0
cansend can0 -i0x100 11 22 33 44
我做完这些去测试CAN1_TX时候,用示波器总是量不到数据
附件的图片是我的操作 详细流程
也如下方所示
root@freescale /$ dmesg | grep can
vcan: Virtual CAN interface driver
flexcan netdevice driver
flexcan imx6q-flexcan.0: device registered (reg_base=c0a50000, irq=142)
flexcan imx6q-flexcan.1: device registered (reg_base=c0a58000, irq=143)
can: controller area network core (rev 20090105 abi 8)
can: raw protocol (rev 20090105)
can: broadcast manager protocol (rev 20090105 t)
root@freescale /$ ip link set can0 up type can bitrate 125000
flexcan imx6q-flexcan.0: writing ctrl=0x0e312005
root@freescale /$ ifconfig can0 up
root@freescale /$ ifconfig can0
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING 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:142
root@freescale /$ cansend can0 -i0x100 11 22 33 44
interface = can0, family = 29, type = 3, proto = 1
root@freescale /$
|