Question
How to detect USB connection for STM32462 with VUSB connected via PA9
Using CubeMX to implement USB CDC on a self powered STM32462 with VUSB connected via PA9 via a resistor divider for automatic bus detection. I have confirmed that I have 3.3V on PA9 when VUSB connected and 0V when it's not. The USB class is CDC and works fine. I need to use PCD (charger detection) which means that I need to detect the presence of VUSB in order to invoke HAL_PCDEx_BCD_VBUSDetect().
My question is what calls or setup or direct access do I use to detect VUSB as the the state of PA9. Is it availible as an EXTI interrupt or a IO status register read or a HAL function.
