Skip to content
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

Get external SPI SD reader working on M5StickC-Plus #350

Merged
merged 1 commit into from
Oct 12, 2023

Conversation

n0xa
Copy link
Contributor

@n0xa n0xa commented Oct 11, 2023

I wasn't able to get an SD card reader to work with the default SD_CS configuration for the M5StickC-Plus no matter how I wired it up to any of the front pins or Grove port on the back, so I fixed it up.

This change sets up a new single-purpose external SPI bus on the front-panel pins of the M5StickC-Plus. All requisite logic changes are gated in an ifdef specific to the MARAUDER_M5STICKC board target.

A new SPIClass named SPI_EXT is configured. SD_CS is set to -1 since it's unnecessary, as it's the only peripheral on this new SPI bus. Wiring notes in a comment. The wiki will be updated accordingly afrer merge.

Testing results:

  • SD Interface is initialized at boot
  • SD is green in status bar
  • PCAPs are logged to the SD Card
  • The lower the battery gets, the more likely the SD Card interface will start flaking out
  • Certain SD cards are more tolerant to lower voltages than others. External power recommended
  • Evilportal errors if ap.config.txt is missing.
  • If index.html and ap.config.txt are present on the SD filesystem, ESP32Marauder crashes with a stack trace. This is likely unrelated to the SD Card and may have something to do with the ESP32-Pico-D4 or some other oddity in this platform's tech stack.

@justcallmekoko
Copy link
Owner

Can you reconfigure your MR to target merge into the develop branch and resolve any conflicts that come up?

@n0xa n0xa changed the base branch from master to develop October 12, 2023 14:31
@n0xa
Copy link
Contributor Author

n0xa commented Oct 12, 2023

All set. Cheers.

@justcallmekoko justcallmekoko merged commit ad6addf into justcallmekoko:develop Oct 12, 2023
1 check passed
@n0xa n0xa deleted the M5Stick-Ext-SDCard branch October 13, 2023 00:59
schrab pushed a commit to schrab/ESP32S3Marauder that referenced this pull request Jul 3, 2024
Get external SPI SD reader working on M5StickC-Plus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants