Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8013

Troubleshooting • Re: Multiple MCP2515 controllers

$
0
0
I modified dts

Code:

/dts-v1/;/plugin/;/ {    compatible = "brcm,bcm2835", "brcm,bcm2836", "brcm,bcm2708", "brcm,bcm2709";    fragment@0 {        target = <&spi0>;        __overlay__ {            #address-cells = <1>;            #size-cells = <0>;            pinctrl-0 = <&spi0_pins &spi0_cs_pins>;            status = "okay";            cs-gpios = <&gpio 8 1>, <&gpio 7 1>, <&gpio 22 1>, <&gpio 23 1>, <&gpio 24 1>, <&gpio 25 1>;            spidev0: spidev@0 {                compatible = "microchip,mcp2515";                reg = <0>;  /* CE0 */                spi-max-frequency = <10000000>;            };            spidev1: spidev@1 {                compatible = "microchip,mcp2515";                reg = <1>;  /* CE1 */                spi-max-frequency = <10000000>;            };            spidev2: spidev@2 {                compatible = "microchip,mcp2515";                reg = <2>;  /* CE2 */                spi-max-frequency = <10000000>;            };            spidev3: spidev@3 {                compatible = "microchip,mcp2515";                reg = <3>;  /* CE3 */                spi-max-frequency = <10000000>;            };            spidev4: spidev@4 {                compatible = "microchip,mcp2515";                reg = <4>;  /* CE4 */                spi-max-frequency = <10000000>;            };            spidev5: spidev@5 {                compatible = "microchip,mcp2515";                reg = <5>;  /* CE5 */                spi-max-frequency = <10000000>;            };        };    };    fragment@1 {        target = <&gpio>;        __overlay__ {            spi0_cs_pins: spi0_cs_pins {                brcm,pins = <7 8 22 23 24 25>;                brcm,function = <1>; /* out */            };        };    };};
 and I modified config.txt

Code:

dtoverlay=spi-gpio-cs-newdtoverlay=spi0-3cs,cs0_spidev=offdtoverlay=i2c-rtcdtoverlay=mcp2515-spi-overlaydtoverlay=mcp2515-can0,oscillator=8000000,interrupt=5dtoverlay=mcp2515-can1,oscillator=8000000,interrupt=4dtoverlay=mcp2515-can4,oscillator=8000000,interrupt=2
dmesg

Code:

[    9.807000] mcp251x spi0.1: MCP251x didn't enter in conf mode after reset[    9.807313] mcp251x spi0.1: Probe failed, err=110[    9.807341] mcp251x: probe of spi0.1 failed with error -110[    9.841074] mcp251x spi0.0 can0: MCP2515 successfully initialized.[    9.845232] mcp251x: probe of spi0.5 failed with error -34[    9.845380] mcp251x: probe of spi0.4 failed with error -34[    9.850349] mcp251x: probe of spi0.3 failed with error -34[    9.850514] mcp251x: probe of spi0.2 failed with error -34

Statistics: Posted by btsome — Fri Feb 02, 2024 2:20 am



Viewing all articles
Browse latest Browse all 8013

Trending Articles