I am trying to connect a SPI flash sd card module to my pi pico. Currently it errors out saying "couldnt determine SD card version". Is anyone able to help with this error?
Below is my code and error message.
Code: Select all
#SPI1 BUS Pins
sck_1 = Pin(10)
mosi_1 = Pin(11)
miso_1 = Pin(8)
#FLASH Module Init
flash_cs = Pin(9, Pin.OUT)
mode = 1
spi_mp = SPI(mode, sck=sck_1, mosi=mosi_1, miso=miso_1)
flash = sdcard.SDCard(spi_mp, flash_cs)
vfs = uos.VfsFat(flash)
uos.mount(vfs, "/sd")
Code: Select all
Traceback (most recent call last):
File "<stdin>", line 40, in <module>
File "/lib/sdcard.py", line 54, in __init__
File "/lib/sdcard.py", line 82, in init_card
OSError: no SD card