-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Trying to get SD card information using SDFS.info64
function leads to a crash.
#8822
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
Looks like an accident that this worked at all Lines 35 to 38 in ead5f94
Arduino/libraries/SDFS/src/SDFS.h Lines 137 to 143 in ead5f94
Unless I am missing some other issue... I don't see any more WDTs after replacing SDFSConfig config;
config.setCSPin(D0);
SDFS.setConfig(config);
SDFS.begin(); |
...and the only difference seems to be
|
I got the same issue with this piece of code: SDFSConfig config;
config.setCSPin(D0);
SDFS.setConfig(config);
if (!SDFS.begin()) {
Serial.println("Initialization failed!");
}
else
{
Serial.println("Initialization successful!");
FSInfo64 sd_info;
SDFS.info64(sd_info);
Serial.print(F("File system total space: "));
Serial.print(PriUint64<DEC>(sd_info.totalBytes));
Serial.println();
} Output:
|
As I understood our SPI logic, this just happens when we fail the transaction / don't receive a reply. Have you tried adjusting speeds to a different MHZ values? Only thing that comes to mind, otherwise I am not really sure of where the problem might be based on the traces. |
I tried different settings in the
|
Another guess related to speed - how big is your SD card? Since we know the trace above shows us stalling around here
https://github.com/greiman/SdFat/blob/628effa1c277e6dc1fef461b4b755ad300735248/src/FatLib/FatPartition.cpp#L354-L380 edit: |
2.0.2 used Comparing with some random 4GB HC SD, at least some explanation for my results
|
SdFat 2.0.2+ doesn't call yield(), make sure we don't trigger SWDT fix esp8266#8822
SdFat 2.0.2+ doesn't call yield(), make sure we don't trigger SWDT fix #8822
SdFat 2.0.2+ doesn't call yield(), make sure we don't trigger SWDT fix esp8266#8822
Basic Infos
Platform
platform = [email protected]
in platformio.ini file)-DDEBUG_ESP_CORE -DDEBUG_ESP_PORT=Serial
build flags)Settings in IDE
Problem Description
Trying to get SD card information using
SDFS.info64
function leads to a crash.It works fine using Core version 3.0.2 (using
platform = [email protected]
in platformio.ini file).MCVE Sketch
Debug Messages
The text was updated successfully, but these errors were encountered: