Jump to content

TashaGrabovski

Validating
  • Posts

    1
  • Joined

  • Last visited

  1. Respected Martinayotte. I have Cubieboard2, Armbian 21.02.2. :~# uname -r => 5.10.16 - sunxi. I have checked up and has adjusted all but SPI0 not working.!!! /boot/armbianEnv.txt^ .... overlays=spi-spidev param_spidev_spi_bus=0 param_spidev_spi_cs=0 param_spidev_max_freq = 1000000 .... /dev/spidev0.0 is OK find /dev -name spidev* => /dev/spidev0.0 Log from ttyS0^ .... Applying kernel provided DT overlay sun7i-a20-spi-spidev.dtbo 5532 bytes read in 12 ms (450.2 KiB/s) Applying kernel provided DT fixup script (sun7i-a20-fixup.scr) .... dmesg => [ 4.171379] spidev spi0.0: probing from DT sun7i-a20-cubieboard2.dts => ... spi@1c05000 { compatible = "allwinner,sun4i-a10-spi"; reg = < 0x1c05000 0x1000 >; interrupts = < 0x00 0x0a 0x04 >; clocks = < 0x02 0x2c 0x02 0x70 >; clock-names = "ahb\0mod"; dmas = < 0x0c 0x01 0x1b 0x0c 0x01 0x1a >; dma-names = "rx\0tx"; status = "okay"; #address-cells = < 0x01 >; #size-cells = < 0x00 >; num-cs = < 0x04 >; phandle = < 0x41 >; }; ... pinctrl@1c20800 { compatible = "allwinner,sun7i-a20-pinctrl"; reg = < 0x1c20800 0x400 >; ... spi0-pi-pins { pins = "PI11\0PI12\0PI13"; function = "spi0"; phandle = < 0x73 >; }; spi0-cs0-pi-pin { pins = "PI10"; function = "spi0"; phandle = < 0x74 >; }; spi0-cs1-pi-pin { pins = "PI14"; function = "spi0"; phandle = < 0x75 >; }; ... Out of programm spidev_test.c: (MOSI connect to MISO) root@cubieboard2:~/Public# ./spidev_test spi mode: 0 bits per word: 8 max speed: 500000 Hz (500 KHz) 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 Out programm mcp3008test.cpp: root@cubieboard2:~/Public# ./testspi writing command 1 1 0 transmit failed spi data ... ioctl failed : Invalid argument ---? root@cubieboard2:~/Public# ./testspi writing command 1 1 0 transmit failed spi data ... ioctl failed : Invalid argument ---? root@cubieboard2:~/Public# ./testspi writing command 1 1 0 transmit failed spi data ... ioctl failed : Invalid argument ---? root@cubieboard2:~/Public# ./testspi writing command 1 1 0 reading data 0 0 0 count = 0 voltage 0.0000 writing command 1 1 0 reading data 0 0 0 count = 0 voltage 0.0000 writing command 1 1 0 reading data 0 0 0 count = 0 voltage 0.0000 writing command 1 1 0 reading data 0 0 0 count = 0 voltage 0.0000 writing command 1 1 0 reading data 0 0 0 count = 0 voltage 0.0000 ^C root@cubieboard2:~/Public# ... Not error, SPI0 not working. Help me please^)
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines