Home Forums Sparkfun MP3 Shield Library Support Forum sd init problem from Gravitech's MP3 Player add-on

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2582
    Anonymous
    Inactive

    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-work

    Please kindly help.

    Many thanks!!

    Janice

     

    #2583

    your 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.

     

    #2586
    Anonymous
    Inactive

    Is 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 baud

    g) 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 10

    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:
    Invalid pin number

    Restarting

    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: 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

    ==================================================================

    3) test 3 – execution of SdInfo

    result ==>
    SdFat version: 20130313

    type 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:”

    ==================================================================

     

    #2587

    Try 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.

    #2589
    Anonymous
    Inactive

    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

    ======================================================================================

    #2603
    Anonymous
    Inactive

    Michael,

    Please refer to the above results. Does it mean my Gravitech Nano or Mp3 add-on is defective?

    Thanks!!

    Janice

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.