VS1053 not playing some files

Designing hardware that uses VLSI Solution's devices as slave codecs such as an external MP3 decoder chip for a host microcontroller.
Post Reply
rudnik
User
Posts: 6
Joined: Fri 2019-04-12 11:16

VS1053 not playing some files

Post by rudnik » Fri 2019-04-12 11:26

Hello,
I am trying to set up a MP3 player with an Arduino and a VS1053 board. The setup works nicly for some files. But when I start playing some files the DREQ stays active and there is no sound being played. I recoded all the MP3 files to the same bitrate etc., removed the ID3 tags, normalized them and even converted them to OGG and WMA format. I even ran a MP3-checker over then to see if they had errors. Some files simply dont play. I am not sure at this time if it is always the same ones and will check this specifically later.
Between file playback I reset the VS for a few minutes via the reset line. My guess is that when reactivating there may be an error in my setup that only lets some files to be played OR is only successfull some times. Here is my initialization of the VS:

Code: Select all

  digitalWrite(VS_RESET, HIGH);
  delay(50);
  vs_com(VS_REG_WRAMADDR, 0xC017);
  vs_com(VS_REG_WRAM, 3);
  vs_com(VS_REG_WRAMADDR, 0xC019);
  vs_com(VS_REG_WRAM, 0);
  vs_com(VS_REG_CLOCKF, 0x9800);
  vs_com(VS_REG_MODE, VS_MODE_SM_SDINEW|VS_MODE_SM_LINE1);
I take care of the SPI frequency when sending commands not beeing to fast. What could cause the VS to not play a file and have DREQ active all the time?
Am thankfull for any tips.

User avatar
pasi
VLSI Staff
Posts: 1612
Joined: Thu 2010-07-15 16:04

Re: VS1053 not playing some files

Post by pasi » Fri 2019-04-12 11:52

It looks like your startup drives GPIO0 and GPIO1 to 0. This is probably intended as a workaround for boards that have GPIO1 floating. If GPIO0 is low and GPIO1 is high, the vs1053b will enter real-time MIDI mode.

However, you don't wait for DREQ high, so it is uncertain if the writes are detected, and in any case it is too late at that point - the RTMIDI mode is already activated if GPIO0 is low and GPIO1 is high.

If RTMIDI is active, you will see 0xac45 in SCI_AUDATA, and can reset and try again, hoping the GPIOs stay low for long enough.

The "easy" hardware workaround would be to tie GPIO0 and GPIO1 together.

If a file never plays, can you send us an example?
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

rudnik
User
Posts: 6
Joined: Fri 2019-04-12 11:16

Re: VS1053 not playing some files

Post by rudnik » Fri 2019-04-12 12:35

Hello,
thanks for the info!
I will try to modifiy my board and tie the pins together and see if that solves the problem. Otherwise I will test with certainty if it are the same files.

Thanks and I will post the result soon.

rudnik
User
Posts: 6
Joined: Fri 2019-04-12 11:16

Re: VS1053 not playing some files

Post by rudnik » Sun 2019-04-14 18:05

@Pasi: thank you so much, that was exactly the problem. I would have never found that. I simply connected pin 33 and 34 and now it work flawlessly. Guess the cheap modules from china are not the best design.

User avatar
pasi
VLSI Staff
Posts: 1612
Joined: Thu 2010-07-15 16:04

Re: VS1053 not playing some files

Post by pasi » Mon 2019-04-15 16:27

Great!

Yes, some boards seem to be originally designed for vs1033, and do not take all migration considerations into account. Most of the them at least have remembered to change the CVDD regulator from 2.5V to 1.8V! (but not all...)

(vs1063a doesn't have MIDI, so it would work on that board just fine.)
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Post Reply