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?
can we share the SPI bus with SDCard?
Description
I am using M5Stack's M5Paper base on esp32 port.
it shares the spi bus with eink panel controller it8951e and tfcard reader using two cs lines.
I can communicate it8951e use SPI bus via eink_cs.
but when I want to create a TFCard object using same SPI bus, it raise error.
<pre>
SDCard(slot=3, width=1, cd=None, wp=None, sck=Pin.board.SPI_SCK, miso=Pin.board.SPI_MISO, mosi=Pin.board.SPI_MOSI,cs=Pin.board.TF_CS, freq=20000000)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: (-259, 'ESP_ERR_INVALID_STATE')
</pre>
the micropython manual about TFCard said "SPI mode makes use of a SPI host peripheral, which cannot concurrently be used for other SPI interactions."
I thought share the SPI bus with multiply peripherals is a common demands.
I have look the implement of TFCard of esp32 port, it initialize SPI bus while choose SPI mode, can we pass in a SPI bus directly instead of just pass in mosi/miso/clk/freq etc?
Code Size
No response
Implementation
I hope the MicroPython maintainers or community will implement this feature
Code of Conduct
Yes, I agree