Skip to content

SD card issues with ESP32S3 in SDMMC mode #7373

Closed
@mtk11

Description

@mtk11

Board

Custom ESP32S3 board

Device Description

Custom board

Hardware Configuration

SDMMC_CMD 35
SDMMC_CLK 36
SDMMC_D0 37
SDMMC_D1 38
SDMMC_D2 39
SDMMC_D3 40

Version

v2.0.5

IDE Name

Arduino

Operating System

Windows 7

Flash frequency

80 MHz

PSRAM enabled

no

Upload speed

921600

Description

Errors appear.ed

Sketch

https://github.com/espressif/arduino-esp32/blob/master/libraries/SD_MMC/examples/SDMMC_Test/SDMMC_Test.ino

Pin config: SD_MMC.setPins(36, 35, 37, 38, 39, 40);

Debug Message

..... 
E (1237) sdmmc_req: sdmmc_host_wait_for_event returned 0x107
E (1237) diskio_sdmmc: Check status failed (0x107)
E (2238) sdmmc_req: sdmmc_host_wait_for_event returned 0x107
E (2238) diskio_sdmmc: Check status failed (0x107)
Writing file: /hello.txt
File written
Appending to file: /hello.txt
Message appended
Reading file: /hello.txt
Read from file: Hello World!
Deleting file: /foo.txt
File deleted
Renaming file /hello.txt to /foo.txt
File renamed
Reading file: /foo.txt
Read from file: Hello World!
1048576 bytes read for 198 ms
E (3491) sdmmc_req: handle_idle_state_events unhandled: 00000042 00000000
1048576 bytes written for 1413 ms
Total space: 1881MB
Used space: 21MB

With ESP3D 3.0 (https://github.com/luc-github/ESP3D/tree/3.0), getting the following:

E (61131) sdmmc_req: sdmmc_host_wait_for_event returned 0x107
E (61131) diskio_sdmmc: Check status failed (0x107)
E (62132) sdmmc_req: sdmmc_host_wait_for_event returned 0x107
E (62132) diskio_sdmmc: Check status failed (0x107)
E (78447) sdmmc_req: sdmmc_host_wait_for_event returned 0x107
E (78447) diskio_sdmmc: Check status failed (0x107)
E (80560) sdmmc_req: sdmmc_host_wait_for_event returned 0x107
E (80560) diskio_sdmmc: Check status failed (0x107)
E (81561) sdmmc_req: sdmmc_host_wait_for_event returned 0x107
E (81561) diskio_sdmmc: Check status failed (0x107)
E (82562) sdmmc_req: sdmmc_host_wait_for_event returned 0x107
E (82562) diskio_sdmmc: Check status failed (0x107)
E (82564) sdmmc_cmd: sdmmc_read_sectors_dma: sdmmc_send_cmd returned 0x109
E (82568) diskio_sdmmc: sdmmc_read_blocks failed (265)
E (82574) sdmmc_req: handle_idle_state_events unhandled: 00000008 00000002
E (83697) sdmmc_req: sdmmc_host_wait_for_event returned 0x107
E (83697) diskio_sdmmc: Check status failed (0x107)
E (84698) sdmmc_req: sdmmc_host_wait_for_event returned 0x107
E (84698) diskio_sdmmc: Check status failed (0x107)

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Activity

self-assigned this
on Oct 20, 2022
me-no-dev

me-no-dev commented on Oct 21, 2022

@me-no-dev
Member

depending on the chip/module model, pins 35 to 37 might be in use by OPI flash/psram. Any chip/module that ends on R8 will be using OPI PSRAM and have those pins reserved.

mtk11

mtk11 commented on Oct 21, 2022

@mtk11
Author

@me-no-dev , The module does not have ext SPI RAM was N8R2, after changing it to N8 had no issues, except the slow speed.. Esp-idf’s SD Card example (SDMMC) works fine. Recently esp-idf had some updates - sdmmc/sdspi: allow custom setup of SD card frequency ? Do you intend to include them soon ?

me-no-dev

me-no-dev commented on Oct 21, 2022

@me-no-dev
Member

That fix will be part of ESP32 Arduino 3.0.0: #6225 (comment)

moved this from In Review to In Progress in Arduino ESP32 Core Project Roadmapon Oct 21, 2022
added this to the 3.0.0 milestone on Oct 21, 2022
timknapen

timknapen commented on Jan 9, 2023

@timknapen

Could this be related to [SDMMC] ESP32-S3-N8R8 fails to start a microSD card in SDMMC_FREQ_HIGHSPEED mode (IDFGH-6901)?

It looks like @igrr has a patch there, but I don't know if it's already included in Arduino-esp32

P-R-O-C-H-Y

P-R-O-C-H-Y commented on Jan 10, 2023

@P-R-O-C-H-Y
Member

@timknapen Can you please fix the link to the related issue? Thanks

27 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @timknapen@mikaeltulldahl@me-no-dev@Jason2866@HelloDB

      Issue actions

        SD card issues with ESP32S3 in SDMMC mode · Issue #7373 · espressif/arduino-esp32