VS1005 a few questions

Discussion about writing software for VS1005 and the VSOS Operating System. Also posts about VS1005-related hardware design and device drivers should be posted here.
Post Reply
lucap87
User
Posts: 9
Joined: Tue 2018-06-26 9:09
Contact:

VS1005 a few questions

Post by lucap87 » Wed 2020-12-23 10:57

Dear VLSI experts, we are evaluating the design of a new project based on the VS1005.

Up to now, we used a variety of VLSI products as a coprocessor controlled by the main microcontroller in a slave configuration. For this project instead, we need to minimize the power consumption and the VS1005 standalone seems the perfect solution to fulfil our goal.

We started to experiment with the VS1005 Developer Board but still we need some clarifications that maybe are interesting to others too.

1. Measuring power consumption with the VS1005 Developer Board (v1.8) is tricky. LEDs drain a lot of current and measuring VHIGH is a mere estimation.
Do you have suggestions for excluding LEDs and other drains? I thought to remove R45 to inhibit at least the LED stripe. Do you have other ideas? I don't like cutting traces that make changes irreversible but if needed I'll do.

2. We created a simple app to set an RTC alarm, push the VS1005 in power off, and wait for the interrupt that awake it. It works great, thanks for examples and forum!
Can we do something similar with the UART port? The final project needs to go in sleep for long periods and be awakened by a UART command other than the internal RTC.

3. Actually, in certain conditions, we need to monitor Line-In and start recording. What is the best tradeoff for reducing power consumption while monitoring analogue inputs?
Currently, we reduce the clock (RTC source) and use the SAR to monitor the Line-In signal however calling SetClock is a bit slow because performs several checks, we need probably to revisit that example to fit our needs. However, the main concern is that some current is still required by the 32kHz clock.
We were considering something smartest to reduce power consumption that involves the power-off. Is possible to define a kind of threshold that triggers the VS1005 to wake up. In other devices, the ADCs can run while the main CPU is in sleep/idle, sometimes they have built-in filters or comparators. Does the VS1005 offer something similar or can we do a trick for this?

4. The main storage will be a micro SD. Now we are using the SPI flash to keep system drivers and the SD for files. It may be not mandatory and we did not experiment yet, but can be the SPI removed at all? In other words, can the VS1005 boot from the SD? I did a little investigation on this, maybe there are threads in that regards, sorry.

5. The USB works well as a mass-storage to access both SPI flash or SD. However the SD is removable and we may not need to access the content through the VS1005's USB, we were wondering if the USB can be used as USB CDC, instead? Any alternative to the mass-storage could open to other usage scenarios. But we cannot find examples or discussions in the forum other than mass-storage, any light is appreciated.

6. Minor point, more for confirmation. Is it correct that the RTC alarm is not reset across system reboot/reset? It seems that is in the responsibility of the user to clear the RTC alarm if the VS1005 reboot before that RTC alarm is triggered. It is fine in this way, we just need confirmation.

Many thanks for all your hints.
Luca

lucap87
User
Posts: 9
Joined: Tue 2018-06-26 9:09
Contact:

Re: VS1005 a few questions

Post by lucap87 » Mon 2021-01-11 9:51

Has the VLSI team the chance to look at these questions?

It would be important for us to clarify some aspects before continuing with the development.

Regards

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

Re: VS1005 a few questions

Post by Hannu » Mon 2021-01-11 11:22

lucap87 wrote:
Wed 2020-12-23 10:57
Dear VLSI experts, we are evaluating the design of a new project based on the VS1005.

Up to now, we used a variety of VLSI products as a coprocessor controlled by the main microcontroller in a slave configuration. For this project instead, we need to minimize the power consumption and the VS1005 standalone seems the perfect solution to fulfil our goal.

We started to experiment with the VS1005 Developer Board but still we need some clarifications that maybe are interesting to others too.

1. Measuring power consumption with the VS1005 Developer Board (v1.8) is tricky. LEDs drain a lot of current and measuring VHIGH is a mere estimation.
Do you have suggestions for excluding LEDs and other drains? I thought to remove R45 to inhibit at least the LED stripe. Do you have other ideas? I don't like cutting traces that make changes irreversible but if needed I'll do.
Developer board isn't the easiest board to measure. It has a lot of additional component. I'll suggest Break out boards. MK1 doesn't have SD card and Mk. 2 has VS23S040 as an extra for recorder buffer.
2. We created a simple app to set an RTC alarm, push the VS1005 in power off, and wait for the interrupt that awake it. It works great, thanks for examples and forum!
Can we do something similar with the UART port? The final project needs to go in sleep for long periods and be awakened by a UART command other than the internal RTC.
Nope. It is however possible to turn off analog parts and put VS1005 to much lower speed and power consumption mode. The UART speed also decreases if going ultra slow.

How about periodically waking up and asking Is there something and reset the alarm and power off?
3. Actually, in certain conditions, we need to monitor Line-In and start recording. What is the best tradeoff for reducing power consumption while monitoring analogue inputs?
Currently, we reduce the clock (RTC source) and use the SAR to monitor the Line-In signal however calling SetClock is a bit slow because performs several checks, we need probably to revisit that example to fit our needs. However, the main concern is that some current is still required by the 32kHz clock.
We were considering something smartest to reduce power consumption that involves the power-off. Is possible to define a kind of threshold that triggers the VS1005 to wake up. In other devices, the ADCs can run while the main CPU is in sleep/idle, sometimes they have built-in filters or comparators. Does the VS1005 offer something similar or can we do a trick for this?
SAR might be the smallest logic to have running. ADC and SAR both require reference, but have their own power down bits in ANA_CFx register.
Another idea is to have some comparator to send power button pulse when signal goes over trigger level. This could also used with the UART wakeup. First start bit would wake up and after a few ms VS1005 would be up and running.

Only part which is working during power off, is RTC clock.
4. The main storage will be a micro SD. Now we are using the SPI flash to keep system drivers and the SD for files. It may be not mandatory and we did not experiment yet, but can be the SPI removed at all? In other words, can the VS1005 boot from the SD? I did a little investigation on this, maybe there are threads in that regards, sorry.
There has been some SD-card kernels. However, SD-card gets stuck easier than SPI flash. For example when I test Break out board mk. 2. it requires power cycle after VS1005 has been programmed. Normal reset isn't enough.

If you go with external flash, have power switch and have states in program where you know where it is possible to power off the flash, that way it would require one pin to control, pull-up resistor and P-fet. And some careful programming.

Another point is that internal flash is fast and not very power hungry.
5. The USB works well as a mass-storage to access both SPI flash or SD. However the SD is removable and we may not need to access the content through the VS1005's USB, we were wondering if the USB can be used as USB CDC, instead? Any alternative to the mass-storage could open to other usage scenarios. But we cannot find examples or discussions in the forum other than mass-storage, any light is appreciated.
No-one has written that program, but there is no hardware limitation for it.
6. Minor point, more for confirmation. Is it correct that the RTC alarm is not reset across system reboot/reset? It seems that is in the responsibility of the user to clear the RTC alarm if the VS1005 reboot before that RTC alarm is triggered. It is fine in this way, we just need confirmation.
I think that would be counter intuitive to remove the alarm. Think about alarm clock which loses power and misses the alarm because of that. But the behaviour you are seeing is correct. VS1005 reset doesn't touch the RTC part.

Post Reply