Jump to content

chuvak2007f

Members
  • Posts

    10
  • Joined

  • Last visited

Posts posted by chuvak2007f

  1. How to start a sound&microphone on the Orange Pi Zero 2+ H3?

    root@orangepizeroplus2:/# aplay -l
    aplay: device_list:268: no soundcards found...
    
    root@orangepizeroplus2:~# uname -a
    Linux orangepizeroplus2 4.11.5-sun8i #3 SMP Thu Aug 3 08:36:37 CEST 2017 armv7l armv7l armv7l GNU/Linux
    
    root@orangepizeroplus2:~# lsmod
    Module                  Size  Used by
    can_raw                16384  1
    bluetooth             270336  0
    qmi_wwan               24576  0
    qcserial               16384  2
    usb_wwan               16384  1 qcserial
    sun8i_codec_analog     24576  0
    snd_soc_core          122880  1 sun8i_codec_analog
    snd_pcm_dmaengine      16384  1 snd_soc_core
    usbserial              32768  6 qcserial,usb_wwan
    snd_pcm                77824  2 snd_pcm_dmaengine,snd_soc_core
    sun8i_ths              16384  0
    uio_pdrv_genirq        16384  0
    cpufreq_dt             16384  0
    uio                    16384  1 uio_pdrv_genirq
    thermal_sys            57344  2 cpufreq_dt,sun8i_ths
    mcp251x                20480  0
    can_dev                24576  1 mcp251x
    can                    36864  1 can_raw
    usb_f_acm              16384  1
    u_serial               20480  3 usb_f_acm
    g_serial               16384  0
    libcomposite           40960  2 g_serial,usb_f_acm
    brcmfmac              172032  0
    brcmutil               16384  1 brcmfmac
    cfg80211              204800  1 brcmfmac
    rfkill                 24576  5 bluetooth,cfg80211

     

  2. 11 hours ago, martinayotte said:

    I'm glad to see that it every thing worked out !

    I have some of those MCP2515 modules on my desk since more than a month, but  never got chance/time try them out ...

     

    If you find the time, try different pins for interrupts, for me it is not entirely clear why it was PA2, but when connected to other pins, orange could not reboot

  3. After all the fixes, errors ceased to appear and the interface can0 appeared! Thank you!

    root@orangepizeroplus2:~# dmesg|grep mcp
    [    8.873365] mcp251x spi1.0 can0: MCP2515 successfully initialized.
    root@orangepizeroplus2:~# dmesg|grep can
    [    8.803670] can: controller area network core (rev 20120528 abi 9)
    [    8.873365] mcp251x spi1.0 can0: MCP2515 successfully initialized.
    
    root@orangepizeroplus2:~# 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)

    I connected the interrupt pin to PA7, orange is loaded normally, but when I execute the reboot command, orange does not load. When the interrupt terminal is connected, the orange can not normally reboot.

    What can be done about this?

     

    If I disable the interrupt pin, the orange is loaded and the can-modules also.
    Next, I connect can0:
    Ip link set can0 up type can bitrate 250000

     

    I try to forward the message:
    Cansend can0 100 # 43414e2054650000

     

    I see this message on another device connected to another computer.

     

    But the re-sending does not work and command "candump can0" does not show anything either. Perhaps this is due to the disconnected interrupt pin. But when the output is connected it is not possible to restart the orange. In what here there can be a problem?

  4. 1 hour ago, martinayotte said:

    Leave the PA13 as SPI_CS, and choose any other free GPIO for the IRQ, could be the original PA7.

    My connection with the module:

    4 VCC

    6 GND

    19 - GPIO 15 - MOSI
    21 - GPIO 16 - MISO
    23 - GPIO 14 - CLK
    24 - GPIO 13 - CS0

    It's right?

    Is it necessary to connect a pin-INT on the module mcp2515, or without it to worked?

  5. 8 minutes ago, zador.blood.stained said:

    On Zero SPI bus 0 is wired to the SPI flash pads (even if the flash itself it's not soldered), and SPI bus 1 is wired to the pin headers, so it should be

    
    target = <&spi1>;

    instead

    Corrected

     

    root@orangepizeroplus2:~# dmesg|grep mcp25
    [    8.346819] mcp251x spi1.0: Error applying setting, reverse things back
    [    8.346839] mcp251x: probe of spi1.0 failed with error -22
    root@orangepizeroplus2:~# dmesg|grep can
    [    8.309157] can: controller area network core (rev 20120528 abi 9)
    [    8.346796] sun8i-h3-pinctrl 1c20800.pinctrl: pin PA13 already requested by 1c69000.spi; cannot claim for spi1.0

     

  6. 2 minutes ago, zador.blood.stained said:

    Please show your edited overlay.

    /dts-v1/;
    /plugin/;
    
    / {
    	compatible = "allwinner,sun4i-a10", "allwinner,sun7i-a20", "allwinner,sun50i-a64", "allwinner,sun50i-h5";
    
    	fragment@0 {
    		target-path = "/clocks";
    		__overlay__ {
    			#address-cells = <1>;
    			#size-cells = <1>;
    			can0_osc_fixed: can0_osc_fixed {
    				compatible = "fixed-clock";
    				#clock-cells = <0>;
    				clock-frequency  = <8000000>;
    			};
    		};
    	};
    
    	fragment@1 {
    		target = <&pio>;
    		__overlay__ {
    			can0_pin_irq: can0_pin_irq {
    				pins = "PA13";
    				function = "irq";
    				bias-pull-up;
    			};
    		};
    	};
    
    	fragment@2 {
    		target = <&spi0>;
    		__overlay__ {
    			#address-cells = <1>;
    			#size-cells = <0>;
    			status = "okay";
    			mcp2515 {
    				reg = <0>;
    				compatible = "microchip,mcp2515";
    				pinctrl-names = "default";
    				pinctrl-0 = <&can0_pin_irq>;
    				spi-max-frequency = <10000000>;
    				interrupt-parent = <&pio>;
    				interrupts = <0 13 2>; /* PA13 IRQ_TYPE_EDGE_FALLING */
    				clocks = <&can0_osc_fixed>;
    				status = "okay";
    			};
    		};
    	};
    };

     

  7. Need help!

    I'm trying to connect the mcp2515 module to the Orange Pi Zero 2+ H3, but I can not. Dmesg wrote:
    [8.572220] mcp251x spi0.0: Can not initialize MCP2515. Wrong wiring?
    [8.572248] mcp251x spi0.0: Probe failed, err = 19

     

    The OS is assembled from a night assembly with CAN-BUS support:
    Root @ orangepizeroplus2: ~ # uname -a
    Linux orangepizeroplus2 4.11.9-sun8i # 17 SMP Sat Jul 29 00:21:32 CEST 2017 armv7l armv7l armv7l GNU / Linux

    I connect modules without problems:
    Modprobe can
    Modprobe can-dev
    Modprobe mcp251x

    I use this overlay (PA7 is replaced with PA13 according to the pinout: this and this):

    https://github.com/armbian/sunxi-DT-overlays/blob/master/examples/spi-mcp251x.dts

    What else do I need to do to make the mcp2515 module work?

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines