STM32G4 USB self powered device / VBUS handling
I am setting up a STM32G4 based USB self powered device with CubeMX. The CDC/ACM stack nearly runs fine. How shall I implement VBUS handling? The part has no dedicated VBUS pin. So some app notes suggest to connect VBUS to a GPIO-extInt or ADC and implement the VBUS handling from application code. But what needs to be called on VBUS change by application? I did not find an example for an application based VBUS handling.
