Page 1 of 1

Sending custom command over USB (HID) to USB Audio SW

Posted: Wed Aug 02, 2017 5:39 pm
by Dohny
Hello guys,
its me again.

Just wondering how hard is sending a command (we just need one command to initiate specific sequence in our user code) from windows machine (winusb or libusb) into xmos running your USB Audio SW? We don't really want to create composite device or anything like that. We just want one command (or specific sequence in case it acts as HID keyboard). Is there a way to do this simply?

Thank you.

Re: Sending custom command over USB (HID) to USB Audio SW

Posted: Thu Aug 03, 2017 8:28 pm
by Dohny
Or is there a possibility of CDC USB that could be enabled only if a button is held on powerup? Not the greatest idea, but I'm trying to find a solution...

Re: Sending custom command over USB (HID) to USB Audio SW

Posted: Thu Aug 03, 2017 8:45 pm
by mon2
Not an audio developer but...

a kludge of an idea is to apply 2 external flash devices and select between the 2 using an external jumper or pushbutton as you noted.

a) by default, your audio flash will load the firmware and perform the task

b) when required, press the pushbutton or some logic to switch to the other flash firmware to become the HID or CDC IP

We recall testing the CDC and HID IP examples which worked fine as per their documentation. This solution would require little effort to integrate.

https://www.xmos.com/support/appnotes/AN00124

https://www.xmos.com/support/appnotes/AN00129

Other ideas are to apply a USB hub controller (to fan out the single USB connector) -> one to XMOS; other to FTDI or another XMOS device. Then use the FTDI to perhaps even program the external flash on demand but you will have to park the XMOS CPU into reset while doing this "hot swap" idea. This way, you can prevent any possible field "bricking" of the device. However, with this idea, you will have to write up the FTDI SPI flash programming code or borrow from one of the many public open source designs.

Re: Sending custom command over USB (HID) to USB Audio SW

Posted: Sat Aug 05, 2017 11:53 pm
by Dohny
Thats not really what we need. I know there is CDC or HID libraries, they work fine on their own. My point is how to implement this to the audio software we already have running :( Any ideas? Could be HID or CDC or anything else.

Re: Sending custom command over USB (HID) to USB Audio SW

Posted: Sun Aug 06, 2017 1:44 am
by mon2