在线时间59 小时
UID2099114
注册时间2014-6-4
NXP金币0
该用户从未签到
中级会员
 
- 积分
- 324
- 最后登录
- 1970-1-1
|
参考sdp layout的一片板子添加了一个flexcan,想在linux下测试一下功能,不知道哪位有好的测试方法没有?用cantest can0 1F334455#1122334455667788测试发现有波形输出,想在两个can之间用cansend测试,提示command not found。一下是can的一些信息,
root@freescale ~$ dmesg | grep can
vcan: Virtual CAN interface driver
flexcan netdevice driver
flexcan imx6q-flexcan.0: device registered (reg_base=c09e8000, irq=142)
flexcan imx6q-flexcan.1: device registered (reg_base=c09f0000, 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 ~$ ip link set can1 up type can bitrate 125000
flexcan imx6q-flexcan.1: writing ctrl=0x0e312005
root@freescale ~$ ifconfig can0 up
root@freescale ~$ ifconfig can1 up
root@freescale ~$ ifconfig can1
can1 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:143
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 ~$ ip -details link show can0
2: can0: mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 125000 sample-point 0.875
tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
clock 30000000
root@freescale ~$ ip -details link show can1
3: can1: mtu 16 qdisc pfifo_fast state UNKNOWN qlen 10
link/can
can state ERROR-ACTIVE (berr-counter tx 0 rx 0) restart-ms 0
bitrate 125000 sample-point 0.875
tq 500 prop-seg 6 phase-seg1 7 phase-seg2 2 sjw 1
flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
clock 30000000
|
|