HADAT1 in VS1053 continuously gives value as 39150 while recording

Writing software for systems that use VLSI Solution's devices as slave codecs to a host microcontroller.
Post Reply
Arun Joe
Senior User
Posts: 28
Joined: Sat 2017-04-22 9:01

HADAT1 in VS1053 continuously gives value as 39150 while recording

Post by Arun Joe » Thu 2017-05-25 8:43

Hi,
I'm trying recording in WAV PCM as described in the Application note http://www.vlsi.fi/fileadmin/software/V ... corder.pdf
The recording starts but each time except the first I get a much higher value 39150 form HDAT1 .
and the recorded data is played for only few seconds even-though the recording was done for 3 minutes.
What could be going wrong in here?

Regards,
Joe

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

Re: HADAT1 in VS1053 continuously gives value as 39150 while recording

Post by pasi » Fri 2017-05-26 10:27

39150 = 0x98ee.

Check that you are reading the correct number of words from HDAT0. If you read too much, the FIFO will underrun and HDAT1 will no longer be empty.

Check that your byte order is correct in your SCI read. Check that the SPI clock you are using is lower than the internal clock of vs1053 / 7.

Could you include an example recording?
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Arun Joe
Senior User
Posts: 28
Joined: Sat 2017-04-22 9:01

Re: HADAT1 in VS1053 continuously gives value as 39150 while recording

Post by Arun Joe » Tue 2017-05-30 9:23

Hi,
I use stereo recording,and reads 1024 bytes n every 512 words.
The SCLK is 5Mhz which is lesser than the internal clock of VS1053.
The UART interface is working at Baud rate 230400, is it becouse of sending the bytes via UART?
Herehttp://vocaroo.com/i/s1D085Z1sTW7 is a sample audio that was recorded.

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

Re: HADAT1 in VS1053 continuously gives value as 39150 while recording

Post by pasi » Tue 2017-05-30 13:08

What UART? From your controller to PC?

Could you attach the file onto this forum? Vocaroo doesn't allow me to get the original file. If I download "as WAV", I get a mono file.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Arun Joe
Senior User
Posts: 28
Joined: Sat 2017-04-22 9:01

Re: HADAT1 in VS1053 continuously gives value as 39150 while recording

Post by Arun Joe » Wed 2017-05-31 7:47

Yes, I transferred the data recorded using a UART to USB controller to my PC , I don't use a micro SD card.
Attachments
Record1.wav
SAMPLE
(253.97 KiB) Downloaded 38 times

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

Re: HADAT1 in VS1053 continuously gives value as 39150 while recording

Post by pasi » Wed 2017-05-31 13:18

It seems your controller (or the PC) automatically adds LF (0x0a) to a CR (0x0d) it sends(/receives) (or prepends CR to a LF it sends).

The additional bytes make the byte order and channel order go haywire.

First try to figure out if the issue is in the transmit end. If you use stdio, open it in or try to set it to binary mode.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Post Reply