VSMD001 0.72b : Setting volume / writing PRG

Writing software that controls the system and peripherals such as displays, SD cards, Buttons, LEDs, Serial Ports etc.
Post Reply
Posts: 1
Joined: Wed 2022-03-09 13:32

VSMD001 0.72b : Setting volume / writing PRG

Post by AlainBridel »


VSDM001 16M SPI with 0.72b firmware installed.
Connected to STM32 microcontroller : UART and USB.
VSIDE 2.48 installed.

When VSDM001 is booting, and is USB is not activated, the module is starting in PLAYER_CONTINUOUS_PLAY.
For my application purpose, I need to stop it as soon as possible detecting that module has started up (trigger when receiving "v0.72-uart") to switch to PLAYER_WAIT_FOR_COMMAND sending a "f" on the uart.
Once I reach the PLAYER_WAIT_FOR_COMMAND, the module is waiting for different commands but I can't find a way to set the volume output. It seems that the volume output can only be set sending a "+" or a "-" while the module is playing a file. Can you confimr please ?

We don't want to have to flash the module with new firmware using a SD card.

I found that the usmmass can launch a kind of plugin player named EXECFILE.PRG.
My question is : how to produce this PRG file ?
This way I think I can rewrite the spiplayer to add some uart commands ?

Thanks for any answer,


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

Re: VSMD001 0.72b : Setting volume / writing PRG

Post by pasi »

Hi Alain,

You are the first to ask for a command to set volume. You're right, the filemode doesn't have a volume command. It can be fairly easily added though, but as you say, it will create a custom firmware you would need to (re)program.

Code: Select all

spiplayer.c (L475):
#ifdef USE_VOL
                            case 'v': /* 'v'olume by number -- untested */
			      player.volume = atou((void *)&buffer[1]);
The EXECFILE.PRG (actually, any *.PRG file is accepted) is a NAND-FLASH format boot image of a vs1000 executable. "coff2allboot -i vs1000nand -x -n -x <execaddr> infile.bin execfile.prg" . There is a size limit of 8192 bytes.

You could develop execfile.prg from sdupdate, and instead of reading the new firmware from the uSD card, you would read that from the same SPI FLASH you're reprogramming. The biggest complication is that execfile.prg would need to deleted afterwards, or there would be an infinite loop -- once loaded, execution cannot return to the player (and if it successfully returns without crashing, all you get is a low-level sine tone).

It would probably be easier to control xCS of vs1000 (drive low to prevent boot during power-up or after reset) and reprogram the firmware through the UART. (See pcflash.c source code.)
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
Post Reply