cancel
Showing results for 
Search instead for 
Did you mean: 

Wakeup does not work on USB Device(ST32F407)

VAlec.1
Associate II

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.

1 REPLY 1
MFOGA.1
Associate II

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));