Firefly开源社区

标题: can0 口 [打印本页]

作者: zhangx    时间: 2020-7-13 10:16
标题: can0 口
(1) # ifconfig can0 down (2) # ip link set can0 up type can bitrate 250000RTNETLINK answers: No such device(3) # ip link set can0 type can bitrate 125000(4)# ifconfig can0 upifconfig: ioctl 8914: No such device # dmesg | grep can0[    0.634034] device: 'can0': device_add[    0.634268] PM: Adding info for No Bus:can0[   50.543579] mcp251x spi2.0 can0: bit-timing not yet defined[  232.717368] A link change request failed with some changes committed already. Interface can0 may have been left with an inconsistent configuration, please check.[  248.570996] rockchip-spi ff130000.spi: cr0 0x2c01, div 4[  248.571122] mcp251x spi2.0: read reg![  248.571218] mcp251x spi2.0: reg:0[  248.571384] mcp251x spi2.0: CANCTRL_REQOP_MASK224[  248.571450] mcp251x spi2.0: CANCTRL REQOP CONF:128[  248.571533] mcp251x spi2.0: hw reset[  248.571596] mcp251x spi2.0: hw reset fail ret:-19[  248.572031] rockchip-spi ff130000.spi: cr0 0x2c01, div 4


dts中can0为:
&spi2 {        status = "okay";        spi_wk2xxx@00{                status = "disabled";        };        mcp2515: can@00 {                status = "okay";                compatible = "microchip,mcp2515";                reg = <0x00>;                clocks = <&mcp251x_clk>;                interrupt-parent = <&gpio0>;                interrupts = <1 IRQ_TYPE_EDGE_FALLING>;                spi-max-frequency = <24000000>;                pinctrl-names = "default";                pinctrl-0 = <&can0_pins>;                poll_mode = <0>;                enable_dma = <1>;        };};


再次感谢,麻烦抽空回复,等待中,不胜感激。




作者: zhangx    时间: 2020-7-13 10:47
麻烦帮看一下, can0口打开时候,出现mcp251x spi2.0: hw reset fail ret:-19错误
作者: xiaoning3486    时间: 2020-12-8 15:59
你好,这个问题解决了吗?




欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1