VS1053 DREQ pin problem.

Writing software for systems that use VLSI Solution's devices as slave codecs to a host microcontroller.
Post Reply
DenMCU
User
Posts: 5
Joined: Wed 2020-03-25 10:13

VS1053 DREQ pin problem.

Post by DenMCU »

Hello everybody,

We are using VS1053 in some our boards.
In one our device we faced with the problem that VS1053b doesn't play mp3 file audio after some device restarts.
When we started to check SPI pins by logical analyzer we findout out when vs1053b dont play audio in this case DREQ pin always set to high, we send data to vs1053b but DREQ pin never will set to low state.

Firmware is the same, but after some restarts we dont hear audio and when we dont hear it we see that dreq pin always set to 1 and never will set to 0.

I attached saleae logic analyzer logs with SPI data.
One of them when audio playing correctly and second when audio doesn't play correctly.
Could you please help us?
LogicAnalyzerData.zip
Contain logs from VS1053. Normal log and Error log.
(27.34 MiB) Downloaded 26 times
vs1053_code.zip
Library VS1053
(12.12 KiB) Downloaded 26 times
Last edited by DenMCU on Tue 2022-07-12 15:32, edited 1 time in total.
Hannu
Senior User
Posts: 409
Joined: Mon 2016-05-30 11:54
Location: Finland
Contact:

Re: VS1053 DREQ pin problem.

Post by Hannu »

Hi!

I took a look at the dumps. Just to make sure:
ch0: DREQ
ch1: SCK
ch2: MOSI
ch3: XCS
ch4: XDCS
Is my assumption of the connections correct?
User avatar
pasi
VLSI Staff
Posts: 2019
Joined: Thu 2010-07-15 16:04

Re: VS1053 DREQ pin problem.

Post by pasi »

What do you see in SCI_AUDATA after reset?

If you see 0xac45, the vs1053b has started in real-time MIDI mode, and GPIO1 might be floating on your board (while GPIO0 is down).
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
DenMCU
User
Posts: 5
Joined: Wed 2020-03-25 10:13

Re: VS1053 DREQ pin problem.

Post by DenMCU »

Hannu wrote: Fri 2022-07-08 15:31 Hi!

I took a look at the dumps. Just to make sure:
ch0: DREQ
ch1: SCK
ch2: MOSI
ch3: XCS
ch4: XDCS
Is my assumption of the connections correct?
Sorry, I forgot to add labels.
That's correct.
DenMCU
User
Posts: 5
Joined: Wed 2020-03-25 10:13

Re: VS1053 DREQ pin problem.

Post by DenMCU »

pasi wrote: Fri 2022-07-08 15:41 What do you see in SCI_AUDATA after reset?

If you see 0xac45, the vs1053b has started in real-time MIDI mode, and GPIO1 might be floating on your board (while GPIO0 is down).
I added our schematic.
SCI_AUDATA after reset shows 0x1F40
vs1053b_schematic.PNG
vs1053b_schematic.PNG (166.02 KiB) Viewed 529 times
User avatar
pasi
VLSI Staff
Posts: 2019
Joined: Thu 2010-07-15 16:04

Re: VS1053 DREQ pin problem.

Post by pasi »

Some notes on the schematics:
- FB1 -- the recommendation is to connect vs1053b grounds together under the chip with a 0-ohm connection, otherwise ground currents can flow through the IC itself.
- FB3 -- we don't recommend coils on the power rails, because they can cause different voltage rise times to the three different power supplies. This might cause latch-up situation.
- Z1 -- there are no capacitors to ground. Is the internal capacitance of the crystal high enough that external ones are not needed? Is the oscillator always starting? If the oscillator isn't running after reset, DREQ should stay low. If it oscillator stops later, it could cause DREQ to stay high indefinitely.

Does the issue happen on power-up or after hardware reset?
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
DenMCU
User
Posts: 5
Joined: Wed 2020-03-25 10:13

Re: VS1053 DREQ pin problem.

Post by DenMCU »

pasi wrote: Tue 2022-07-12 11:57 Some notes on the schematics:
- FB1 -- the recommendation is to connect vs1053b grounds together under the chip with a 0-ohm connection, otherwise ground currents can flow through the IC itself.
- FB3 -- we don't recommend coils on the power rails, because they can cause different voltage rise times to the three different power supplies. This might cause latch-up situation.
- Z1 -- there are no capacitors to ground. Is the internal capacitance of the crystal high enough that external ones are not needed? Is the oscillator always starting? If the oscillator isn't running after reset, DREQ should stay low. If it oscillator stops later, it could cause DREQ to stay high indefinitely.

Does the issue happen on power-up or after hardware reset?
Thanks for your reply.
FB1 and FB3 is a 0 Ohm resistors in our case.
Z1 have built in load capacitors.
DREQ works after restart about 1 second, then it stop working ( I attached data from logic analyzer in my first message).
We have problems with DREQ only after some restarts we doing first hardware reset and then software always before vs1053 initialization.
Hannu
Senior User
Posts: 409
Joined: Mon 2016-05-30 11:54
Location: Finland
Contact:

Re: VS1053 DREQ pin problem.

Post by Hannu »

Hi!

I think I have found the problem.

The problem starts (top part of image) when something bad happens to write(0x02) volume(0x0b) It is stopped before end and then there is the small glitch. After that there is just a steady state of XCS going down and up but nothing happens on signals (Midle part of image)

In the bottom part the disaster strikes. The word should be 0x02071e29, write WRAMADDR, but it is prepended with 0xfc. This doesn't do anything. Then comes 0x02060000, Write zero to address which is in WRAMADDR and That's the death of the system.

To me this looks like a race condition between volume fade and other SCI write.
Attachments
Time is not in scale
Time is not in scale
error_coms.png (74.73 KiB) Viewed 494 times
Post Reply