Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: no SD card #871

Closed
ZeynX92 opened this issue Jun 5, 2024 · 1 comment
Closed

OSError: no SD card #871

ZeynX92 opened this issue Jun 5, 2024 · 1 comment

Comments

@ZeynX92
Copy link

ZeynX92 commented Jun 5, 2024

Hello, I Have problem

import machine
import sdcard
import uos

cs = machine.Pin(1, machine.Pin.OUT)

spi = machine.SPI(0,
          baudrate=1000000,
          polarity=0,
          phase=0,
          bits=8,
          firstbit=machine.SPI.MSB,
          sck=machine.Pin(2),
          mosi=machine.Pin(3),
          miso=machine.Pin(4))

sd = sdcard.SDCard(spi, cs)

vfs=uos.VfsFat(sd)
uos.mount(sd,'/sd')

Error

Traceback (most recent call last):
  File "<stdin>", line 24, in <module>
  File "sdcard.py", line 54, in __init__
  File "sdcard.py", line 82, in init_card
OSError: no SD card

I really don't know what to do. because i check all contacts, power, use and format 3 different SD cards, change _CMD_TIMEOUT...

@ZeynX92
Copy link
Author

ZeynX92 commented Jun 11, 2024

Found solution: Never buy a Troyka SD reader module it works only with arduino (idk how it possible, but it is true).
About connection I had checked by breadboard and wires with multimeter in dialing mode and it was proper. When I change module to another random China SD reader it works. So if you had same problem after checking connection, pinout, format SD, check power, test SD reader on Arduino you can just change your SD reader module to another.
P.S. I know that Troyka modules is not available for most countries in the world, but need to mention the solution of the problem.

@ZeynX92 ZeynX92 closed this as completed Jun 11, 2024
@ZeynX92 ZeynX92 mentioned this issue Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant