cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F401 USB remote wakeup does not work

Mgree.730
Associate

Environment:

STM32F401RC

USB HID device, Full speed

freeRTOS

Problem:

Device can send/receive data to/from host and can be put in suspend state and resume from suspend state.

However, the remote wake-up function never works

Code:

My USB remote wake up log in a freeRTOS task:

// hUsbDeviceFS is a global USBD_HandleTypeDef

PCD_HandleTypeDef *hpcd = (PCD_HandleTypeDef *)hUsbDeviceFS.pData;

       HAL_PCD_ActivateRemoteWakeup(hpcd);

       osDelayUntil(&last_wake_time, 5);

       HAL_PCD_DeActivateRemoteWakeup(hpcd);

Observation:

USB D+ keeps at logic '1' and USB D- keeps at logic '0' when suspend. Never observed 'K' state on the USB data wire and therefore cannot wake up host.

Question:

Did I miss anything? Is there any example that I can take a look?

Thank you very much!

0 REPLIES 0