AnsweredAssumed Answered

USB VBUSDetect and Battery Charging

Question asked by Clonimus74 on Jan 30, 2018
Latest reply on Jan 30, 2018 by waclawek.jan



Can someone please explain what is the VBUS detect (HAL_PCDEx_BCD_VBUSDetect) and battery charging (USBD_LL_BatteryCharging), what is it used for and how to use it (with STM32L4)?


Currently I have an EXTI interrupt on a port that gets the USB VBUS, I use it to turn off the USB peripheral once the VBUS is not present and turn it back on once it is detected again.


I use USB device in VCP mode.