找回密码
 立即注册
搜索
热搜: 飞腾 龙芯 固件
查看: 1394|回复: 0

CAN功能验证

[复制链接]

29

主题

0

回帖

315

积分

超级版主

积分
315
发表于 2023-7-18 16:40:06 | 显示全部楼层 |阅读模式
本帖最后由 yaya 于 2023-7-18 17:31 编辑

环境:龙芯2K1000板卡,can0和can1互连


验证步骤:
1.pmon命令行下查看复用关系(16&17位上要为1)
    d4 0xbfe10420

2.kernel下验证复用关系是否正确
    devmem 0x1fe10420
3.测试can接口功能
接线:can0_H接can1_H、can0_L接can0_L
关闭can口
    ifconfig can0 down
    ifconfig can1 down
配置速率
    ip link set can0 type can bitrate 100000
    ip link set can1 type can bitrate 100000
查看can配置
ip -details link show can0
打开can口
    ifconfig can0 up
    ifconfig can1 up
can0作为接收端(后台运行)
    candump can0 &
can1作为发送端
    cansend can1 123#11223344556677

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|锋微固件

GMT+8, 2025-5-1 13:24 , Processed in 0.058227 second(s), 22 queries .

快速回复 返回顶部 返回列表