hi:
我使用的SDK是sdk-processor-03.02,使用了CAN0和CAN1,在dts文件中启用后,在linux下面,使用
root@am335x-evm:~# canconfig can1 bitrate 20000 ctrlmode triple-sampling on
can1 bitrate: 20000, sample-point: 0.875
can1 ctrlmode: loopback[OFF], listen-only[OFF], tripple-sampling[ON],one-shot[OFF], berr-reporting[OFF]
root@am335x-evm:~# canconfig can0 bitrate 20000 ctrlmode triple-sampling on
can0 bitrate: 20000, sample-point: 0.875
can0 ctrlmode: loopback[OFF], listen-only[OFF], tripple-sampling[ON],one-shot[OFF], berr-reporting[OFF]
root@am335x-evm:~# canconfig can0 start
[ 50.903121] c_can_platform 481cc000.can can0: setting BTR=1c3b BRPE=0000
can0 state: ERROR-ACTIVE
root@am335x-evm:~# canconfig can1 start
[ 56.105140] c_can_platform 481d0000.can can1: setting BTR=1c3b BRPE=0000
can1 state: ERROR-ACTIVE
root@am335x-evm:~# cansend can0 -i 0x10 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88
interface = can0, family = 29, type = 3, proto = 1
root@am335x-evm:~# cansend can0 -i 0x10 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88
interface = can0, family = 29, type = 3, proto = 1
root@am335x-evm:~# candump can1
interface = can1, family = 29, type = 3, proto = 1
<0x010> [8] 11 22 33 44 55 66 77 88
<0x010> [8] 11 22 33 44 55 66 77 88
^C
root@am335x-evm:~# candump can0
interface = can0, family = 29, type = 3, proto = 1
<0x010> [8] 11 22 33 44 55 66 77 88
在速度为20K的情况下可以正常接收数据。
以下是10k的配置,没有数据,示波器测试也没有波形。
root@am335x-evm:~# canconfig can0 bitrate 10000 ctrlmode triple-sampling on
can0 bitrate: 10000, sample-point: 0.875
can0 ctrlmode: loopback[OFF], listen-only[OFF], tripple-sampling[ON],one-shot[OFF], berr-reporting[OFF]
root@am335x-evm:~# canconfig can1 bitrate 10000 ctrlmode triple-sampling on
can1 bitrate: 10000, sample-point: 0.875
can1 ctrlmode: loopback[OFF], listen-only[OFF], tripple-sampling[ON],one-shot[OFF], berr-reporting[OFF]
root@am335x-evm:~# canconfig can0 start
[ 909.184909] c_can_platform 481cc000.can can0: setting BTR=1c37 BRPE=0001
can0 state: ERROR-ACTIVE
root@am335x-evm:~# canconfig can1 start
[ 913.222162] c_can_platform 481d0000.can can1: setting BTR=1c37 BRPE=0001
can1 state: ERROR-ACTIVE
root@am335x-evm:~# cansend can0 -i 0x10 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88
interface = can0, family = 29, type = 3, proto = 1
root@am335x-evm:~# cansend can0 -i 0x10 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88
interface = can0, family = 29, type = 3, proto = 1
root@am335x-evm:~# cansend can0 -i 0x10 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88
interface = can0, family = 29, type = 3, proto = 1
使用candump命令,没有任何数据,请教是怎么回事?