cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F4 Discovery OTG-Host with HID-Device: only one Dataset

wenzel
Associate II
Posted on February 06, 2014 at 11:45

Hello,

I am using USB OTG Lib 2.1.0 with STM32F4 Discovery Board.

The Setup is Host-Mode to connect to HID-Devices.

It works fine with Mouse. It also works with a Joystick, which is detected as Composite Device of 3 HID-Devices (Mouse, Keyboard, Joystick), when bridging HID-init.

I am using the raw-data from the Joystick (2char x, 2char y, 2char z, char buttons)

Another Joystick, which is similiar to the other one, quits communication after two valid Datasets.

Initialization and enumeration works fine but after second Request in USBH_HID_Handle() there is no response from HID-Device (no URB_DONE).

I am really new to this library. So any ideas whats the problem?

#usb #hid #otg #host #stm32f4
2 REPLIES 2
chen
Associate II
Posted on February 06, 2014 at 13:46

Hi

''Another Joystick, which is similiar to the other one, quits communication after two valid Datasets.''

Maybe it is the joystick!

Actually, what rate are you sending the requests?

You may be sending them too quickly. I was reading about USB HID problems to do with the polling rate in another post/thread.

wenzel
Associate II
Posted on February 06, 2014 at 15:47

Yes, i also blame the joystick :D, but this one has to work.

On Windows-PC the Joystick does its job.

i am execute the USBH_Process() periodically with a Timer every 7ms (140Hz).

this is the longest possible periode, otherwise i get no data.