Page 1 of 1

about SPI master & slave

Posted: Mon 2017-03-06 8:24
by XiaoMC
I'm beginner to VSDSP, actually not familiar with hardware.
For 1053, there is SPI interface, and in all solution it was defined as slave subsystem.

My question is if the 1053 can act as master device?
What I want to do:
1) build a embed system with : master MCU + wifi module + VS1053;
These 3 module connected by SPI bus.
2) MCU trigger the WIFI module and VS1053 to work.
MCU doesn't need to take part in the interaction between WIFI module & VS1053.

But,In standard way, MCU get data through WIFI and transfer to VS1053 to decode, obviously MCU has to take part in the whole procedure,
Yet, VS1053 has the power to do it independently.
So, I hope they can work like this:
A) MCU build the data pipe through WIFI module;
B) MCU notify VS1053 to read data from SPI interface;
C) VS1053 read data from WIFI module through SPI , decode or store them in SD card;
D) VS1053 notify MCU that job finished;
E) MCU do clean work.

Is it possible?
If not, any way to reduce the workload of master MCU?

Re: about SPI master & slave

Posted: Mon 2017-03-06 9:44
by Panu

It might be possible, but quite difficult programming work I think. The SPI in VS1053 is slave only, but most digital pins can be controlled with software.

With VS1005 (or VS1010 if you target low cost and only need MP3+WAV) it would be much easier.


Re: about SPI master & slave

Posted: Tue 2017-03-07 3:36
by XiaoMC
Thank you for so fast reply!
I have consulted distributor in China, the 1005 is relative expensive for cheap China Made :).
I'm not sure if people will accept the higher price with better quality.
But the feature is really attractive for developer :).

And the develop board is so expensive in China Yuan too.
Can I fake your develop board and sell it? You have exposed the design in website, so I think it is welcome.

If you permit, all the default software/package/configuration can be done by me?


Re: about SPI master & slave

Posted: Tue 2017-03-07 4:19
by XiaoMC
I browsed, label price is RMB2800, that is nearly 400 Europe dollars , official price is 250 Europe dollars, maybe tax and profit added.
Too expensive for personal developer.

Re: about SPI master & slave

Posted: Tue 2017-03-07 8:53
by Panu

Sure, you can make it and sell it!

Please modify the text on the board to show clearly that it is made by you so that the users will contact first you if there is some problem with the board.

Please ask us if you need any help. When you make the board, pay close attention to how you solder the VS1005 so that the contact is reliable. Verify that the pads on the IC are clean, suggest wash and clean before soldering. Verify that the solder cones are concave and bright after soldering. The pads on VS1005 are much smaller than in LQFP, precision soldering is needed.


Re: about SPI master & slave

Posted: Tue 2017-03-07 9:11
by XiaoMC
Thank you.
How about this question: all the default software/package/configuration can be done by me?
I mean whether there's some work must be done by VLSI.

Thank you.

Re: about SPI master & slave

Posted: Tue 2017-03-07 9:23
by Panu
Hi again!

Yes, you can do it yourself. Please see the thread: "Flashing a new or bricked VS1005G board" at viewtopic.php?f=13&t=681

We use the same procedure and then upgrade to the latest kernel and root image.


Re: about SPI master & slave

Posted: Tue 2017-03-07 14:43
by XiaoMC
I have these questions:
1) what is the relationship between VSOS & VSOS kernel?
There is "VSOS3 Kernel 3.40" ,that means the newest version for kernel should be 3.40,
If so, why you said "Use this eeprom.img if you want to install or upgrade to vsos v0.21:
eeprom.img" in post "Flashing a new or bricked VS1005G board"?
We can provide kernel 3.40 eeprom.img directly?

2) How to find the API?
Current VSOS3 has provided codecs/drivers/..., but how to find the api we can make use?
read the source file?
I didn't find information on SPI bus operation,now,we need to write code directly?

3) About MP3 encode/decode
According to following table,1005 can't encode MP3 ?

Product variations
Device ID MP3 Encoder MP3 Decoder Embedded 8Mbit Flash
VS1005G-Q X
VS1005G-F-Q X X
VS1205G-Q X X
VS1205G-F-Q X X X
VS8005G-F-Q X


Re: about SPI master & slave

Posted: Tue 2017-03-14 9:04
by XiaoMC

I'm browsing the forum, I did not find much information on API (call function in drivers).
Is there some posts I did not find?

Re: about SPI master & slave

Posted: Tue 2017-03-14 9:32
by Panu

Hmm, the information is here and there. Here's a collection of good posts by topic:

There's the programmer's guide, but that one is for VSOS2. It's still a good read. ... _guide.pdf

Also, for each individual driver and topic, there's a lot of discussion on the board on a case by case basis. Please search the forum and ask for information if you need info on a particular topic.

About the API, all the critical information is in a single header file: vsos.h To learn it, take a look at some example applications and drivers that you are interested in. For example, see how the SPI Flash driver works, it's the file spiflash.c in the kernel.

We're working on new documentation.