自己做的板子,用的can1,管脚是ph14,ph15。
命令行里输入ifconfig can0 up后,打不开can。
root@nuc972 /# ifconfig can0 up
nuc970-can1 nuc970-can1 can0: bit-timing not yet defined
nuc970-can1 nuc970-can1 can0: failed to open can device
ifconfig: SIOCSIFFLAGS: Invalid argument
使用 ip link set can0 type can bitrate 125000 设置速率,结果也不成功。
root@nuc972 /# ip link set can0 type can bitrate 125000
ip: either "dev" is duplicate, or "type" is garbage
但是ifconfig -a倒是可以看到有can0,不过好奇为什么是can0?我硬件上用的是can1啊?
root@nuc972 /# ifconfig -a
can0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:59
共2条
1/1 1 跳转至页
ifconfigcan0up为什么无法启动nuc972的can?
关键词: nuc972 CAN
2楼
执行 ip link set can0 type can bitrate 125000 命令不成功,是因为buildroot默认生成的ip命令不支持配置can。构建root时,勾选iproute2选项,再次编译生成的文件系统里的ip命令就可以执行了。
共2条
1/1 1 跳转至页
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
【开发板试用-NUCLEO-U575ZI-Q】定时器中断实现板载LED点亮被打赏50分 | |
分享技术笔记五被打赏50分 | |
【STM32H7S78-DK评测】LTDC Color Key功能验证被打赏50分 | |
请大声喊出:我要开发板!---使用esp32驱动AD7606C-18被打赏50分 | |
分享技术笔记四被打赏50分 | |
【STM32H7S78-DK评测】LCD显示功能配置被打赏50分 | |
为什么FPGA属于硬件,还需要搞算法?被打赏50分 | |
【STM32H7S78-DK评测】基础环境搭建之FreeRTOS适配被打赏50分 | |
买了一个RaspberryPiPico2试玩被打赏100分 | |
分享技术笔记三被打赏50分 |