mp3.sci_write stalls program

25 Aug 2012

This has been driving me crazy all day and I still can't get it to work.

I'm working on an mp3 player and have so far got an sd card and Nokia lcd working as well as a joystick. BUT, when I try the Vs1002 library, as soon as it tries to write to the sci bus the program just seems to freeze. These are the lines that cause it to stop:

mp3.sci_write(0x00,(SM_SDINEW+SM_STREAM+SM_DIFF)); mp3.sci_write(0x03, 0x9800);

I think the difficulty is I'm sharing the sci bus with the SD card and the VS1002. I read somewhere something about having to set some kind of sharing mode but I could have that wrong.

Anyone got any ideas - any help would be appreciated.

Bren.

26 Aug 2012

I figured it out. I realised it was stuck in while loop. Turned out I had the DREQ pin attached to p27 and it didn't like it. Switched it to p21 and it worked as expected. Only thing is now I'm not getting any sound from the decoder, but the file is being read from. Anyway, one step further...