Concept Demo: VS1000 SPI Stream Slave OGG Player

Designing hardware that uses VLSI Solution's devices as slave codecs such as an external MP3 decoder chip for a host microcontroller.
Post Reply
User avatar
VSDSP Expert
Posts: 2816
Joined: Tue 2010-06-22 13:43

Concept Demo: VS1000 SPI Stream Slave OGG Player

Post by Panu »

We've been often asked if it's possible to use VS1000 as a slave coprocessor to play OGG files from an SPI stream. Here is a concept demo for making a VS1000 play an OGG file which is streamed into the VS1000 SPI port using a microcontroller. For this demo, VS1005 developer board is used as the microcontroller.

Since the SPI port is used for the stream input, there cannot be any SPI boot flash connected to the SPI port (Or if there is, its chip select would have to be somehow disabled before starting the stream). So VSIDE UART connection must be first used to load the stream receiver into the VS1000 (this could be done with a microcontroller).

To run the demo:
- Compile the VS1005 microcontroller application and install it into the VS1005 developer board
- Connect VS1000 to the PC using VSIDE USB UART cable
- Connect SPI1 port of VS1005 to SPI port of VS1000:
* GND to GND
* VS1005 MISO1 pin to VS1000 D6 pin. This is the DREQ signal: when VS1000 can receive a new disk sector, it pulls this pin high.
* VS1005 MOSI1 pin to VS1000 SO (MOSI) pin. This is serial data from VS1005 to VS1000.
* VS1005 SCLK1 pin to VS1000 SCLK pin. This is serial clock
* VS1005 GPIO2.0 (TMS) pin to VS1000 XCS pin. This is chip select. Sorry for using such a weird VS1005 pin.

- Start the VS1000 Stream Receiver from the VSIDE
- Run the VS1005 Stream Sender application from the VS1005 board ("OutStream D:OGGFILE.OGG")
- Listen to the music.
vs1000stream.png (11.07 KiB) Viewed 6599 times

Note that there is no error recovery of any kind in this very simple demo. There's no resync and no way to seek inside the stream. Anything like this would require us to develop some kind of handshaking format between the sender and the receiver. Now there is only a very simple syncing mechanism: the host must first send 0x1234 to the slave (VS1000). That marks the beginning of the ogg file. Then the whole file must be sent continuously. Upon successful end of OGG decoding in the VS1000, it starts to expect 0x1234 again. Then you can send another song.

If you want this demo to be developed further, please contact us. Also please tell us of your experiences if you choose to try this.

VS1000 Application to play an OGG file from an incoming SPI stream.
(23.9 KiB) Downloaded 318 times
VS1005 Application to send a file to the SPI1 port
(51.03 KiB) Downloaded 404 times
Post Reply