VS1010 USB Flash Support

Designing hardware and software for systems that use the VS1010 MP3 Audio DSP Microcontroller.
Post Reply
User avatar
Panu
VSDSP Expert
Posts: 2829
Joined: Tue 2010-06-22 13:43

VS1010 USB Flash Support

Post by Panu »

Dear Forum Members,

Here is an experimental driver that supports reading (playing music) from USB flash memories connected to VS1010c.

The driver is in two parts. The main part, USBHRD.DLX is the USB Host Read Only Driver. That occupies only 356 words of instruction memory and provides only the functions to do block reads from the USB flash. It calls another program, USBPROBE.DLX, which is slightly larger, to probe the USB bus, enumerate the connected USB flash and build a device driver as disk U: in VSOS.

The driver is completely rewritten from scratch, and at time of writing this, only a couple of different USB flash sticks are tested. More will follow. Many flashes require some kind of hand-holding, so there's going to be updates that add support for more USB flash sticks, but for now, please test and report your findings.

The driver is invoked by command USBHRD which must only be given once, and a flash stick MUST be connected to the USB host port (developer boards need DP/DN adapter from VLSI). The USB flash memory will become drive U: and can be used normally with VSOS (only not written to).

-Panu

For the previous thread about USB host support, please see viewtopic.php?f=15&t=2280&p=12118#p12118
Attachments
USBHRD.dlx
USB Flash Driver Proper. VSOS Executable (this is the one to run)
(2.5 KiB) Downloaded 442 times
USBPROBE.dlx
USB Flash Enumerator. VSOS Library
(5.55 KiB) Downloaded 452 times
arch-USBPROBE-2018-09-06-16-31-RC1-Experimental.zip
VS1010 USB Flash Driver Source Code. VSIDE Solution.
(27.4 KiB) Downloaded 482 times
Aleksi
User
Posts: 7
Joined: Wed 2019-06-12 10:03

Re: VS1010 USB Flash Support

Post by Aleksi »

Greetings!

Here is an updated version of this driver (for VS1010D) which should be much more stable and work with most of the sticks. Still, there might be some sticks that are not working yet and we would like to hear about your findings.

Something to notice. This version is made to work with player called 'Treeplayer' and that means drive U created will not be shown in devices if driver is not running. If you want to keep drive U in memory (visible in devices) and driver running, you have to edit fini function in usbhrd.c. Instructions to that are commented in fini funtion. You can find more information about Treeplayer from this thread: viewtopic.php?f=15&t=2430

Binaries as well as solution files for furter developement are provided below.


I hope this is helpful for you. Feedback and questions are welcome!

Kind regards,

VLSI Solution's trainee
Aleksi
Attachments
USBPROBE.dlx
USB Flash Enumerator. VSOS Library
(7.3 KiB) Downloaded 392 times
USBHDD.dlx
USB Flash Driver Proper. VSOS Executable (this is the one to run)
(4.09 KiB) Downloaded 378 times
arch-USBPROBE-2019-08-22-11-35-RC2.zip
USB flash driver, VSIDE Solution with source code
(55.29 KiB) Downloaded 432 times
regh
Senior User
Posts: 43
Joined: Thu 2020-11-05 13:50

Re: VS1010 USB Flash Support

Post by regh »

How experimental is the USB flash support now? I appreciate that you won't be able to test all USB sticks out there but how confident are you with customers using this driver if they use supported devices?
I've tried it with a few USB sticks I've got lying around and it seems to work well.
User avatar
Panu
VSDSP Expert
Posts: 2829
Joined: Tue 2010-06-22 13:43

Re: VS1010 USB Flash Support

Post by Panu »

Hi!

Well, at least it's much better than some other embedded products that I've seen. When that driver was written, we bought 1 piece of every USB memory stick we could find at local computer stores, so I have a bag of about 30 or so sticks that we've tested it with.

The most problems are not in the USB flash memory support itself, rather in the logic where player applications switch from playing from USB memory to playing from SD card to connecting to PC USB for uploading music to SD card, e.g. detecting the card or PC. And when there are problems in the USB flash, they're usually because of power stability problems.

-Panu
User avatar
Panu
VSDSP Expert
Posts: 2829
Joined: Tue 2010-06-22 13:43

Re: VS1010 USB Flash Support

Post by Panu »

There's an updated version of the USB host driver here:
viewtopic.php?f=15&t=2745

-Panu
Post Reply