espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.55k stars 7.39k forks source link

Errors while interacting with SD card #3741

Closed katzuv closed 4 years ago

katzuv commented 4 years ago

Hardware:

Board: ESP32-CAM Core Installation/update date:
IDE name: Arduino IDe Flash Frequency: don't know PSRAM enabled: yes Upload Speed: 115200 Computer OS: Ubuntu 16.04

Description:

I have an ESP32-CAM board with a microSD card attached (16GB). In my setup function I create a directory. In loop the ESP32-CAM takes images and stores in the directory. The code successfully creates the directory and captures one image inside the directory. However, when the loop function runs the second time, I get the following errors:

E (10911) sdmmc_cmd: sdmmc_read_sectors_dma: sdmmc_send_cmd returned 0xffffffff
E (10912) diskio_sdmmc: sdmmc_read_blocks failed (-1)
E (11913) sdmmc_req: sdmmc_host_wait_for_event returned 0x107
E (11913) sdmmc_cmd: sdmmc_read_sectors_dma: sdmmc_send_cmd returned 0x107
E (11914) diskio_sdmmc: sdmmc_read_blocks failed (263)

What can I do to fix those? Thank you!

Sketch: (leave the backquotes for code formatting)

Link to gist

Debug Messages:

Enable Core debug level: Debug on tools menu of Arduino IDE, then put the serial output here Can't find "debug" in tools menu of Arduino IDE.

stale[bot] commented 4 years ago

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 4 years ago

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.

CharStiles commented 10 months ago

I am running into the same issue, I am able to follow this tutorial alright! https://dronebotworkshop.com/esp32-cam-microsd/ so i know my SD card isnt bad. The issue arises when I try to use a TFT display. I think that the pins that the TFT are using interfere with SD card reading. I am not a well seasoned embedded programmer, so there might be something obvious i am missing