Jump to content

Recommended Posts

Posted

Hi,

I need to add a second SD card reader to my Orangepi zero. I tried with this link https://github.com/nopnop2002/STM32_TFT_8bit . But it doesn't work. I read that SPI is not enabled in Orangepi kernel and i checked with ls /dev/*spi*  and the output was - ls: cannot access '/dev/*spi*': No such file or directory.

So i edited the /boot/armbinaEnv.txt as adding "overlays=spi-spidev" and rebooted. then checked ls /dev/*spi* and out is - /dev/spidev0.0. But my code is not working..Can you tell me what is wrong here ? These are my pin configuration

SD CARD                           OPI zero

------------------------------------------------------------

GND        (6)                      GND     (6)

VCC        (4)                       3.3V     (1)

MISO     (7)                       Pin#21(SPI MISO)

MOSI     (2)                       Pin#19(SPI MOSI)

SCK       (5)                       Pin#23(SPI SCLK)

CS         (1)                       Pin#26(SPI CE)

 

SDpinout.jpg

OrangePi-ZeroPinout-1024x488.jpg

Posted
25 minutes ago, NeethuVP said:

So i edited the /boot/armbinaEnv.txt as adding "overlays=spi-spidev" and rebooted. then checked ls /dev/*spi* and out is - /dev/spidev0.0

It is not enough to add the spi-spidev overlay, you also need to specify which bus with "param_spidev_spi_bus" parameter. In OPiZero, it is the SPI1 which is expose on header, so, you must add "param_spidev_spi_bus=1" .

Be aware that this won't be easy to handle on software side. If I were you, I would go to more easy way : use USB-SdCard adaptor on USB port ...

EDIT: If the USB port is already in use, there are 2 other USB ports on the 13 pins header ...

Posted
18 hours ago, martinayotte said:

It is not enough to add the spi-spidev overlay, you also need to specify which bus with "param_spidev_spi_bus" parameter. In OPiZero, it is the SPI1 which is expose on header, so, you must add "param_spidev_spi_bus=1" .

 

Edited the param_spidev_spi_bus=1" and nothing worked for me. How can i enable External SD card via gpio pins?

Posted
On 1/16/2020 at 7:30 PM, martinayotte said:

Look at the OPiZero header pinout here : https://linux-sunxi.org/Xunlong_Orange_Pi_Zero#Expansion_Port

Then, get/purchase a female USB connector, and solder wires as follow : https://components101.com/connectors/usb-type-a-female

Make sure the wires are a short as possible to avoid interferences...

hi , successfully connected my SD card to Orangepi USB pins.. And the lsusb output of OPI is

Quote

Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID aaaa:8816 MXT

how to display the files in ma SD card?

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines