Go Down

Topic: Have to re-insert SD to initialize (Read 236 times) previous topic - next topic

VMike

Apr 11, 2019, 10:17 am Last Edit: Apr 11, 2019, 10:34 am by VMike
Hi!
I'm using the ethernet shield on an Arduino Mega 2560.
I need both functions, ethernet and the SD functions.

Everything works fine, except for one thing.
The SD card can't be initialize, SD.begin() fails.

BUT: when I remove  and insert the SD again, everything works.
The card can be initialized, files can be written , etc...
As long as I don't retsart the Mega... reset or Power Off/ON, and it's not working again.

I spent a couple of hours to find a solution, but didn't find one.

I tried with SD.h as well as sdFAT.h
I tried to set pin 53 to Output (high and low)
I tried to set pin 10 to Output (high and low)
I tried to set pin 4 to Output (high and low) (high disabled the SD completely)

nothing worked for me... allways the same thing... remove and insert again... everything OK

Is ther a way to "simulate" remove-insert by software?
Any other solutions?



knut_ny

Try another card. (an old,slow one <2GB often works best)
Ny

Go Up