Skip to main content
Visitor II
January 27, 2020
Question

Wakeup does not work on USB Device(ST32F407)

  • January 27, 2020
  • 1 reply
  • 898 views

My hid device is numbered and receives/transmit data from/to Win10 hid driver.

The D5: Remote Wakeup descriptor is set to 1

Unfortunately, I looked through the analyzer and saw that there were no changes of D+ D signals when installing the RWUSIG bit.

 I execute the following code when WIN10 sleeps and does not send SOF packets

HAL_PCD_ActivateRemoteWakeup(&hpcd_USB_OTG_FS);

   HAL_Delay(10);

   HAL_PCD_DeActivateRemoteWakeup(&hpcd_USB_OTG_FS);

The RWUSIG bit is installed, but it does not give anything on the bus.

    This topic has been closed for replies.

    1 reply

    Visitor II
    July 25, 2020

    Have a look at the suspend callback code, you see that the USB PHY clock is getting gated. You must ungate before issuing the RWUSIG:

     /* Ungate PHY clock */

     __HAL_PCD_UNGATE_PHYCLOCK((&hpcd));

          

     /* Activate Remote wakeup */

     HAL_PCD_ActivateRemoteWakeup((&hpcd));