Jump to content

Dmitry P

Validating
  • Posts

    1
  • Joined

  • Last visited

Everything posted by Dmitry P

  1. Hi everyone! Trying to bring up just another MCP2515 chip with Zero 2W. This time with Waveshare CAN RS485 HAT. MCP2515 is on SPI1, CS is CS0, INT pin is GPIO25, which is PI6 on Zero2W. Overlay file is compiled and enabled OK, yet chip init fails (see below). pi@orangepizero2w:~$ dmesg | grep spi1 [ 7.612242] mcp251x spi1.0: MCP251x didn't enter in conf mode after reset [ 7.612393] mcp251x spi1.0: Probe failed, err=110 [ 7.612408] mcp251x: probe of spi1.0 failed with error -110 pi@orangepizero2w:~$ dmesg | grep mcp [ 7.612242] mcp251x spi1.0: MCP251x didn't enter in conf mode after reset [ 7.612393] mcp251x spi1.0: Probe failed, err=110 [ 7.612408] mcp251x: probe of spi1.0 failed with error -110 DTS is the following: /dts-v1/; /plugin/; / { compatible = "allwinner,sun50i-h6"; fragment@0 { target-path = "/aliases"; __overlay__ { spi1 = "/soc/spi@5011000"; }; }; fragment@1 { target-path = "/"; __overlay__ { can0_osc_fixed: can0_osc_fixed { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <12000000>; /* checked with HAT: 12 MHz crystal */ }; }; }; fragment@2 { target = <&pio>; __overlay__ { can0_pin_irq: can0_pin_irq { pins = "PI6"; /* GPIO 25 is PI6 on Zero 2W */ function = "irq"; bias-pull-up; }; }; }; fragment@3 { target = <&spi1>; __overlay__ { status = "okay"; #address-cells = <1>; #size-cells = <0>; can0:mcp2515@0 { reg = <0>; compatible = "microchip,mcp2515"; pinctrl-names = "default"; pinctrl-0 = <&can0_pin_irq>; spi-max-frequency = <10000000>; interrupt-parent = <&pio>; interrupts = <8 6 8>; /* Port I = 8 (???), Pin = 6, Type = PI6 IRQ_TYPE_LEVEL_LOW */ clocks = <&can0_osc_fixed>; status = "okay"; }; }; }; }; Also, SPI1 CS0 seem to always be LOW level, though CS is always active low. Enabling SPI1 separately via "armbianEnv.txt" in form of overlays=spi-spidev param_spidev_spi_bus=1 param_spidev_spi_cs=0 param_spidev_max_freq=1000000 as in SPI1, CS0, didn't help much. Did anyone managed to use MCP2515 with Zero 2W? Thanks in advance
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines