vs1053b SDI Sine test not working, SCI works - SOLVED

Designing hardware that uses VLSI Solution's devices as slave codecs such as an external MP3 decoder chip for a host microcontroller.
Post Reply
Ord
User
Posts: 9
Joined: Sun 2011-09-25 23:27

vs1053b SDI Sine test not working, SCI works - SOLVED

Post by Ord »

Hello,

I am using vs1053b chip on my own PCB, it is controlled by PIC24FJ64GB004 processor.

I have not been able to make the sine test work by writing the SDI test sequence, but I can make the sine test by using the "New Sine and Sweep Tests" with the SCI interface.

I have set the allow tests bit, reading back the mode and status registers shows:
MODE: 1000 0000 0010 0000
STATUS: 0000 0000 0100 0000

The data I am sending is 0x53, 0xEF, 0x6E, 126, 0x00, 0x00, 0x00, 0x00

I have checked everything I can think of, and tried using a different vs1053 chip. Both do the same thing.

Clock is 12.288MHz, and the SPI clock is at 500KHz. Test pin is tied high, RX has pull up. All GPIO are pulled low through 100K. Pin 27 (TX), pin 15 (VCO) and pin 48 (LINE2) are not connected.

Any suggestions of what to look at?

Thanks,
Ord
Last edited by Ord on Mon 2011-09-26 15:40, edited 1 time in total.
User avatar
pasi
VLSI Staff
Posts: 2164
Joined: Thu 2010-07-15 16:04

Re: vs1053b SDI Sine test not working, SCI works

Post by pasi »

Ord wrote: I have set the allow tests bit, reading back the mode and status registers shows:
MODE: 1000 0000 0010 0000
STATUS: 0000 0000 0100 0000
I see two issues with SCI_MODE: 0x8020 means you have set clock divider on (->6.144MHz), and are running in the old compatibility SDI mode. In this mode pins BSYNC/SDATA/DCLK are used instead of using xDCS and the common SI/SO/SCLK pins.

So, instead of 0x8020, try using 0x4820 (newmode, allowtests), or 0x4c20 (shared mode, allowtests).
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
Ord
User
Posts: 9
Joined: Sun 2011-09-25 23:27

Re: vs1053b SDI Sine test not working, SCI works - SOLVED

Post by Ord »

Thanks Pasi :D

That is exactly what it was - I meant to have mode 0x0820 but put in 0x8020 instead. (I use microphone instead of line in) .

It works very well now, my board can read an MP3 file from a USB stick and play it back with no problems.

I'll post my other question in a new thread.
suzie77
User
Posts: 3
Joined: Fri 2011-12-02 4:53

Re: vs1053b SDI Sine test not working, SCI works - SOLVED

Post by suzie77 »

Hello,

I just got confused :? I want to run a sine test on vs1053b.Based on datasheet,8byte data are need to initialize this test.Which register should I send this 8byte data?
Besides SCI_MODE,SCI_STATUS what other registers should be set?

Thanks
User avatar
Panu
VSDSP Expert
Posts: 2829
Joined: Tue 2010-06-22 13:43

Re: vs1053b SDI Sine test not working, SCI works - SOLVED

Post by Panu »

Hi, suzie!
...to run a sine test...Which register should I send this 8byte data?
You don't send it to a register, but to the data port, just as you would write MP3 stream.

Clarification: VS10xx chips have 2 SPI ports, one is for control and is accessed with XCS chip select signal in the default communications mode, NEW_MODE. The other is for data and that one is accessed with the XDCS chip select signal.

So, to activate the sine test (in NEW_MODE),
- Reset the VS chip
- Set the ALLOW_TESTS bit in the SCI_MODE register (register 0)
- Make sure the XCS is high (never have both XCS and XDCS low at the same time)
- Pull XDCS low
- Send the 8 byte sequence to the SPI bus
- Wait for the sending of bytes to be complete
- Pull XDCS back high
You should now hear the beep.
suzie77
User
Posts: 3
Joined: Fri 2011-12-02 4:53

Re: vs1053b SDI Sine test not working, SCI works - SOLVED

Post by suzie77 »

Thanks Panu,it worked..greatly :D
xuanvn
User
Posts: 17
Joined: Wed 2013-12-25 6:02

Re: vs1053b SDI Sine test not working, SCI works - SOLVED

Post by xuanvn »

Hi Panu,

How to "Wait for the sending of bytes to be complete" ?

Thank you
User avatar
Panu
VSDSP Expert
Posts: 2829
Joined: Tue 2010-06-22 13:43

Re: vs1053b SDI Sine test not working, SCI works - SOLVED

Post by Panu »

Hi!
How to "Wait for the sending of bytes to be complete" ?
Usually there is a flag in the microcontroller that tells you that the SPI device is not transmitting any more (idle).

-Panu
Post Reply