-
Notifications
You must be signed in to change notification settings - Fork 1k
no SD card #627
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
Comments
I have the SDcard formatted in Fat32, but it doesn't seem to get to that point, it's not mounting the card because it can't see the card |
The most likely explanation is that the SD card is not wired up correctly (has it got power?). |
Yes, I have used both my 5v rail and my 3.3v rail to power the unit, at different times since I thought it might not be receiving enough power on the 3.3v. When on the 5v rail I do get a different error: |
I confirmed power and I am still having issues with accessing the SD card. Any suggestions? |
''' #Setup SPI SD Card Mount filesystemvfs = uos.VfsFat(sd) #I2C device Settings #Serial Ports #Device settings #Clean up #Values if name == "main": |
If 5v was applied to the card it might be dead now, unless your card reader is on a breakout with level shifters? Can you confirm the card still works in a PC reader? Are all the other spi pins definitely wired to the correct sd pins? |
It's still good because I was using it today to move files from one
computer to another
…On Mon, Mar 13, 2023, 12:00 Andrew Leech ***@***.***> wrote:
If 5v was applied to the card it might be dead now, unless your card
reader is on a breakout with level shifters? Can you confirm the card still
works in a PC reader? Are all the other spi pins definitely wired to the
correct sd pins?
—
Reply to this email directly, view it on GitHub
<#627 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALQY2DMLTQ3XVBMFWXS76HTW35VFJANCNFSM6AAAAAAVRYK5WU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Pinout: are all the card reader pins wired correctly? You might also have more luck asking about this on the micropython discord, this issue tracker is generally for tracking SW bugs and not monitored by many people. |
I have tried multiple SD card reader modules, same error, I have confirmed
the wiring multiple times and had a second person check it. I got the
library from this GitHub.
…On Mon, Mar 13, 2023, 12:18 Andrew Leech ***@***.***> wrote:
Pinout: are all the card reader pins wired correctly?
Card reader: is the socket faulty?
Software: where did your copy of sdcard.py come from?
https://core-electronics.com.au/guides/raspberry-pi-pico/makerverse-micro-sd-adapter-micropython-guide/
You might also have more luck asking about this on the micropython
discord, this issue tracker is generally for tracking SW bugs and not
monitored by many people.
—
Reply to this email directly, view it on GitHub
<#627 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALQY2DJU3L6CO2IQGRASHZ3W35XHLANCNFSM6AAAAAAVRYK5WU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Might be an issue with the size / brand of sd card, seems there can be some differences at times: https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/294813/sdhc-code-with-spi-works-on-kingston-card-but-not-on-sony-card |
I doubt it's the SD card because I have used this one before with this spi
module
SanDisk Industrial 8GB Micro SD...
https://www.amazon.com/dp/B085GL8XBH?ref=ppx_pop_mob_ap_share
…On Mon, Mar 13, 2023, 12:30 Andrew Leech ***@***.***> wrote:
Might be an issue with the size / brand of sd card, seems there can be
some differences at times:
https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/294813/sdhc-code-with-spi-works-on-kingston-card-but-not-on-sony-card
—
Reply to this email directly, view it on GitHub
<#627 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALQY2DN6LI22NACFGFWLZ63W35YURANCNFSM6AAAAAAVRYK5WU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I haven't used this sdcard.py on a pico but there's plenty of tutorials online using it so it must be broadly compatible. I keep going back to the pinout because it's a common issue and we can't actually see what you've done; so for the pins specified in the code, eg. Pin(18) have you definitely wired GP18 and not pin number 18? Also, what version micropython are you running on the pico? Maybe try updating that to latest nightly if you haven't already recently. |
(sysname='rp2', nodename='rp2', release='1.19.1', version='v1.19.1 on 2022-06-18 (GNU 11.2.0 MinSizeRel)', machine='Raspberry Pi Pico with RP2040') I have multiple other modules that work fine, the only issue I am having is with the SD card module. I have looked at several tutorials and walkthroughs and have tried them as well, well the ones that don't link to a dead copy of this library, The first one I tried was the Digikey walkthrough but I run into the same issue which leads me to ask the owner of the GitHub. |
I am using the following pins: I am using this pinout guide : https://electrocredible.com/wp-content/uploads/2022/05/raspberry-pi-pico-w-pinout.webp |
That looks like the issue then!
The Pin number refers to the GP number, not the raw pin number. It looks like you have the Pins that are passed to Spi correct but cs is declared as GP22, not GP17 |
That was fixed and still getting the same error
…On Wed, Mar 15, 2023, 08:44 Andrew Leech ***@***.***> wrote:
That looks like the issue then!
In your code above you have:
cs = machine.Pin(22)
sck = machine.Pin(18)
mosi = machine.Pin(19)
miso = machine.Pin(16)
The Pin number refers to the GP number, not the raw pin number. It looks
like you have the Pins that are passed to Spi correct but cs is declared as
GP22, not GP17
—
Reply to this email directly, view it on GitHub
<#627 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALQY2DP66GBHH5F72IG7VETW4HPUJANCNFSM6AAAAAAVRYK5WU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I am also getting this error. Were you able to find the fix for this? |
I did but but I would have to be at my desk to look at what I did to fix it
and I am in vacation with family ATM.
…On Sat, Dec 23, 2023, 22:24 Amaan Khan ***@***.***> wrote:
Yes, I have used both my 5v rail and my 3.3v rail to power the unit, at
different times since I thought it might not be receiving enough power on
the 3.3v. When on the 5v rail I do get a different error: Traceback (most
recent call last): File "", line 27, in File "lib/sdcard.py", line 54, in
*init* File "lib/sdcard.py", line 98, in init_card File "lib/sdcard.py",
line 196, in readinto OSError: timeout waiting for response
I am also getting this error. Were you able to find the fix for this?
—
Reply to this email directly, view it on GitHub
<#627 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALQY2DOM35XF4YNDLWE76W3YK6U6BAVCNFSM6AAAAAAVRYK5WWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGQZDSNZSHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I also encountered this error; Initially, I wired 3.3v power to the sd module, but after checking the datasheet, it turned out that the module accepts 4.5-5.5v as input. so I switched the power supply port from |
Same problem, both with Pico W and RP2040 clone with 16MB ROM. from machine import SPI cs_pin = Pin(13, Pin.OUT) spi = SPI(1, sd = SDCard(spi, cs_pin) mount(vfs, '/card') print(listdir("/card")) Traceback (most recent call last): I've tried with 1GB Nokia, 2GB SanDisk and 4GB N/A all cards are formated as FAT32 and work fine on both my laptop and my headphones, As for power I've used both the 3.3V of the Picos and external power converter for breadbords. I've even tried the 1GB and 2GB cards formated as FAT with same result. |
Did you end up finding a solution? |
Went with a different SD card module
…On Thu, Mar 21, 2024, 20:04 dev12p ***@***.***> wrote:
Same problem, both with Pico W and RP2040 clone with 16MB ROM.
from machine import SPI from sdcard import SDCard from uos import VfsFat,
mount, listdir
cs_pin = Pin(13, Pin.OUT) sck = Pin(14) mosi = Pin(15) miso = Pin(12)
spi = SPI(1, baudrate=1000000, polarity=0, phase=0, bits=8,
firstbit=SPI.MSB, sck=sck, mosi=mosi, miso=miso)
sd = SDCard(spi, cs_pin) vfs = VfsFat(sd)
mount(vfs, '/card')
print(listdir("/card"))
Traceback (most recent call last): File "", line 50, in File
"/lib/sdcard.py", line 54, in *init* File "/lib/sdcard.py", line 82, in
init_card OSError: no SD card
I've tried with 1GB Nokia, 2GB SanDisk and 4GB N/A all cards are formated
as FAT32 and work fine on both my laptop and my headphones,
As for power I've used both the 3.3V of the Picos and external power
converter for breadbords.
I've even tried the 1GB and 2GB cards formated as FAT with same result.
Did you end up finding a solution?
—
Reply to this email directly, view it on GitHub
<#627 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALQY2DNC5UTHZMB6FHMI7JTYZONVLAVCNFSM6AAAAAAVRYK5WWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJUGI3DAMBSHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I found the problem, it was a combination of old breadboard and cheep patch cables. |
Hello, I Have same 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
I really don't know what to do. because i check all contacts, power, use and format 3 different SD cards, change |
Can confirm. Had the same problem and tried reformatting the sd card several times. Thanks for commenting this! |
Following :\ |
My story with this error: #871 |
I might have found something!
It seems like some other pins are being bullied by the lib. Also, if the sdcard contains chinese characters, generally some issue with unicode, it doesn't work. |
After hours of checking different configuration and stuff, this indeed worked! Thanks a lot! |
I am trying to use this library on a rpi pico:
but every time I try to run my script in micropython I get eh error of:
Any ideas on how to fix this?
The text was updated successfully, but these errors were encountered: