Skip to content

ESP32-S2 WROVER: SD card example #3329

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
emard opened this issue Aug 26, 2020 · 5 comments
Closed

ESP32-S2 WROVER: SD card example #3329

emard opened this issue Aug 26, 2020 · 5 comments
Labels
bug espressif applies to multiple Espressif chips

Comments

@emard
Copy link

emard commented Aug 26, 2020

Is there some recommended pinout (schematics) to
connect and example commands how to mount SD card
to Saola-1 WROVER module?

I'd like simple example how to mount SD card in 1-bit (SPI) mode
(pin saving) and 4-bit (MMC) mode (faster).

@tannewt
Copy link
Member

tannewt commented Aug 26, 2020

Hi! We haven't tested SDCards with the S2 yet. The SPI based SD library and it's examples should just work. Most pins will work up to 40mhz. You'll need to pick specific pins to get up to 80mhz. They allow for the SPI peripheral to talk to pins via the IOMUX directly.

We don't have any examples using SDIO to talk to the card and I'm not sure the ESP32-S2 has a peripheral to do it.

@tannewt tannewt closed this as completed Aug 26, 2020
@emard
Copy link
Author

emard commented Aug 27, 2020

I have tried this pinout but it doesn't work for my ESP32-S2 and
adafruit-circuitpython-espressif_saola_1_wrover-en_US-20200827-fe73cfb.bin

gpio_csn = board.IO34 # SD_D3
gpio_mosi = board.IO35 # SD_CMD
gpio_sck = board.IO36 # SD_CLK
gpio_miso = board.IO37 # SD_D0

full source for my SD mount attempt is here:
https://github.com/emard/esp32ecp5/blob/master/circuitpython/sdmount.py#L1

@koendv
Copy link

koendv commented Sep 12, 2020

This is pinout of, and code for, a board with esp32-s2, sdcard and optional lcd. HTH.

pinout with sdcard
pinout with sdcard and lcd
github with code

@jepler
Copy link

jepler commented Sep 12, 2020

I think it's likely that it doesn't work due to the ignored value of write_value in common_hal_busio_spi_read, an esp32 flavored version of #3176. This function (at least handling the all-ones value 0xff) is required for SPI SD cards to work.

@jepler jepler reopened this Sep 12, 2020
@jepler jepler added bug espressif applies to multiple Espressif chips labels Sep 12, 2020
@jepler
Copy link

jepler commented Sep 13, 2020

Closing again in favor of #3396

@jepler jepler closed this as completed Sep 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug espressif applies to multiple Espressif chips
Projects
None yet
Development

No branches or pull requests

4 participants