VBUS Sensing on STM32N6
Hello,
I have a question regarding VBUS sensing on STM32N6.
First off, I found the
Guide to USB development resources on STM32
https://community.st.com/t5/stm32-mcus/guide-to-usb-development-resources-on-stm32/ta-p/790803
I also read AN 4879.
I want to use OTG1 of my MCU to establish a USB connection to my PC. The MCU is a self-powered device.
Since it's a self-powered device, VBUS sensing becomes mandatory.
In all ressources it is written that PA9 (or PB13) are used for VBUS sensing and are 5V tolerant.
However, on the STM32N6, it seems that:
- PA9 is not 5V tolerant
- there is no mentioning of VBUS sensing functionality to this pin.
The datasheet returns nothing if I search for VBUS.
The Ref Manual 0486,Rev2 has a chapter 72.2.6 about VBUS detection but it doesn't help me much.
But page 3750 states the following:
If needed, VBUS detection must be managed by an ADC channel or an external
comparator. It cannot be managed by OTGPHY1 since it is forced in external comparator mode and not connected to VBUS.
VBUS comparison with Vsafe0v and Vsafe5v thresholds is performed by an ADC. An
external resistor bridge is required to scale down VBUS to the 1V8 range of the ADC channel input.
So from this I understand that there is no dedicated Pin for this functionality on my MCU and it must be implemented trough the ADC (and for this brought down to 1,8V)
But why "if needed" - Does this imply I don't need it?
I would greatly appreciate if someone could take a minute to help me understand this.
Thanks!
Lucas
