Oddities with SD

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
HayGuy
Posts: 2
Joined: Sat Jul 02, 2022 5:14 am

Oddities with SD

Post by HayGuy » Sat Jul 02, 2022 5:41 am

Greetings! Faced a very strange problem when working with the built-in SD slot

Initially (still on micropotchon 1.17) I had a problem with the SD card, in order to re-mount it, I had to reboot the board. This is very strange, because I unmount the sd card when my code was completed.

Code: Select all

import machine, os

sd = machine.SDCard(slot=2)
os.mount(sd, "/sd")
I've made peace with it and just implemented an automatic reload of the board after the code ends. But now even that is impossible! This time when I access the sd card I get 3 different errors each time.

1) When i opening any file: E (19210) sdmmc_cmd: sdmmc_write_sectors_dma: sdmmc_send_cmd returned 0x108
2) When i get card info by

Code: Select all

sd.info()
: (-264, 'ESP_ERR_INVALID_RESPONSE') or E (940) sdmmc_sd: sdmmc_init_sd_if_cond: send_if_cond (1) returned 0x108
3) When i mounting SD without reboot: (-259, 'ESP_ERR_INVALID_STATE') or OSError: 16 Note: SD Card unmounting always.

The saddest part is that it doesn't happen every time. Sometimes it still works and I have this problem on 3 different boards.
List of boards on which the problem is observed:
- LILYGO® TTGO T-Camera Plus ESP32-DOWDQ6 : http://www.lilygo.cn/prod_view.aspx?Typ ... t3:50067:3
- LILYGO® TTGO VGA32 V1.4 : http://www.lilygo.cn/prod_view.aspx?Typ ... t3:50063:3
- Goouuu ESP32F Dev Kit : https://prnt.sc/yddtje - pinout

PS The card has a size of 1 GB, and it was additionally checked on arduino through an additional module, where it always worked properly. From the computer, there are no problems with the SD card either.

tepalia02
Posts: 99
Joined: Mon Mar 21, 2022 5:13 am

Re: Oddities with SD

Post by tepalia02 » Sat Jul 02, 2022 11:19 am

Hi, which board are you using? Is that a Raspberry Pi Pico?

HayGuy
Posts: 2
Joined: Sat Jul 02, 2022 5:14 am

Re: Oddities with SD

Post by HayGuy » Sat Jul 02, 2022 8:23 pm

I last tested this on an ESP32F Dev Kit (Last board on the list of all the boards I tested this on).

Post Reply