PaxInstruments / labwiz-board

A development board based on the STM32 series processors specifically targeting the STM32F103RxT series.
4 stars 2 forks source link

Purpose of VBUS input #39

Closed charlespax closed 8 years ago

charlespax commented 8 years ago

We have VBUS input on PA9, but I'm not sure why. We're pretty strapped for pins, so it would be nice to know if we can repurpose this pin. What is the use case here? screen shot 2016-08-09 at 01 06 21

electrokean commented 8 years ago

I'm guessing this is useful for knowing when a USB cable is plugged in - either for mcu based battery charger control or to begin USB enumeration. Most pins are 5V tolerant, but I still tend to include a resistive divider myself...

charlespax commented 8 years ago

The USB data lines handle enumeration. I've removed and repurposed the VBUS line as the VBAT_DIV2 battery voltage input.