Home Forums Sparkfun MP3 Shield Library Support Forum Error 4, SCI_Mode (0x4800) = 0x800 Reply To: Error 4, SCI_Mode (0×4800) = 0×800

#3227
Anonymous
Inactive

Hi everyone !

My problem is similar to ypelletier’s : I have a wrong MP3_MODE value when I try to run FileReader example.

I have an Arduino mega2560, connected to a SD shield and a VS1053 shield.

 

Here is the  output :

XCS_PIN= 35
SD_SEL_PIN= 47

MP3_DREQINT 0
F_CPU = 16000000
Free RAM = 6669 Should be a base line of 1017, on ATmega328 when using INTx

SCI_Mode (0x4800) = 0x4890
SCI_Status (0x48) = 0x48
SCI_ClockF = 0x0
Error code: 4 when trying to start MP3 player

 

DREQ is 2 and DREQINT is 0, which seems to  matches with arduino documentation:

Board       Mega2560
int.0                 2
int.1                3
int.2                21
int.3                20
int.4                19
int.5                 18

<td align=”left”>Mega2560</td>
<td align=”center”>2</td>
<td align=”center”>3</td>
<td align=”center”>21</td>
<td align=”center”>20</td>
<td align=”center”>19</td>
<td align=”center”>18</td>
</tr>
<tr>
<td align=”left”>Leonardo</td>
<td align=”center”>3</td>
<td align=”center”>2</td>
<td align=”center”>0</td>
<td align=”center”>1</td>
<td align=”center”>7</td>
<td></td>
</tr>
</tbody>
</table>
Here are my links configuration:

#define MP3_XCS              35 //Control Chip Select Pin (for accessing SPI Control/Status registers)
#define MP3_XDCS             34 //Data Chip Select / BSYNC Pin
#define MP3_DREQ             2 //Data Request Pin: Player asks for more data
#if defined(__AVR_ATmega32U4__)
#define MP3_DREQINT          1 //Corresponding INTx for DREQ pin
#else // swapped between Uno and Leonardo.
#define MP3_DREQINT          0 //Corresponding INTx for DREQ pin
#define MP3_RESET            36 //Reset is active low
#define SD_SEL               47 //select pin for SD card

 

I know my SD card is OK because I can run SDFat librarie’s examples code.

I think that my audio out to speakers is OK because they emit “buzzz” noize while I transfer code to arduino.

I also tried to comment the line :

if(MP3Mode != (SM_LINE1 | SM_SDINEW)) return 4;

The sketch run but I can’t read mp3 files ( I can change the volume, list files on SD card )

I don’t understand what is going on. I shearched in VS1053 datasheet what could mean the value 4890 => 1001 0001 0010 0000

The wrong 1 corresponds to SM_SDISHARE, that’s all I can say.

Does someone  as an idea ?

Thanks a lot !