我正在使用AM3359 ICS平台,软件版本是 TI-Android-ICS-4.0.3_AM335x_3.0.1。
我按照AM335X DCAN Driver Guide - Texas Instruments Embedded Processors Wiki打开了AM3359 ICS 平台的D_CAN驱动。并且移植了canutils-4.0.6工具来测试CAN。
root@android:/system/bin # canconfig can1 bitrate 500000 ctrlmode triple-sampling on
anconfig can1 bitrate 500000 ctrlmode triple-sampl000 ctrlmode triple-sampl <ing on
can1 bitrate: 500000, sample-point: 0.875
can1 ctrlmode: loopback[OFF], listen-only[OFF], tripple-sampling[ON],one-shot[OFF], berr-reporting[OFF]
root@android:/system/bin # canconfig can1 start
canconfig can1 start
can1 state: ERROR-ACTIVE
root@android:/system/bin # cansend can1 -vi 0x10 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88
ansend can1 -vi 0x10 0x11 0x22 0x33 0x44 0x55 0x66 0x22 0x33 0x44 0x55 0x66 < 0x77 0x88
interface = can1, family = 29, type = 3, proto = 1
id: 16 dlc: 8
0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88
root@android:/system/bin # cansend can1 -vi 0x10 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88
ansend can1 -vi 0x10 0x11 0x22 0x33 0x44 0x55 0x66 0x22 0x33 0x44 0x55 0x66 < 0x77 0x88
interface = can1, family = 29, type = 3, proto = 1
id: 16 dlc: 8
0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88
以上是adb shell里面的一些测试操作,uart调试串口里面也没有报错。
但是我用示波器量DCAN1_TX(UART0_CTSN),始终都是高电平,没有波形,不知道为何?请大侠们指教。