docs: machine.SDCard: clarify, which SPI device is used
I am using this code here:
sd = machine.SDCard(slot=SD_SLOT,
width=SD_WIDTH,
sck=SD_SCK_PIN,
mosi=SD_MOSI_PIN,
miso=SD_MISO_PIN,
cs=SD_CS,
freq=SD_FREQ)
However it's not clear, which hardware SPI device is used.
I am using the ESP32-S3 (quad SPIRAM). It seems that SPI id=2 is used.
Is it possible to clarify this on the documentation? Or even let the user specify a parameter?
sdcard esp32 does not work TTGO T8 V1.8
Hi,
i am using a TTGO T8 V1.8 devboard which has an onboard card reader. i installed the newest micropyhton Version on the board.
The Board has on the bottom side following description:
SD
D2=12
D3=13
CMD=15
CLK=14
D0=2
D1=4
i used the following Code to use the SD-Card:
import machine, sdcard, os
from machine import Pin, SPI
spisd = machine.SPI(2, baudrate=10000000, polarity=0, phase=0, sck=machine.Pin(14), miso=machine.Pin(2), mosi=machine.Pin(15))
sd = sdcard.SDCard(spisd, machine.Pin(13))
vfs = os.VfsFat(sd)
os.mount(vfs, "/sd")
When the esp32 starts i get the following error:
WebREPL daemon started on ws://XXX.XXX.XXX.XXX:8266
Started webrepl in normal mode
I (8681) gpio: GPIO[15]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (8681) gpio: GPIO[2]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (8681) gpio: GPIO[14]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (8961) gpio: GPIO[15]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pullown: 0| Intr:0
I (8961) gpio: GPIO[2]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (8961) gpio: GPIO[14]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
Traceback (most recent call last):
File "main.py", line 6, in <module>
OSError: [Errno 19] ENODEV
MicroPython v1.10 on 2019-01-25; ESP32 module with ESP32
Type "help()" for more information.