SD card issue-Presto

I have been trying to do the sd_basic.py setup on my Presto and all I get is “timeout waiting for v2 card”. I’m using a 32G card format in FAT.

1 Like

Have you tried the card in exFAT format? I have only used the one included in the bundle and have not checked the formatting, but it works without an issue.

no but I will Thank you

tried exFat. No change. still getting timed out message

This worked for me on my PRESTO

# PRESTO SD card TEST
# Tony Goodhew Feb 2025
import sdcard  
import machine  
import uos
# Normal
#sd_spi = machine.SPI(1, sck = machine.Pin(10, machine.Pin.OUT), mosi = machine.Pin(11, machine.Pin.OUT), miso = machine.Pin(12, machine.Pin.OUT))  
#sd = sdcard.SDCard(sd_spi, machine.Pin(9))  

# PRESTO
sd_spi = machine.SPI(0, sck=machine.Pin(34, machine.Pin.OUT), mosi=machine.Pin(35, machine.Pin.OUT), miso=machine.Pin(36, machine.Pin.OUT))
sd = sdcard.SDCard(sd_spi, machine.Pin(39))
uos.mount(sd, "/sd")  
  
print("Size: {} MB".format(sd.sectors/2048)) # to display card's capacity in MB  
print(uos.listdir("/sd"))  
print("\n=======================\n")  
print("Basic SDcard Test \n")  
  
with open("/sd/test2.txt", "w") as f: # Write - new file  
    f.write("First Message\r\n")  
  
with open("/sd/test2.txt", "a") as f: # Append  
    f.write("Tony Goodhew\r\n")  
  
with open("/sd/test2.txt", "a  ") as f:  
    f.write("Leicester City Cup Winners!\r\n")  
      
with open("/sd/test2.txt", "a  ") as f:  
    for i in range(10):  
        f.write(str(i) + ", " + str(i*i*i) + ", " + str(i*i*i*i) + "\r\n")  
  
  
with open("/sd/test2.txt", "a  ") as f:  
    f.write("Looping all done!\r\n")  
          
with open("/sd/test2.txt", "r") as f:  
    print("Printing lines in file: Method #1\n")  
    line = f.readline()  
    while line != '':   # NOT EOF  
        print(line)  
        line = f.readline()  
  
  
with open("/sd/test2.txt", "r") as f:  
    lines = f.readlines()  
    print("Printing lines in file: Method #2")  
    for line in lines:  
        print(line)  
  
uos.umount("/sd") 

Hope you get it working

Thank you Tony. Now I’m getting this

Traceback (most recent call last):
  File "<stdin>", line 12, in <module>
  File "sdcard.py", line 1, in __init__
  File "sdcard.py", line 1, in init_card
  File "sdcard.py", line 1, in init_card_v2
OSError: timeout waiting for v2 card

What make and size of card are you using and where did you buy it from?

There are some really terrible cards out there. The Raspberry Pi Foundation have high-lighted this problem in the past.

I’m using a ScanDisk Ultra 16 GB HC I C10 speed. Bought from Amazon or Ebuyer.

I missed out the last part of my test program in the previous code post. I’ve now corrected the omission.

Can you try a different card?

Thanks again. My original card was anew microcenter 32G C10 card from amazon. changed to a PNY Elite 32G C10 I always use for RPi setup.
Now getting


MPY: soft reboot
Traceback (most recent call last):
  File "<stdin>", line 13, in <module>
OSError: [Errno 19] ENODEV
>>> 

I think it is a connection problem.

Have a look here:
mount sdcard to pico. OSError: [Errno 19] ENODEV : r/raspberrypipico

SD cards are SPI devices and you can just solder the adaptor pads to pins and use them. See my Pico Road Test here - about 80% through.:

Raspberry Pi Pico - Review - element14 Community

1 Like

Thanks Tony. I went to the basement and got a SD to Micro adapter and old cheap SanDisk SD card. It tested good and I even pulled old jpg from SD and it displayed. After that I installed new micro SD in it’s adapter and put them in them SD to micro and they still don’t work. all cards are format in Fat32. I’m going to download from another source as there may be an issue with my card reader on my MacBook Pro. Thanks again for your help.

If my test program does not work on your PRESTO with any of your SD cards it could be a soldering connection problem on your PRESTO.

I updated the firmware on my Presto(should have done that first) and now everything is normal. Thanks again Tony on your efforts.

It is always worth keeping up to date with the uf2s - especially with a Beta product. I’m glad you have it working now.

Have fun!

1 Like