Home › Forums › Sparkfun MP3 Shield Library Support Forum › sd init problem from Gravitech's MP3 Player add-on › Reply To: sd init problem from Gravitech's MP3 Player add-on
test1 – SdInfo
note: if I put pinMode and digitalWirte before Serial.begin(9600). The system returns me garbage characters in the Serial Monitor.
void setup() {
Serial.begin(9600);
pinMode(6, OUTPUT); //MP3_XCS
pinMode(7, OUTPUT); //MP3_XDCS
pinMode(8, OUTPUT); //MP3_RESET
digitalWrite(6, HIGH); //negate XCS
digitalWrite(7, HIGH); //negate DXCS
digitalWrite(8, LOW); //Put VS1053 into hardware reset
while(!Serial) {} // wait for Leonardo
….
result ==>
SdFat version: 20130313
type any character to start
card.init failed
SD errorCode: 0X1
SD errorData: 0X0
type any character to start
===========================================================================
2) test 2 – QuickStart
added the pinMode and digitalWrite statements after Serial.begin(9600) of setup() as shown above.
result ==>
SD chip select is the key hardware option.
Common values are:
Arduino Ethernet shield, pin 4
Sparkfun SD shield, pin 8
Adafruit SD shields and modules, pin 10
Enter the chip select pin number: 4
SD initialization failed.
Do not reformat the card!
Is the card correctly inserted?
Is chipSelect set to the correct value?
Is there a wiring/soldering problem?
errorCode: 0x1, errorData: 0x0
Restarting
Enter the chip select pin number: 8
SD initialization failed.
Do not reformat the card!
Is the card correctly inserted?
Is chipSelect set to the correct value?
Is there a wiring/soldering problem?
errorCode: 0x1, errorData: 0x0
Restarting
Enter the chip select pin number: 10
SD initialization failed.
Do not reformat the card!
Is the card correctly inserted?
Is chipSelect set to the correct value?
Is there a wiring/soldering problem?
errorCode: 0x1, errorData: 0x0
Restarting
Enter the chip select pin number:
===========================================================================
3) test 3 – sdFormatter
added the pinMode and digitalWrite statements after Serial.begin(9600) of setup() as shown above.
Note: I tried this same test on 2 different sd cards but got the same result. One is a 2G sd card, the other is a new 8G Kingston sd hc card.
result ==>
This sketch can erase and/or format SD/SDHC cards.
Erase uses the card’s fast flash erase command.
Flash erase sets all data to 0X00 for most cards
and 0XFF for a few vendor’s cards.
Cards larger than 2 GB will be formatted FAT32 and
smaller cards will be formatted FAT16.
Warning, all data on the card will be erased.
Enter ‘Y’ to continue: Y
Options are:
E – erase the card and skip formatting.
F – erase and then format the card. (recommended)
Q – quick format the card without erase.
Enter option: F
SD initialization failure!
Is the SD card inserted correctly?
Is chip select correct at the top of this sketch?
error: card.init failed
SD error: 1,0
===========================================================================
4) test 4 – MP3Shield_Library_Demo
added the pinMode and digitalWrite statements right after setup() and BEFORE uint8_t result and Serial.begin(115200.
result ==>
Free RAM = 1067 Should be a base line of 1040, on ATmega328 when using INTx
Free RAM = 1067 Should be a base line of 1040, on ATmega328 when using INTx
Can’t access SD card. Do not reformat.
No card, wrong chip select pin, or SPI problem?
SD errorCode: 0X1,0X0
======================================================================================