mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 23:40:19 +08:00
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:
committed by
Alan C. Assis
parent
bd18bda0d7
commit
bc8ce393cb
@@ -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.
|
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
|
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`
|
software implemented SPI peripheral by enabling `CONFIG_ESPRESSIF_SPI_BITBANG`
|
||||||
option.
|
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
|
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
|
Alarm 0 is active with 10 seconds to expiration
|
||||||
nsh> alarm_daemon: alarm 0 received
|
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
|
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.
|
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
|
spi
|
||||||
--------
|
--------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user