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

Initialization fails with ESP32 #488

Open
Calypso514 opened this issue Jun 19, 2024 · 1 comment
Open

Initialization fails with ESP32 #488

Calypso514 opened this issue Jun 19, 2024 · 1 comment

Comments

@Calypso514
Copy link

Calypso514 commented Jun 19, 2024

Hi everyone,

I'm using an ESP32 board (Firebeetle ESP32) and I can't make this lib work on it. The wiring is correct since SD lib works perfectly. I've tried the lib and the SD card on two other boards (Arduino Uno and Arduino Zero) and it works.
Yet, no example sketch works with the ESP32 board except "SdInfo". The initialization always fails and I get the following error :

begin() failed
Do not reformat the SD.
SdError: 0X19,0X0

Does someone know why it fails ?

Thanks in advance

@greiman
Copy link
Owner

greiman commented Jun 19, 2024

The error occurs here.

This is could be a SPI problem. The SD driver was expecting a DATA_START_SECTOR token which is 0XFE but received 0X0.

The wiring is correct since SD lib works perfectly.

The wiring may be correct but ESP32 often has problems with SdFat since the default SPI speed is much higher than with the SD library. This can be due to the ESP32 driver, the SD socket, wiring that does not support max speed, or another device on the SPI bus.

Try the QuickStart example which runs at a slow clock.

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

No branches or pull requests

2 participants