Home › Forums › Sparkfun MP3 Shield Library Support Forum › sd init problem from Gravitech's MP3 Player add-on
- This topic has 5 replies, 2 voices, and was last updated 11 years, 5 months ago by Anonymous.
-
AuthorPosts
-
April 26, 2013 at 7:19 am #2582AnonymousInactive
I am building a simple sound project using Gravitech’s MP3 Player add-on and a Gravitech Arduino Nano card. Despite the fact that I follow the tutorial, I still get error:
Can’t access SD card. Do not reformat.
No card, wrong chip select pin, or SPI problem?
SD errorCode: 0X1,0X0
I am following the tutorial from: http://flashgamer.com/arduino/comments/tutorial-making-gravitechs-mp3-player-add-on-workPlease kindly help.
Many thanks!!
Janice
April 26, 2013 at 8:10 am #2583Michael P. FlagaMemberyour symptom is identical to that of step #4 of the Gravitech Tutorial. You system is not finding the Sd Card, hence the Error. Which is not with the MP3 library, as it has not gotten to it yet.
have you followed the trouble shooting guide: http://mpflaga.github.io/Sparkfun-MP3-Player-Shield-Arduino-Library/#Troubleshooting
use SdFat Example Library’s QuickStart.ino as to see if it can access the card. Additionaly, SdInfo.ino may indicate if it can mount the card. Which may then need to formatted in FAT16 or FAT32. Where SdFormatter.ino can do this for you.
April 28, 2013 at 7:56 am #2586AnonymousInactiveIs my Gravitech Arduino Nano or MP3 Player add-on defective? I did follow the tutorial closely. And now tried all programs you suggested but there is still no luck!!
My environment: Ubuntu 12.10, Arduino 1.0.1
And the libraries are placed here:
pwd
/home/mko/projects/adafruitRfid/workspace/libraries
mko@mko-ThinkPad-W500:~/projects/adafruitRfid/workspace/libraries$ ls
Adafruit_NFCShield_I2C SdFat SFEMP3Shield WaveHC where Adafruit_NFCShield_I2C and WaveHC is from my successful Adafruit Wave Shield project before.I have decided to drop SdFat and SFEMP3Shield under the libraries of my previous adafruitRfid project so that I don’t have to modify my IDE setup.
Here are the many different tests I have performed.
1) test 1 – I have followed the tutorial for MP3Shield_Library_Demo
a) formatted the micro sd card to FAT-16 using the sdFormatter program (note: this is done on a Mac not on my own Ubuntu) and copied the track001.mp3 and track002.mp3 files to the micro sd card.
b) downloaded Sparkfun-MP3-Player-Shield-Arduino-Library-master.zip
c) unzip the file, and placed the 2 folders SdFat and SFEMP3Shield under /home/mko/projects/adafruitRfid/workspace/libraries
d) defined GRAVITECH 1 in SFEMP3ShieldConfig.h
e) Added the right after setup() of MP3Shield_Library_Demo.ino the pinMode statements as given in the tutorial
void setup() {
pinMode( 2, OUTPUT);
pinMode( 3, OUTPUT);
pinMode( 4, OUTPUT);
pinMode( 6, OUTPUT);
pinMode( 7, OUTPUT);
pinMode( 8, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);uint8_t result; //result code from some function as to be tested at later time.
f) upload and run the program on my arduino nano board. The IDE set up are:
Programmer: AVRISP mkII
Serial Port: /dev/ttyUSB0
Board: Arduino Nano w/ATmega 328
Serial Monitor: Carriage return / 115200 baudg) result ==>
Can’t access SD card. Do not reformat.
No card, wrong chip select pin, or SPI problem?
SD errorCode: 0X1,0X0==================================================================
2) test 2 – execution of QuickStart
Serial Monitor: Carriage return / 9600 baud
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 10Enter 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: 0x0Restarting
Enter the chip select pin number:
Invalid pin numberRestarting
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: 0x0Restarting
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: 0x0Restarting
==================================================================
3) test 3 – execution of SdInfo
result ==>
SdFat version: 20130313type any character to start
==> there is no response whatever key I hit.
==================================================================
4) test 4 – execution of SdFormatter
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:==> I hit ‘Y’ and hit enter, but nothing happened in the serial monitor. The line remains at “Enter ‘Y’ to continue:”
==================================================================
April 28, 2013 at 1:06 pm #2587Michael P. FlagaMemberTry replacing the pinMode 2 through 13 with the below
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
Put the above code “as the first thing”, into the setup() of each INO that you try: SdInfo.ino, SdFormatter.ino and MP3Shield_Library_Demo.ino.
April 29, 2013 at 6:20 am #2589AnonymousInactivetest1 – 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 resetwhile(!Serial) {} // wait for Leonardo
….result ==>
SdFat version: 20130313
type any character to start
card.init failed
SD errorCode: 0X1
SD errorData: 0X0type 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 10Enter 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: 0x0Restarting
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: 0x0Restarting
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: 0x0Restarting
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: YOptions 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======================================================================================
May 2, 2013 at 5:11 am #2603AnonymousInactiveMichael,
Please refer to the above results. Does it mean my Gravitech Nano or Mp3 add-on is defective?
Thanks!!
Janice
-
AuthorPosts
- You must be logged in to reply to this topic.