So I just bought a Mega2560 board and an SD card module. I connected pin 50 to MISO, 51 to MOSI, 52 to SCK and 53 to CS, then set chipSelect to 53 in the CardInfo example. I connected VCC to 3V3 and GND to GND, inserted an SD card and tried it. It only shows:
Initializing SD card...initialization failed. Things to check:
- is a card inserted?
- is your wiring correct?
- did you change the chipSelect pin to match your shield or module?
I have tried the same with another card, rewired everything and checked that the card is receiving the proper voltage. Nothing worked.
I tried this after failing to interface the SD card at a very low level, i.e. writing to SPxR. Set CS to HIGH, sent 10 dummy bytes, set CS to LOW, then sent CMD0 to the card, which only responded with 0 every time, entering an infinite loop. The time that CardInfo took to give the error suggests that it was the result of the very same problem, caught with a timeout counter.
May it be the case that the SD card shield does not function properly? If so, how could I make sure before ordering a new one? Thank you in advance!