cancel
Showing results for 
Search instead for 
Did you mean: 

USB Suspend/resume in STM32F7

tachyon701
Associate

Hi,
I want to put the USB bus into SUSPEND/RESUME state, currently I'm using gState in USBH_HandleTypeDef to manually put the device into HOST_SUSPENDED state and similarly to move to the Idle state I'm manually assigning gState to be HOST_IDLE.

With this approach I'm able to move to suspend state, I have verified the same on oscilloscope, there is no bus activity in SUSPEND state
Issue with this approch is if we move from suspend to ideal state and back to suspend state we can't go to ideal state and we are stuck in the suspend state, I have called MX_USB_HOST_INIT() before making USB state=idle but its stuck in some state or its not getting enumerated again

Can anyone suggest any other way or why this is happening?

 

Thanks

1 REPLY 1
FBL
ST Employee

Hello @tachyon701 

 

gState is only meant to give current state in the global host state machine. It cannot change bus activity. I suggest you wake up through EXTI line interrupt through OTG_FS_WKUP while in suspended state.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!