cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f4 USB HID not detected by pc

YONGAN ZHANG
Associate II
Posted on August 07, 2017 at 20:59

I am testing out the USB HID (otg fs) feature of my board with stm32f407vet6 mcu. I used stm32cubemx to configure it and i didn't add anything to the while loop in main c, just seeing if the device can be detected or not. However, after I uploaded  the code  and resetted the board, no response was given and I could not find any relevant port in the device manager of my pc.  The attached are the schematic for the usb_slave port and configuration in stm32cubemx.

https://community.st.com/tags/♯/?tags=usb%20otg

0690X00000607tcQAA.png

null
6 REPLIES 6
YONGAN ZHANG
Associate II
Posted on August 07, 2017 at 21:00

0690X00000607vwQAA.png 0690X00000607wBQAQ.png
Tilen MAJERLE
ST Employee
Posted on August 08, 2017 at 13:55

Hello

sirsargras

‌,

Can you show us your clock configuration? Clock is in most cases main problem why USB does not work.

Best regards,

Tilen

Tilen MAJERLE
ST Employee
Posted on August 08, 2017 at 14:10

Hello,

please share with us .ioc file from CubeMX.

Best regards,

Tilen

Posted on August 08, 2017 at 14:06

Hi

Majerle.Tilen

This is my clocking configuration; the clocking for usb is 48Mhz I think.0690X00000607wgQAA.png

Best regards,

Yongan

Posted on August 08, 2017 at 14:17

Hi,

The .ioc file is updated in the original post. Thank you!

Best regards,

Yongan

________________

Attachments :

usb_otg_device.ioc.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyWq&d=%2Fa%2F0X0000000b95%2F_hBHuK7A2OvGlDsCcidNGO58QM8XmqNbo.sSsRdkId4&asPdf=false
YONGAN ZHANG
Associate II
Posted on August 10, 2017 at 02:34

Hi,

The problem is solved. It turns out that in the schematic I pulled up the PA12(D+) pin to make the host device recognize the board as a full speed device. However, it is not necessary and is wrong. I only need to connect PA12 directly to the D+ in usb connector and it works fine.

Best regards,

Yongan