Page 1 of 1

VS1000D low supply voltage detection.

Posted: Wed 2024-09-04 8:01
by ed_haslam
Hi,

I'm using the VS1000's SCISTF_REGU_POWERLOW flag to detect a low battery condition. When asserted, our device flashes the LEDs that illuminate it during normal operation and then shuts down. This works really well but the voltage threshold is a bit too low. According to the VS1000 manual, the flag is asserted when the AVDD regulator falls out of regulation. To create our code, I started with the VS1000AudioModule example posted on the VLSI website and modified it to do what was required. There are quite a number locations that set voltages for the VS1000's 3 regulators, all along the lines of:

voltages[voltIoPlayer] = 30;
PowerSetVoltages(&voltages[voltCorePlayer]);

I've yet to modify one of those calls to successfully change the low voltage detection threshold for SCISTF_REGU_POWERLOW. Since we're using serial FLASH, it seems logical that one of the voltage settings related to the SPIPlayer module would be the one to change but altering the value in that module for "voltages[voltAnaPlayer] = 0; /*2.4V*/" to something higher doesn't seem to make any difference with the low voltage flag's operating point. Could you please let me know which voltage regulator call to change?

Thank you,

Ed

Re: VS1000D low supply voltage detection.

Posted: Wed 2024-09-04 8:28
by pasi
The player voltages are first set at the start of main() in usbmass.c . The SD and SPI players do not change the voltages, only the USB mass storage modes set USB voltages and restore player voltages afterwards.

Looking at the ROM code, 8 seems the default control value for AVDD, producing about 2.8V. You can modify voltages[voltAnaPlayer] in usbmass.c at the start of the main() function, before calling PowerSetVoltages().

Code: Select all

void main(void) {
#ifdef EXTCLOCK
  extClock4KHz = EXTCLOCK/4;//12000/4;
#endif

#if 1 /* 2015-04-27 3.3V */
  voltages[voltIoSuspend] = voltages[voltIoPlayer] = voltages[voltIoUSB] = 27;
  voltages[voltAnaPlayer] = 8; //8 is the default AVDD setting for 2.8V
  PowerSetVoltages(&voltages[voltCorePlayer]);
#endif

Re: VS1000D low supply voltage detection.

Posted: Thu 2024-09-05 4:53
by ed_haslam
Thank you Pasi!

All the best,

Ed