[评测分享]
【米尔-芯驰D9车规级开发板 测评】+ CAN通信测试
#板卡评测
1932 人阅读
|
0 人回复
|
2023-11-23
|
|
按照手册来测试下CAN端口通信。
1、硬件部分
1.1、CAN电路原理图部分
开发板上有两路CAN通信接口,两路CAN通信都带隔离。
1.2、CAN硬件连接
硬件上短接J18(1-7)和J18(3-9)
2、配置两路CAN
配置两路CAN通信波特率为1M
root@myd-jd9x:~# ip link set can1 up type can0 bitrate 1000000 dbitrate 4000000 fd on
root@myd-jd9x:~# ip link set can1 up type can1 bitrate 1000000 dbitrate 4000000 fd on
3、通信测试
打开两个终端,一个设置为接收,一个设置为发送
3.1、CAN1接口,CAN2发送测试
CAN1接收命令:root@myd-jd9x:~# candump can0 -L &
CAN2发送命令:root@myd-jd9x:~# cansend can1 00f##0.a1.a2.a3.a4.a5.a6.a7.a8.a9.10.11.12.13.14.15.16.17.18.19.20.21.23.24.25.26.27.28.29.30.31.32.33.34.35.36.37.38.39.40.41.42.43.44.45.46.47.48.49.50.51.52.53.54.55.56.57.58.59.60
.61.62.63.64
3.2、CAN1发送,CAN2接收测试
4、测试CAN1与外部CAN卡之间的通信
4.1、硬件连接
4.2、配置CAN0
4.3、CAN0收到CAN调试卡数据
4.4、CAN0发送数据到CAN调试卡
|
|
|
|
|
|
|
|
|