VS1000 Audio Module Step-by-Step

Writing software that controls the system and peripherals such as displays, SD cards, Buttons, LEDs, Serial Ports etc.
User avatar
pasi
VLSI Staff
Posts: 1416
Joined: Thu 2010-07-15 16:04

Re: VS1000 Audio Module Step-by-Step

Post by pasi » Mon 2016-04-25 14:22

You need some modifications.
1) The GPIO-controlled version has an option to have a file-playing-indicator in a GPIO pin. The code for that could be copied to the UART-controlled version.
2) The uSD insertion switch makes the storage switch automatic by loading the appropriate program code for each storage. You would need code to report uSD insertion / removal / status and new UART commands to perform the switch of the running program. There is not enough memory to play from both the uSD and the SPI FLASH in a single program.

3) OFF + newline should turn the regulators off, but you then need to drive all externally connected pins (including TX and excluding VHIGH) low, or the module probably restarts. The powerbutton power-off should work this way: keep PWRBTN high for 1s (I think that's enough for this firmware, but I may be mistaken), then drive it low. Because PWRBTN enables the regulators, the VS1000 can't try to power-off until PWRBTN is low. So, the 1s high would let the module firmware to detect power-off request and initiate it, then power down the regulators when it sees PWRBTN low.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

obiquiet
User
Posts: 3
Joined: Mon 2017-02-20 1:32

Re: VS1000 Audio Module Step-by-Step

Post by obiquiet » Mon 2017-02-20 1:36

What is the best way to lower the UART speed of the VS1000 audio module? I am interfacing with a software serial that cannot run at 115200...

Thank you.
-ObiQuiet

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

Re: VS1000 Audio Module Step-by-Step

Post by pasi » Mon 2017-02-20 13:11

obiquiet wrote:What is the best way to lower the UART speed of the VS1000 audio module? I am interfacing with a software serial that cannot run at 115200...
In usbmass.c enable the following code by changing "#if 0" to "#if 1":

Code: Select all

#if 0
  uartByteSpeed = 9600/10; //change the default rate here
#endif
And change the 9600 to your desired speed. Then rebuild.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

mdm63
User
Posts: 2
Joined: Tue 2017-03-21 11:34

Re: VS1000 Audio Module Step-by-Step

Post by mdm63 » Tue 2017-03-21 12:19

Hello!
I have issues with the latest VS1000AudioModule-072-VSIDE firmware. I get error

copy spiall.spi eeprom.img
process_begin: CreateProcess((null), copy spiall.spi eeprom.img, ...) failed.
make (e=2): Määritettyä tiedostoa ei löydy.
C:\VSIDE\bin\make.exe: *** [Emulation-Debug/SPIPlayer.coff] Error 2

Build failed!

I have tried to manually issuing the command copy spiall.spi eeprom.img in console(command prompt) and programming it from the IDE using pre-generated EEPROM programmer.
It only outputs the following to UART
v0.72-uart-gapless (<-This reflects the settings in the system.h correctly)
Macronix
2MB
SD

It does not take any commands. I have this same behavior if I program the pre-build EEPROM.img straight from the zip file. In that case it seems to write more data, but the behavior is the same. It does not react to input from UART. If I use the SDPlayerQueue090 example everything works as it should. It takes my input from UART and behaves as expected. So there must be something wrong with the firmware?
Where I can download the older releases of the VS1000Audiomodule FW to try out?

I have a VS1KMOD VLSI Solution 2010 written on the module and that's about all the information I have on the thing. It was given to me for a certain project, so I don't have any documentation. If it helps I am using Windows 7 Ultimate with Finnish language pack installed and in use. I also have Cygwin CMake and other utilities that include make, for other projects and I understand that they may interfere with the IDE, but they certainly should not effect the "vanilla" eeprom.img that came with the zip file. I am using FTDI UART to USB module to program the VS1000 and Arduino IDE serial terminal to communicate with the module. I have tried bunch on other serial terminal programs(putty, tera term,termite) and other hardware (CP2303, MSP430G2553), but I really doubt that the issue is there, because the SDPlayerQueue090 firmware works as it should, every time.

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

Re: VS1000 Audio Module Step-by-Step

Post by pasi » Tue 2017-03-21 12:51

What is the size of spiall.spi ? It should be around 30kB. Also check that you use the flasher for "prepared image", so that eeprom.img isn't overwritten. From the symptoms it sounds like only the first program (usbmass) is loaded, and the actual player programs fail to load, so either of these could be the issue.

What other errors do you get during the compile? I extracted the packet and had no issues with "Build All".

Try building the 4 projects one by one, then select Build All.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

mdm63
User
Posts: 2
Joined: Tue 2017-03-21 11:34

Re: VS1000 Audio Module Step-by-Step

Post by mdm63 » Wed 2017-03-22 18:28

Thank you Pasi for your quick answer. It actually was, as it so often is, a invalid user error. :oops: For some reason the whole concept of solution vs project escaped me. When I finally (after reading your post) tried to build the whole project (CTRL + F7) instead of building only the selected solution (F7) it worked like the famous train toilet.

It still gives me the following error:
copy spiall.spi eeprom.img
process_begin: CreateProcess((null), copy spiall.spi eeprom.img, ...) failed.
make (e=2): Määritettyä tiedostoa ei löydy.

but, I can work around with it, by manually copying the file. I tough this might be because my installed display language is Finnish and when the file all ready exits it asks to overwrite it and I have to press K (Kyllä) instead of Y (Yes), but this error happens even if I delete the eeprom.img and there is nothing to overwrite.

Now I only have to find a way to make a file play on loop and star from the beginning every time a UART command is send, with no to minimum lag and I am golden. Are the default UART commands, for the "VS1000AudioModule-072-VSIDE" firmware documented somewhere?
BTW I like the code a lot. It seams easy enough to interpret and work with, even tough I am not a professional coder (yet).

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

Re: VS1000 Audio Module Step-by-Step

Post by pasi » Thu 2017-03-23 11:31

It might be a protection issue and the copy command is not allowed to overwrite the old eeprom.img .

We have come across all kinds of issues with virtualization also - VSIDE may see different versions of files than the user.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

User avatar
Henrik
VLSI Staff
Posts: 1041
Joined: Tue 2010-06-22 14:10

Re: VS1000 Audio Module Step-by-Step

Post by Henrik » Thu 2017-03-23 11:46

mdm63 wrote:It still gives me the following error:
copy spiall.spi eeprom.img
process_begin: CreateProcess((null), copy spiall.spi eeprom.img, ...) failed.
make (e=2): Määritettyä tiedostoa ei löydy.
i think you should get around this issue if you add the /y option to the copy command which I think is in the Properties / Pre/Post Build for the project.

Kind regards,
- Henrik

PS. This is my 1004th message. There never was a VS1004, because Eastern Asia doesn't really care about number 4 (a bit like number 13 in the English-speaking world), and we didn't want to take any commercial risk around this kind of an issue.
Good signatures never die. They just fade away.

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

Re: VS1000 Audio Module Step-by-Step

Post by pasi » Thu 2017-03-23 11:47

Note that there are 4 Projects with a post-build that have the copy command.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Post Reply