Skip to content

Conversation

@Throows
Copy link

@Throows Throows commented Sep 13, 2025

Description

Hello, I added the SDMMC peripheral. This is just copy paste from the hw/xtensa/esp32.c.

Related

Fix for issue : #139.

Testing

no extensive test has been done. I only ran the sdmmc_card example program and it worked.

Here is the log output :

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x4 (SPI_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce2820,len:0x1568
load:0x403c8700,len:0xf0c
load:0x403cb700,len:0x352c
entry 0x403c8a9c
I (37) boot: ESP-IDF v5.5.1 2nd stage bootloader
I (39) boot: compile time Sep 13 2025 17:54:54
I (39) boot: Multicore bootloader
I (48) boot: chip revision: v0.0
I (49) boot: efuse block revision: v0.0
I (51) boot.esp32s3: Boot SPI Speed : 80MHz
I (52) boot.esp32s3: SPI Mode       : SLOW READ
I (52) boot.esp32s3: SPI Flash Size : 2MB
(-- snip --)
I (215) app_init: Application information:
I (216) app_init: Project name:     sd_card
I (216) app_init: App version:      1
I (216) app_init: Compile time:     Sep 13 2025 17:54:49
I (216) app_init: ELF file SHA256:  491bd1e5e...
I (216) app_init: ESP-IDF:          v5.5.1
I (216) efuse_init: Min chip rev:     v0.0
I (216) efuse_init: Max chip rev:     v0.99 
I (216) efuse_init: Chip rev:         v0.0
(-- snip --)
I (235) main_task: Calling app_main()
I (235) example: Initializing SD card
I (235) example: Using SDMMC peripheral
I (235) example: Mounting filesystem
I (305) example: Filesystem mounted
Name: QEMU!
Type: SDSC
Speed: 160.00 MHz (limit: 20.00 MHz)
Size: 1MB
CSD: ver=1, sector_size=512, capacity=2048 read_bl_len=9
SSR: bus_width=4
I (315) example: Opening file /sdcard/hello.txt
I (345) example: File written
I (345) example: Renaming file /sdcard/hello.txt to /sdcard/foo.txt
I (355) example: Reading file /sdcard/foo.txt
I (355) example: Read from file: 'Hello QEMU!!'
I (355) example: Opening file /sdcard/nihao.txt
I (365) example: File written
I (365) example: Reading file /sdcard/nihao.txt
I (365) example: Read from file: 'Nihao QEMU!!'
I (365) example: Card unmounted
I (365) main_task: Returned from app_main()

Checklist

Before submitting a Pull Request, please ensure the following:

  • 🚨 This PR does not introduce breaking changes.
  • All CI checks (GH Actions) pass.
  • Documentation is updated as needed.
  • Tests are updated or added as necessary.
  • Code is well-commented, especially in complex areas.
  • Git history is clean — commits are squashed to the minimum necessary.

Thanks
~Romain

@github-actions github-actions bot changed the title hw/xtensa/esp32s3: add sdmmc peripheral hw/xtensa/esp32s3: add sdmmc peripheral (QEMU-276) Sep 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants