Home Forums Sparkfun MP3 Shield Library Support Forum How do I troubleshoot an Error 4 Code?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2182
    Anonymous
    Inactive

    Hi Bill,

    Thanks for the great library.

    When I Upload the MP3Shield_Library_Demo, I get this message in the Serial Monitor:

    Free RAM = 1051 Should be a base line of 1095, on ATmega328 when using INTx
    Error code: 4 when trying to start MP3 player

    I then get the help menu printout, but I can’t play any of the example track files, and ‘d’ displays no files.

     

    I found this line in SFEMP3Shield.cpp: ”  if(MP3Mode != (SM_LINE1 | SM_SDINEW)) return 4;”

    So I uncommended the code above that line, and added a few printouts of my own to take a look:

    Serial.print("SM_LINE1 = ");
    Serial.println(SM_LINE1, HEX);
    Serial.print("SM_SDINEW = ");
    Serial.println(SM_LINE1, HEX);
    Serial.print(F("SCI_Mode (0x4800) = 0x"));
    Serial.println(MP3Mode, HEX);

    This was the Serial Monitor printout:
    SM_LINE1 = 4000
    SM_SDINEW = 4000
    SCI_Mode (0x4800) = 0x0

    I’m not sure what SCI_Mode is referring to or what I should do to fix the problem.

    My setup:

    Seedstudio Seeeduino (Duemilanove clone)

    Sparkfun MP3 Player Shield

    SanDisk 8GB MicroSD HC card (formatted as FAT32)

    When I run the SdFat library QuickStart example, I can get Serial Monitor to printout the SD card file contents successfully.

     

    Thanks for your help! ~Stephen

     

    #2183

    Error Code 4 indicates that the library did not get back the expected value back from the VS1053 chip, while trying to initialize it just after reset or boot. Where you are able to read the SdCard.

    After commenting out the above mentioned line; Did it play successfully?

    Note: SM_LINE1 & SM_SDINEW are DEFINE’s of bit masks of the SM_MODE register. On these bit positions on the VS1053 should be the only values set true in the SM_MODE register after reset. Your prints showing 0x0 is indicating you are likely not talking to the Chip.

    I am not familiar with the Seeeduino (Duemilanove clone). I would expect it to be equal to the Duemilanove not requiring anything special. Check you solder connections of the headers and perhaps ohm out the connections from chip to chip. And check that the pins are working as expected all they from the Duemilanove to the VS1053.

    I also see the  Seeeduino (Duemilanove clone) has a 3V vs 5V switch. Ensure it is 5V, if you have not modified the SFEMP3Shield for 3V operations, as noted in the GitHub Page. If this is the problem, let me know I will update the Troubleshooting Guide to additionally include this about the Seeeduino (Duemilanove clone). Although I doubt this the problem.

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