documentation: update docs on SDMMC for ESP32C3|C6|H2

Adds sdmmc_spi defconfig documentation for ESP32C3, ESP32C6 and ESP32H2 boards.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
This commit is contained in:
Filipe Cavalcanti
2025-06-25 16:06:00 -03:00
committed by Alan C. Assis
parent bd18bda0d7
commit bc8ce393cb
4 changed files with 132 additions and 0 deletions
@@ -413,6 +413,39 @@ DAC feature with following command with connecting simple LED on GPIO5
After this command you will see LED will light up in different brightness.
sdmmc_spi
---------
This configuration is used to mount a FAT/FAT32 SD Card into the OS' filesystem.
It uses SPI to communicate with the SD Card, defaulting to SPI2.
The SD slot number, SPI port number and minor number can be modified in ``Application Configuration → NSH Library``.
To access the card's files, make sure ``/dev/mmcsd0`` exists and then execute the following commands::
nsh> ls /dev
/dev:
console
mmcsd0
null
ttyS0
zero
nsh> mount -t vfat /dev/mmcsd0 /mnt
This will mount the SD Card to ``/mnt``. Now, you can use the SD Card as a normal filesystem.
For example, you can read a file and write to it::
nsh> ls /mnt
/mnt:
hello.txt
nsh> cat /mnt/hello.txt
Hello World
nsh> echo 'NuttX RTOS' >> /mnt/hello.txt
nsh> cat /mnt/hello.txt
Hello World!
NuttX RTOS
nsh>
spi
--------
@@ -433,6 +433,39 @@ If SPI peripherals are already in use you can also use bitbang driver which is a
software implemented SPI peripheral by enabling `CONFIG_ESPRESSIF_SPI_BITBANG`
option.
sdmmc_spi
---------
This configuration is used to mount a FAT/FAT32 SD Card into the OS' filesystem.
It uses SPI to communicate with the SD Card, defaulting to SPI2.
The SD slot number, SPI port number and minor number can be modified in ``Application Configuration → NSH Library``.
To access the card's files, make sure ``/dev/mmcsd0`` exists and then execute the following commands::
nsh> ls /dev
/dev:
console
mmcsd0
null
ttyS0
zero
nsh> mount -t vfat /dev/mmcsd0 /mnt
This will mount the SD Card to ``/mnt``. Now, you can use the SD Card as a normal filesystem.
For example, you can read a file and write to it::
nsh> ls /mnt
/mnt:
hello.txt
nsh> cat /mnt/hello.txt
Hello World
nsh> echo 'NuttX RTOS' >> /mnt/hello.txt
nsh> cat /mnt/hello.txt
Hello World!
NuttX RTOS
nsh>
spiflash
--------
@@ -328,6 +328,39 @@ You can set an alarm, check its progress and receive a notification after it exp
Alarm 0 is active with 10 seconds to expiration
nsh> alarm_daemon: alarm 0 received
sdmmc_spi
---------
This configuration is used to mount a FAT/FAT32 SD Card into the OS' filesystem.
It uses SPI to communicate with the SD Card, defaulting to SPI2.
The SD slot number, SPI port number and minor number can be modified in ``Application Configuration → NSH Library``.
To access the card's files, make sure ``/dev/mmcsd0`` exists and then execute the following commands::
nsh> ls /dev
/dev:
console
mmcsd0
null
ttyS0
zero
nsh> mount -t vfat /dev/mmcsd0 /mnt
This will mount the SD Card to ``/mnt``. Now, you can use the SD Card as a normal filesystem.
For example, you can read a file and write to it::
nsh> ls /mnt
/mnt:
hello.txt
nsh> cat /mnt/hello.txt
Hello World
nsh> echo 'NuttX RTOS' >> /mnt/hello.txt
nsh> cat /mnt/hello.txt
Hello World!
NuttX RTOS
nsh>
spi
--------
@@ -384,6 +384,39 @@ DAC feature with following command with connecting simple LED on GPIO5
After this command you will see LED will light up in different brightness.
sdmmc_spi
---------
This configuration is used to mount a FAT/FAT32 SD Card into the OS' filesystem.
It uses SPI to communicate with the SD Card, defaulting to SPI2.
The SD slot number, SPI port number and minor number can be modified in ``Application Configuration → NSH Library``.
To access the card's files, make sure ``/dev/mmcsd0`` exists and then execute the following commands::
nsh> ls /dev
/dev:
console
mmcsd0
null
ttyS0
zero
nsh> mount -t vfat /dev/mmcsd0 /mnt
This will mount the SD Card to ``/mnt``. Now, you can use the SD Card as a normal filesystem.
For example, you can read a file and write to it::
nsh> ls /mnt
/mnt:
hello.txt
nsh> cat /mnt/hello.txt
Hello World
nsh> echo 'NuttX RTOS' >> /mnt/hello.txt
nsh> cat /mnt/hello.txt
Hello World!
NuttX RTOS
nsh>
spi
--------