Why USB_ResetPort function has 100 ms delay ?
USB_ResetPort function is called in USBH_Process in HOST_IDLE state after USBH_Delay(200U); this results in 300 ms delay usb application.
Is there any way to reduce this time in stm32 USB applications.
This function is after a USB connection.
Is there any way to remove this delays in USB_ResetPort funciton.
HAL_StatusTypeDef USB_ResetPort(USB_OTG_GlobalTypeDef *USBx)
{
uint32_t USBx_BASE = (uint32_t)USBx;
__IO uint32_t hprt0 = 0U;
hprt0 = USBx_HPRT0;
hprt0 &= ~(USB_OTG_HPRT_PENA | USB_OTG_HPRT_PCDET |
USB_OTG_HPRT_PENCHNG | USB_OTG_HPRT_POCCHNG);
USBx_HPRT0 = (USB_OTG_HPRT_PRST | hprt0);
HAL_Delay(100U); /* See Note #1 */
USBx_HPRT0 = ((~USB_OTG_HPRT_PRST) & hprt0);
HAL_Delay(10U);
return HAL_OK;
}#[STM32 MCUs] #USB
