2025-09-18 1:25 AM
Goodmorning,
I am using STM32L552RCT6 in my design that I intend to use through a USB interface.
I'm trying to implement the VBUS sense (compulsory since my device will be self-powered). I have read AN4879, and it's clear to me that I have to add a voltage divider to avoid the situation where I provide 5V to the MCU while it's not powered. The values recommend from AN4879 makes perfect sense too.
However, I checked the schematics of the NUCLEO-L55ZE-Q, and the values of the resistor there are very much different!
Can anyone explain to me why there is this discrepancy and which one I should follow?
Thanks!
Solved! Go to Solution.
2025-09-18 3:04 AM
AN4879 focus specifically on the use of PA9 for VBUS sensing, where the NUCLEO board uses PC2 - What do you plan to do for your design?
The divider in AN4879 would bring a 5V USB voltage down to ~3.5V which would satisfy the Vdd+4V limit, while also satisfying the VIH threshold of 0.7Vdd.
Conversely, the nucleo implementation would bring a 5V USB voltage down to 0.65V which is be less than 0.7Vdd regardless of Vdd is 3.3V or 1.8V, so it seems there is some additional design concerns in the NUCLEO board - Maybe it is detected as an analog voltage?
I have worked exclusively with the STM32F series, which has consistently worked using the AN4879 recommendation, and the STM32L5 series is also encompassed by AN4879, so I would use that recommendation.
2025-09-18 3:04 AM
AN4879 focus specifically on the use of PA9 for VBUS sensing, where the NUCLEO board uses PC2 - What do you plan to do for your design?
The divider in AN4879 would bring a 5V USB voltage down to ~3.5V which would satisfy the Vdd+4V limit, while also satisfying the VIH threshold of 0.7Vdd.
Conversely, the nucleo implementation would bring a 5V USB voltage down to 0.65V which is be less than 0.7Vdd regardless of Vdd is 3.3V or 1.8V, so it seems there is some additional design concerns in the NUCLEO board - Maybe it is detected as an analog voltage?
I have worked exclusively with the STM32F series, which has consistently worked using the AN4879 recommendation, and the STM32L5 series is also encompassed by AN4879, so I would use that recommendation.
2025-09-18 4:56 AM
If you're using a digital pin, you'd want resistors that will bring the value to a logical 1.
If you're using an analog pin along with the ADC, you have a lot more flexibility.
There is no one correct solution here. If you have no preference, I'd suggest following AN4879.
2025-09-19 12:47 AM
Yes, it seems more straight-forward to bring it to a logical 1. Will do that.
Thank you all!