can we share the SPI bus with SDCard? #17962
-
DescriptionI am using M5Stack's M5Paper base on esp32 port. 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 "", line 1, in OSError: (-259, 'ESP_ERR_INVALID_STATE') 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 SizeNo response ImplementationI hope the MicroPython maintainers or community will implement this feature Code of ConductYes, I agree |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This is unsuitable for the MicroPython bug tracker - converted to a discussion. The official SD card driver can be used on a shared bus - see this code comment. |
Beta Was this translation helpful? Give feedback.
-
@peterhinch thanks a lot! I'v installed that SD card driver, it works like a charm! and I'v learnt how to dynamic change SPI speed without deinit and init it! You've been great. |
Beta Was this translation helpful? Give feedback.
This is unsuitable for the MicroPython bug tracker - converted to a discussion.
The official SD card driver can be used on a shared bus - see this code comment.