Flash SD Card Module Version Error

RP2040 based microcontroller boards running MicroPython.
Target audience: MicroPython users with an RP2040 boards.
This does not include conventional Linux-based Raspberry Pi boards.
Post Reply
thecomeback_king
Posts: 6
Joined: Tue Aug 03, 2021 12:31 pm

Flash SD Card Module Version Error

Post by thecomeback_king » Tue Feb 22, 2022 11:56 pm

Hi,
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

Post Reply