/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / USB composite device-HID&Audio can't work together on STM32

Username:     
Password:     
             

Forum
  • Index
  •  » STM32 Family
  •  » USB composite device-HID&Audio can't work together on STM32

# 1   2011-10-11 13:28:22 USB composite device-HID&Audio can't work together on STM32

lvgxx
New member
Registered: 2011-10-06
Posts: 2

USB composite device-HID&Audio can't work together on STM32

Hello, all
I'm facing a problem while building a USB composite device( HID+Audio device ) on STM32F103VCT6.

I used the Audio Speaker demo code in STM32F10x USB Library( V2.2.1 ) as my template. I modified the Audio Speaker into Auido Mic, as a result, the OUT double buffer endpoint EP1 turns to be an IN double buffer endpoint to send audio stream into PC via USB. Then I added an IN interrupt endpoint to implementing the HID function. And I have modified the usb_decs.h, now both of 2 devices have enumerated successfully.

The problem is the HID EP and the Audio EP can not work together. After enumeration, the HID can work well. But if I start to record sound through USB audio stream pipe and the USB audio stream endpoint begin to transmit the audio stream into PC, the HID start to be wrong. And the HID report returned by the interrupt endpoint is very disorderly.

At first, I think it is caused by interrupt nesting, then I changed the priority of interrupt, but it did not work.

Now I can’t find the solution, Have you some suggestion? Thank you in advance!

Last edited by lvgxx (2011-10-11 13:31:27)

Offline

 

  • Index
  •  » STM32 Family
  •  » USB composite device-HID&Audio can't work together on STM32

Board footer