How to receive USB resume signal from host when STM32F407 send remote wakeup signal
Environment:
STM32F407VGTX
USB HID mouse, Full Speed
Problem:
Hi, I’m using a STM32F407VGTX board. I send a USB remote wakeup signal to the host and then try to receive a resume signal from the host. The STM32 board can wake up the host (bringing it to the login screen), but it cannot trigger the USB_OTG_GINTSTS_WKUINT interrupt. I have already configured my STM32 board as a HID mouse. However, if I use a real mouse instead, it can wake up the host and successfully trigger the USB_OTG_GINTSTS_WKUINT interrupt. Is there any suggestion or workaround for this problem?
void usb_remote_wakeup()
{
if (hUsbDeviceFS.dev_remote_wakeup == 1)
{
__HAL_PCD_UNGATE_PHYCLOCK(&hpcd_USB_OTG_FS);
HAL_PCD_ActivateRemoteWakeup(&hpcd_USB_OTG_FS);
HAL_Delay(5);
HAL_PCD_DeActivateRemoteWakeup(&hpcd_USB_OTG_FS);
}
}
