Skip to content

ESP32S2 - Fix SPI's SD card issue, add pin protections #3448

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

Merged
merged 2 commits into from
Sep 23, 2020
Merged

ESP32S2 - Fix SPI's SD card issue, add pin protections #3448

merged 2 commits into from
Sep 23, 2020

Conversation

hierophect
Copy link
Collaborator

This PR implements the same fix for ESP3-S2 as was previously done for STM32 (PR: #3431, issue: #3176). Details are more or less the same as the previous fix, and while I did not test precise timings in this case we can probably assume the same small loss in transmission speed at higher SPI baudrates due to the memset() involved. Tested on Saola 1 Wrover compared to a control case where SD card was not working. Test sketch.

Also adds in some precautionary exceptions for cases where either MOSI and MISO are unset, which would cause IDF errors and null reference exceptions during reboots.

Resolves #3396, part one of addressing #3447

@hierophect hierophect added the espressif applies to multiple Espressif chips label Sep 21, 2020
jepler
jepler previously approved these changes Sep 21, 2020
Copy link

@jepler jepler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. No testing performed.

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt tannewt merged commit dd86cb0 into adafruit:main Sep 23, 2020
@hierophect hierophect deleted the esp32-sd-fix branch September 24, 2020 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
espressif applies to multiple Espressif chips
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ESP32-S2 SD card won't mount?
3 participants