cancel
Showing results for 
Search instead for 
Did you mean: 

Resistor values for Vbus sensing

vgrimaldi
Associate

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.

vgrimaldi_1-1758183745800.png

However, I checked the schematics of the NUCLEO-L55ZE-Q, and the values of the resistor there are very much different!

vgrimaldi_0-1758183670499.png

Can anyone explain to me why there is this discrepancy and which one I should follow?

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
mjuels
Associate III

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.

View solution in original post

3 REPLIES 3
mjuels
Associate III

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.

TDK
Super User

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.

If you feel a post has answered your question, please click "Accept as Solution".
vgrimaldi
Associate

Yes, it seems more straight-forward to bring it to a logical 1. Will do that.

Thank you all!