我们有基于 ls1028a 的定制板,其中 CAN 收发器直接连接到处理器。我们要检查在环回中连接的 CAN 收发器,即 CAN0_H 连接到 CAN1_H,CAN0_L 连接到 CAN1_L,CAN0_GND 连接到 CAN1_GND。
我们已经创建了小应用程序 (can_test) 来检查环回中的 CAN,但是当我们运行应用程序时它会抛出以下错误:
i p:“dev”是重复的,或者“type”是垃圾
ip:“dev”是重复的,或者“type”是垃圾,在应用程序中运行下面的 system() 调用之后:
system("ifconfig can0 down");
system("ip link set can0 up type can bitrate 112500");
system("ifconfig can1 down");
system("ip link set can1 up type can bitrate 112500");
system("ip link set can0 up type can bitrate 112500")
下面是我们对 CAN0 和 CAN1 的 dts 文件配置:
&can0 {
status = "好的";
can-transceiver {
最大比特率 = <5000000>;
};
};
&can1 {
status = "好的";
can-transceiver {
最大比特率 = <5000000>;
};
};
我在这篇文章中附上了所需的信息。
以下是我对此的问题:
我们如何在 linux 的环回中测试 CAN 收发器?
linux 和 .config 文件中需要进行哪些修改?
请帮我解决这个问题。