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

If you have a simple question and just want an answer.
Dohny
Member++
Posts: 23
Joined: Tue Dec 03, 2013 6:57 pm

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

Postby Dohny » Wed Aug 02, 2017 5:39 pm

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.
Dohny
Member++
Posts: 23
Joined: Tue Dec 03, 2013 6:57 pm

Postby Dohny » Thu Aug 03, 2017 8:28 pm

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...
User avatar
mon2
XCore Expert
Posts: 783
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Thu Aug 03, 2017 8:45 pm

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.
Dohny
Member++
Posts: 23
Joined: Tue Dec 03, 2013 6:57 pm

Postby Dohny » Sat Aug 05, 2017 11:53 pm

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.
User avatar
mon2
XCore Expert
Posts: 783
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Postby mon2 » Sun Aug 06, 2017 1:44 am


Return to “Q&A”

Who is online

Users browsing this forum: No registered users and 15 guests