STM32L4 how to get USB connect/disconnect events
I'm using a STM32L4A6 with OTG_FS peripheral. I use the USB driver from STM. I only get the suspend callback, but never resume, or connected, or disconnected callback. Suspend is not good indicator for plug in or out. Even USB cable plug in will also generate suspend event. I'd like to know when the device is plugged into or unplugged from a computer's USB port. How to do that? Thanks!
I'm using STM32 CubeL4 firmware package1.17.0 (and STM32L4xx HAL 1.13.0).
