2017-12-06 01:11 PM
Hello,
The title says it all. There's a a mysterious delay in USB_SetCurrentMode in F7 USB LL driver (stm32f7xx_ll_usb.c V1.2.2):
Does any one know the origin/need of this delay? There's no comment (or time units) about this. It was causing the USB device to timeout on descriptors initialization when the MCU boots up while USB is already plugged in. I removed the delay and everything seems to work fine on my PC. However, I want to make sure it's not required for some systems/hosts?
Thanks
#usb-device #stm32-f7 #f7 #delay #timeout2018-01-16 01:00 AM
Hello
Kaadan.Asaad
,The FDMOD/FHMOD in the OTG USB configuration register are used to force the core to device/host mode.
After setting the convenient force bit, the application must wait at least 25ms before the change takes effect (This information is mentioned in the reference manual when describing the bits).-> This delay is mandatory
However, the behavior you're describing is unexpected. Are using an ST board or your own hardware? Have you developed your own software?Khouloud.