SPI Master and SD SPI Host Drivers

andpet
Posts: 2
Joined: Thu Sep 28, 2023 6:07 pm

SPI Master and SD SPI Host Drivers

Postby andpet » Thu Sep 28, 2023 6:10 pm

As per my understanding spi_master ("SPI Master driver") and esp_flash use DMA and
synchronize access to multiple devices (registered with spi_bus_add_device() or spi_bus_add_flash_device())
Nice!

My ESP32-S3 PCB has both a SD card and data flash connected on SPI3, so I want both a SD driver and a flash driver.

Is the peripheral driver "SD SPI Host Driver" compatible with spi_master or are they mutually exclusive for a particular SPI bus?
https://espressif-docs.readthedocs-host ... _host.html
states "SD SPI driver [...] does not support time-division multiplexing on the same SPI bus"
which seems to contradict spi_master.

Further, the peripheral driver "SDMMC Host Driver"
https://docs.espressif.com/projects/esp ... _host.html
"... is a protocol level driver built on top of SDMMC and SD SPI host drivers"
When would I use SDMMC and when would I use SD SPI Host?

Or should I use an external SD card library and implement hooks for it to communicate with spi_master?

Thanks

Who is online

Users browsing this forum: Gaston1980, Majestic-12 [Bot] and 239 guests