2022-10-02 12:29 PM
I want to use the USB Bus on an STM32G431CB as Virtual COM Port. The device is self powered, therefor I have to use the USB Link Power Management.
In Cube MX I can enable the Link Power Management. But the G431CB has no dedicated VBUS Pin, therefore I have to implement the reset of the USB Statemachine in my code - according to this document: https://community.st.com/s/article/FAQ-Management-of-VBUS-sensing-for-USB-device-design
I could use an GIPO / EXTI to detect if the USB cable is plugged in. But how can I reset the USB statemachine? Is there any HAL function or something similar? Furthermore it's very confusing, that I can enable the Link Power Management in CubeMX, but there are no further parameters and no hint how I can use this feature.
Can anyone give me a hint?
Thanks!