Reducing Power Draw on the VS1010

Designing hardware and software for systems that use the VS1010 MP3 Audio DSP Microcontroller.
Post Reply
Posts: 4
Joined: Tue 2020-12-22 3:06

Reducing Power Draw on the VS1010

Post by SpinnakerDesign » Thu 2021-01-28 0:55


I'm trying to reduce the power draw on our VS1010 based MP3 player. Per section 4.11.4 of the data sheet (, we should be able to reduce the power draw down to around 20 mA, but neither the data sheet nor the handbook really specify the proper way to do that in VSOS. We are currently seeing a draw of about 80 mA from the VLSI, which is far too high.

I've included the basic script I'm using to test. A VLSI associate pointed me the the setPLL() function, but that doesn't really seem to have an effect.

Any guidance would be appreciated.

Code: Select all

/// \file main.c VS1010D VSOS Executable main file
/// This is a starting point for developing VS1010D DLX libraries and executables

#include <vo_stdio.h>
#include <volink.h>     // Linker directives like DLLENTRY
#include <apploader.h>  // RunLibraryFunction etc
#include <vs1010dRom.h>
#include <vo_gpio.h>
#include <vs1010c.h>
#include <playerinfo.h>
#include <string.h>
#include <protocol.h>
#include <spitv.h>

