Xilinx zynq CAN使用
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
免费下载资源
·
作者
QQ群:852283276
微信:arm80x86
微信公众号:青儿创客基地
B站:主页 https://space.bilibili.com/208826118
驱动
socketCAN驱动
can4linux
下载地址已经迁移到Gitlab,can4linux
应用
基于MCP2515的Linux CAN总线驱动程序设计(一)
Linux CAN总线驱动与canutils
can-utils接口测试方法
*linux(ubuntu)系统下can调试工具canutils和iproute的编译应用
基于MCP2515的Linux CAN总线驱动程序设计(一)
socket can 编程
*AM335X DCAN Driver Guide
canconfig 移植记录
can-utils
下载地址:
参考can-utils,利用linux的SocketCAN接口,
git clone https://github.com/linux-can/can-utils.git
cd can-utils
./autogen.sh
./configure
make
make install (with root privileges)
使用,
candump vcan0
vcan0 123 [4] 01 AA BB 22
vcan0 123 [4] 01 AA BB 23
vcan0 123 [4] 01 AA BB 24
iproute2
ip -details link show can0
root@imx_mfgtools_nogpu:~# ip -details link show can0
2: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
link/can promiscuity 0
can state STOPPED (berr-counter tx 0 rx 0) restart-ms 0
bitrate 0 sample-point 0.000
tq 0 prop-seg 0 phase-seg1 0 phase-seg2 0 sjw 0
flexcan: tseg1 4..16 tseg2 2..8 sjw 1..4 brp 1..256 brp-inc 1
clock 30000000
ip -details link show can0
ifconfig can0 down
ip link set can0 up type can
配置速度,
ip link set can0 up type can bitrate 800000
CAN总线开启和关闭:ifconfig canx up/ifconfig canx down
设置总线波特率:ip link set canx type can bitrate 250000
设置总线帧参数:ip link set canx type can tq 200 prop-seg 6 phase-seg1 6 phase-seg2 2 sjw 1
注:ip link set canx type can -help 命令格式中,‘|’含义为只能输入一种,‘[]’含义为可选参数。
查看CAN总线状态:ip -details -statistics show link canx
设置总线的bus-off复位:ip link set canx type can restart-ms 100
帧参数设置的各参数含义:
- TQ-位单位时间
- SJW-重新同步跳跃宽度
- PBS-phase-seg-相位缓冲
- PTS-prop-seg-传播时间缓冲
网友工具cantool
GitHub 加速计划 / li / linux-dash
10.39 K
1.2 K
下载
A beautiful web dashboard for Linux
最近提交(Master分支:23 天前 )
186a802e
added ecosystem file for PM2 4 年前
5def40a3
Add host customization support for the NodeJS version 4 年前
更多推荐
已为社区贡献12条内容
所有评论(0)