documentation: update docs on SDMMC for ESP32|S2|S3
Build Documentation / build-html (push) Has been cancelled

This commit is contained in:
Filipe Cavalcanti
2025-06-24 08:08:55 +08:00
committed by Xiang Xiao
parent 02dae3e5eb
commit 2ddfab618b
7 changed files with 111 additions and 5 deletions
@@ -951,6 +951,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 SPI3.
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>
smp
---
@@ -463,11 +463,14 @@ the ``buttons`` application and pressing on any of the available board buttons::
To avoid any conflicts, it's not registered in the buttons subsystem and, thus,
is unable to be used.
mmcsdspi
--------
sdmmc_spi
---------
This configuration is used to mount a FAT/FAT32 SD Card into the OS' filesystem.
For the ESP32-LyraT, make sure the DIP switches 1 and 2 are turned to the ON position.
The SD slot number, SPI port number and minor number can be modified in ``Application Configuration → NSH Library``.
To access the card's files, execute the following commands::
nsh> mount -t vfat /dev/mmcsd0 /mnt
@@ -202,10 +202,13 @@ driver. You can find LVGL here::
This configuration uses the LVGL demonstration at `apps/examples/lvgldemo`.
mmcsdspi
--------
sdmmc_spi
---------
This configuration is used to mount a FAT/FAT32 SD Card into the OS' filesystem.
The SD slot number, SPI port number and minor number can be modified in ``Application Configuration → NSH Library``.
To access the card's files, execute the following commands::
nsh> mount -t vfat /dev/mmcsd0 /mnt
@@ -415,7 +415,7 @@ RMT Yes
RNG Yes
RSA No
RTC Yes
SD/MMC No
SD/MMC Yes SPI based SD card driver
SDIO No
SHA Yes
SPI Yes
@@ -478,6 +478,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>
timer
-----
@@ -397,6 +397,7 @@ RMT Yes
RNG Yes
RSA No
RTC Yes
SD/MMC Yes SPI based SD card driver
SHA No
SPI Yes
SPIFLASH Yes
@@ -753,6 +753,39 @@ Format and mount the SD/MMC device with following commands::
FAT filesystem is enabled in the default configuration. Other filesystems may
also work.
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>
smp
---