自己做的板子,用的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 跳转至页
回复
我要赚赏金打赏帖 |
|
|---|---|
| 【S32DS】S32K3 RTD7.0.1 HSE 组件配置报错问题解决被打赏¥27元 | |
| 【S32K3XX】MCME 启动 CORE1被打赏¥23元 | |
| AG32VH407下温度大气压传感器及其检测被打赏¥20元 | |
| AG32VH407下光照强度传感器BH1750及其检测被打赏¥22元 | |
| AT32VH407下使用温湿度传感器DHT22进行检测被打赏¥20元 | |
| DIY一个婴儿澡盆温度计被打赏¥34元 | |
| 【FreeRtos】FreeRtos+MPU region 配置规则被打赏¥23元 | |
| 【分享开发笔记,赚取电动螺丝刀】三分钟快速上手驱动墨水屏(ArduinoIDE)被打赏¥28元 | |
| 【S32K3XX】LIN 通讯模块使用被打赏¥31元 | |
| 【FreeRtos】FreeRtos + MPU模块的配置使用被打赏¥32元 | |
我要赚赏金
