Chapter 4 Read and Write the SDcard
An SDcard slot is integrated on the back of the ESP32-S3 WROOM. In this chapter we learn how to use ESP32-
S3 to read and write SDcard.
Project 4.1 SDMMC Test
Component List
Component knowledge
SD card read and write method
ESP32-S3 has two ways to use SD card, one is to use the SPI interface to access the SD card, and the other is
to use the SDMMC interface to access the SD card. SPI mode uses 4 IOs to access SD card. The SDMMC has
one-bit bus mode and four-bit bus mode. In one-bit bus mode, SDMMC use 3 IOs to access SD card. In four-
bit bus mode, SDMMC uses 6 IOs to access the SD card.
The above three methods can all be used to access the SD card, the difference is that the access speed is
different.
In the four-bit bus mode of SDMMC, the reading and writing speed of accessing the SD card is the fastest. In
the one-bit bus mode of SDMMC, the access speed is about 80% of the four-bit bus mode. The access speed
of SPI is the slowest, which is about 50% of the four-bit bus mode of SDMMC.
Usually, we recommend using the one-bit bus mode to access the SD card, because in this mode, we only
need to use the least pin IO to access the SD card with good performance and speed.