sdcard doesn't work with SoftSPI
Posted: Mon Jan 18, 2021 7:14 pm
Hello today i have built the latest firmware with my custom modules and upload my esp32, however the regular sd card module started not to work. When i tried to use it as it was tomorrow i got an error :
i got this error
cannot initialize.
Is it about the SoftSPI or sdcard module?
thanks
and i usedWarning: SPI(-1, ...) is deprecated, use SoftSPI(...) instead
Code: Select all
import machine
import sys
from machine import SoftSPI,Pin
import sdcard
import uos
spi =SoftSPI(baudrate=1000000,polarity=1,phase=0,sck=Pin(18),mosi=Pin(5),miso=Pin(19))
sd = sdcard.SDCard(spi,Pin(23))
uos.mount(sd,"/sd")
which meansFile "sd.py", line 8, in <module>
Code: Select all
sd = sdcard.SDCard(spi,Pin(23))
Is it about the SoftSPI or sdcard module?
thanks