void MyPlayerCallback(AUDIO_DECODER *auDec, u_int16 samples){

ioresult main (char *params) {
	SetJmpiHookFunction(PlayerCallback, MyPlayerCallback);
	strncpy(player.fileSpec, "D:/voice/0.mp3", 125); //Use Traverse's file name
	player.volume = 55;
		player.currentFile = 0; //Don't use romplayer's track number mechanism
	return S_OK;

Senior User
Posts: 145
Joined: Mon 2016-05-30 11:54

Re: Reducing Power Draw on the VS1010

Post by Hannu » Wed 2021-02-10 10:50


To reduce VHIGH current was interesting problem and not all questions got their answers. I used minidemoboard without SPI flash which basically is connectors and VS1010.

What my example program does:
  1. Disables unused perips
  2. Sets GPIO pins to sane state THIS IS IMPORTANT
  3. Sets CBUF reference to 1.2V
  4. Uses slower clock
  5. Lowers voltages
  6. And in the end stops SD-card read or write command.
Also if I command reboot 2 and plug USB, update software, unplug USB, return with CTRL-C run the test, I get higher currents comparing to a real reset with wdreset or power on situation.

If there are undriven pins, they can cause huge power consumption change where first explanation is change in moon phase. So it is important to drive them.

My test solution is attached and the code file where I have commented the currents. The measurements are depend on MY headphones and SD-card I used.

The last call DataStop() is something which reduces current a lot if working with SD-cards and there is no reading happening.

Test which tricks work in your situation and don't degrade audio too much.
Simplepower solution which tries to reduce current consumption.
(33.29 KiB) Downloaded 8 times
code from simplepower
(3.95 KiB) Downloaded 10 times

User avatar
VLSI Staff
Posts: 2798
Joined: Tue 2010-06-22 13:43

Re: Reducing Power Draw on the VS1010

Post by Panu » Thu 2021-02-11 16:08


I've been solving this parallel with Hannu, here's my take.

Generally power consumption problems need to be solved on a board by board basis, so I made a program, power.dlx, that has various functions that you can try one after another, to find a combination that works best for you. My best achievement with it so far has been to decrease the amount of power taken from a lab power supply from 74 mA down to 9 mA. At 9mA it runs at 3.07 MHz and doesn't play MP3 any more, but it can list files from an SD card, for example.

Here's a copy-paste from the command line, using the VS1010D developer board, V2.0. I've written the mA figure shown by the lab power supply after each command so you can compare.
VS1010D VSOS 4.20
Files:6. Buffers:3.
Runlevel 15
SPIF:c217, 16384K
SD:968 MiB
Crockett's Theme 12 inch.mp3 [power draw after this step: 74 mA]
VS1010>power usboff [power draw after this step: 61 mA]
VS1010>power gpio [power draw after this step: 53 mA]
Unfloating GPIO pins (may make your board not work)..
VS1010>power dacoff [power draw after this step: 33 mA]
VS1010>power low [power draw after this step: 30 mA]
Voltages: 12,25,13
VS1010>power 0.25x [power draw after this step: 16 mA]
VS1010>power sdoff [power draw after this step: 9 mA]
Please note that the amout of current drawn is not just the VS1010 - there developer board has a huge amount of other chips and devices that also draw power. Here's the same sequence run in the VS1010D Minidemo board:

Playing Crockett's Theme after reset - 49mA. power usboff -> no change, USB has not been started. power gpio -> 37 mA. power dacoff -> 26 mA. power low -> 23 mA. power 0.25x -> 9 mA. power sdoff -> 4 mA.

To find the lowest settings to play the same song, I gave the following sequence:
power save, power low, power 2x, power gpio, play s:C* and it plays the MP3 file using 32 mA.

For low bitrate MP3 you can use 1x clock. The same sequence (save, low, 1x, gpio) plays 12 kHz, 16 kbps MP3 using 20 mA.
Playing the low bitrate song from the SPI flash instead of the SD card uses 16 mA on the minidemo board.

Using power.dlx

Below are the command line commands that are available at the moment. You can explore the source code to find out more and get new ideas.

Some functions may not work after some other functions. And you must restore the chip to at least 1X clock before doing a reboot, otherwise the soft boot will fail.

Please test these using your command line and tell us how it goes!



POWER.DLX First version commands, all are case sensitive:

off - turn power off. Needs power button press to switch power back on.

sdoff - stop SD card, terminate all ongoing functions. Saves power but does not lose SD card functionality. Using the SD card makes it active again, so you must give the command "power sdoff" again to get back to the power saving state.

sdkill - switch off the SD card. Experimental, needs power cycling to recover

1x - switch to 1x clock (12.288 MHz)
2x - switch to 2x clock (24.576 MHz)
3x - switch to 3x clock (36.864 MHz)
4x - switch to 4x clock (49.152 MHz)
5x - switch to 5x clock (61.440 MHz)
0.5x - switch to 0.5x clock (6.144 MHz)
0.25x - switch to 0.25x clock (3.072 MHz)

save - experimental power saving settings

usboff - switch off USB (no effect if USB is not started)

low - set lower voltages

dacoff - switch off DAC and analog drivers

gpio - unfloat GPIO pins (a little bit dirty, reads GPIO states and sets them as outputs accordingly - it might need tweaking to be usable in your own boards. Thanks to Hannu for this trick)
Program to try different power saving settings. VS1010 VSOS DLX executable.
(5.06 KiB) Downloaded 11 times
Source Code. VSIDE Solution
(24.24 KiB) Downloaded 9 times
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

User avatar
VLSI Staff
Posts: 2798
Joined: Tue 2010-06-22 13:43

Re: Reducing Power Draw on the VS1010

Post by Panu » Fri 2021-02-12 13:18

Here's version 2. It's a little more elaborate, and still experimental.

It adds a few commands; tvoff to switch off the SPI1 TV-Out, crawl to divide xtali by 512, making the core run at 24 kHz, i2soff to switch off i2s, and shell, which is an experimental internal shell that keeps the core at crawl state during command input and brings it up to 3x when commands are executed.

Also, some commands can be combined. For example, the following command reduces power consumption to 3 milliamperes in the minidemo board:

     power 0.25x low gpio tvoff dacoff sdoff

Give the target core clock speed setting (0.25x, 0.5x, 1x, 2x, 3x, 4x or 5x) as the first one in the list and add other options as needed.

The crawl option is a bit extreme. It switches the core to run at 24 kHz and the UART to 2400 bps. Combined with other options, you can run your VS1010 at a really slow clock rate. Try the command:

power low gpio tvoff dacoff sdoff usboff crawl

The minidemo board runs with just 1.9 milliamperes after this command and you can give command from the command line, but please take your time - it takes one minute to get a file listing from SPI flash, for example, and the SD card seems to refuse to work at such low clock speeds. You can use it as a starting point to making low power standby states, but for real operation, the more pedestrian power 0.25x option is much better at just 1 mA more power. But there are times when every microampere counts and this option can point you to the right direction.


PS. The sdoff option seems to work rather nicely and not mess anything up so in my tests I was always running sdoff after each step. So I made the power.dlx program do the sdoff operation automatically each time it's run.
power.dlx, version 2. VS1010 VSOS DLX executable
(7.03 KiB) Downloaded 5 times
Source code, VSIDE Solution
(26.99 KiB) Downloaded 5 times
Info: Line In and Line Out, VS1000 User interface, Overlay howto, Latest VSIDE, MCU Howto, Youtube
Panu-Kristian Poiksalo, VLSI Solution Oy

Post Reply