-
Notifications
You must be signed in to change notification settings - Fork 7.6k
SD card stops working after updating arduino-esp32 from ver. 1.0.6 to ver 2.0.2 #6189
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
Comments
One more thing, it goes without saying that you need an SD card reader AND an actual SD card to be read. either micro SD or full size SD will do, depending on your reader. |
Hello @paoloinverse, I was now replying to you in the issue you commented. Actually this is a duplicate for mounting issue. If you want to try Arduino-esp32 latest commits you need to download master branch in a zip file and unzip it in the Arduino IDE folder, where are the board data stored. What OS do you have? Can help you with that :) or just google it. In 1.0.6 there was actually a missing part which gets fixed in 2.0.0 and that fix causes mount issues with some SD cards / boards. Still don't know where exactly is a problem but there is a fix coming in PR #6162. So if you now download master branch paste it into Arduino IDE, you can after that copy changes from the PR (change in file sd_diskio.cpp and SD cards shroud mount and work fine :) Actually will help us to test the changes :) |
@P-R-O-C-H-Y thank you. I'm more than willing to help with testing. |
@paoloinverse Thats welcomed :) There is a manual to how to install it on Linux link You can find the path where is Arduino-esp32 stored:
|
Thank you but that is not the case. It seems the matter was a timeout of the first SD card hardware reply that is now fixed as the ESP32 framework correctly takes into account the possibility of an initial failure and handles it gracefully. @P-R-O-C-H-Y I can gladly confirm the fix in https://github.com/P-R-O-C-H-Y/arduino-esp32/tree/SD-fix works as expected, I just copied this over the master dir and finalized the install with get.py as per the official instructions. One final note, this fix is expected get officially into next version: 2.0.3 of arduino-esp32 You can however still apply it manually to the current 2.0.2 (at the time of writing this reply) |
@paoloinverse sorry. I was exactly facing the same issues and while trying things used core 1.0.6 and it worked. I was trying out a lot of things to make it work, and I thought changing CS solved it, but actually it was the downgrading ! After I figured out that it was the issue of the new version I deleted my comment. |
To be totally fair, I've not tried your other suggestion: while(!SD.begin()){ which actually sounded very reasonable. I leave it here just in case. (but again, there's an incoming permanent fix to the matter) |
I'm now requesting to close the issue, thank you all! |
@paoloinverse You are welcome :) |
Hello. |
@marmou-fritzing You are commenting on a closed issue. No one is going to see it. Please open a new issue. |
@marmou-fritzing and @mrengineer7777...I'm tagging @P-R-O-C-H-Y to take a look on the commet above. We can stay here, no new issue is needed for now. We will check it. :) Thanks! |
@marmou-fritzing Can you try to download latest version directly from GitHub? There are already fixes in master branch for SD card. We know that in 2.0.2 its not working very well. For now you can use master branch or stick to 1.0.6 and wait for 2.0.3 release :) |
Board
ESP32 Dev Module
Device Description
Classic 38 pins DevKitC v4 module with ESP-WROOM32 and onboard antenna
Hardware Configuration
As shown by the many pinout diagrams available: VSPI standard pins attached to the SD card reader, card is used in SPI mode.
Version
v2.0.2
IDE Name
Arduino IDE
Operating System
Linux Ubuntu 20.04.3 LTS (Focal)
Flash frequency
80MHz
PSRAM enabled
no
Upload speed
921600
Description
The SD card test example sketch is not working when using version 2.0.2 of arduino-esp32.
Also, even in any other sketch using the SD card (SD.h library), the SD.begin() calls fail consistently.
The same sketch works flawlessly with version 1.0.6
Sketch
Debug Message
Other Steps to Reproduce
Please use the sketch I made available. It's a modified version of SD_Test example that works perfectly in version 1.0.6 of arduino-esp32 and fails consistently when using version 2.0.2 of arduino-esp32
You need one SD card reader, connect GND, V+ and of course the VSS, VMISO, VMOSI, VCLK to the pertaining card reader pins. Usage of the card is in SPI mode.
steps:
Only two things I have not tried yet:
This problem seems to be somewhat widespread, and personally I'd like to understand why it appeared and if it can be software fixed within the sketch rather than being worked around by wiping the slate clean.
Sorry, I might be biased, but wiping the slate does not sound acceptable if the problem arises under normal usage of the framework.
There is one pre-existing issue that was closed with a workaround without identifying what the actual problem is, because reproducing it proved somewhat difficult: #5701
I think this time I can provide a way to reliably reproduce the issue.
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: