‎2017-11-23 04:09 AM
Hi everyone,
I'm developing an HID Host application to comunicate with a own device and I'm using the NUCLEO-F446ZE board.
At the start I tried to use the HID_Standalone application in the STM32CubeF4 firmware package and then, I tried to develop a new application with STMCube configurator.In both case I tried to connect (with OTG connector) 3 different type of mouse and 1 keyboard and no all device are able to comunicate with microcontroller:
All the previous devices are tested with PC and work fine and the board are powerd with external source.
What can be the problem and how can I fix it?
Thanks in advance
#usb-hid #usb-host #stmcube-f4-usb #middlewareSolved! Go to Solution.
‎2018-01-26 07:56 AM
I have applied the
pavel_a
patch suggested inhttps://community.st.com/0D70X000006SyJZSA0
and seems the USB stack works fine! I hope, as soon as possible, ST release the USB stack with these fixs.Regards
‎2018-12-03 06:24 AM
When I click the above link I get the following error : "We have changed our Community platform and the page you were looking for appears to have been moved. Please bear with us while Google and other search engines finish re-indexing our pages."
I'm stuck with the same issue, so could you please help in re-directing me to the proper link?
Thanks in advance
‎2018-12-05 12:11 AM
Yes it's true: the link doesn't work.
I have not tried anymore but may be ST has released a new version of the stack with these patches. You've tried?
‎2018-12-05 01:23 AM
Hello,
The suggested fix isn't yet integrated in the STM32Cube package.
Regarding the other discussion where @Pavel A.​ suggested a fix, you can find it in https://community.st.com/s/question/0D50X00009XkZ4KSAV/usb-host.
If you think that you are facing a different issue than what was described there, please submit a new discussion with relevant details about your case.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
‎2018-12-05 10:02 PM
The suggested fix mentioned in the above link is working for me. Thank you.
‎2018-12-05 11:54 PM
we are waiting a definitively release of USB stack ;)
‎2018-12-08 05:29 PM
Hi Luca,
You can find this patch for F4 library ver. F4.1.21.0 here:
Regards,
-- pa
‎2019-03-16 02:31 AM
hi
can some one tell me which keyboards work with stm library!?
thanks for your quick reply.
‎2019-03-16 08:55 AM
With the latest STM32F4 library (v 1.24) most legacy-compatible keyboards should work.
Also, composite devices (kbd+mouse, kbd+card reader) where keyboard is the 1st function should work.
"Works" here means that the HID reports can be read reliably.
I have not tested translation of HID codes to any non-latin layout.
-- pa
‎2021-04-29 08:40 AM
I'm hopeful that my answer is useful after about 3 years!
This is because of your PCB design, not the code. Most of the microcontrollers, same as STM32F407, only have one USB port that can be configured as the Host or Device. But in the evaluation boards, the Discovery board for example, there are both the Host and Device physical ports. These ports share the D+ and the D- pins of the microcontroller. Based on USB standard, in the full-speed device mode, there is a 1.5k pull-up resistor connected to the D+ pin. If you need to use the system in the Host mode, you will be sure that this pull-up resistor is disabled based on the PCB schematic details. Each USB device (keyboard, mouse, etc) internally includes this resistor. Using this resistor the Host can detect the type of the connected USB device and the exact plug-in time. After plug-in detection, the host will start the enumeration procedure. Otherwise, the host can not detect the correct moment of device insertion and will run enumeration miss alined. In this situation, the enumeration procedure always reports some sort of errors same as USBH_busy.
You can find more details about USB wiring at the following link:
https://www.beyondlogic.org/usbnutshell/usb2.shtml
Regards