cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L412xx UFBGA package VBUS pins?

nachus001
Associate

Dear all

I'm starting a design with the  STM32L412R8I (or  maybe STM32L412RBI6) and I cannot find the VBUS dedicated pin in the datasheet nor in the manual. In this design the USB will be always device (no OTG)

Is it enough to have VDDUSB powered to detect a bus connection?

 

Additionally, the design is going to be battery powered and be disconnected from the USB bus most of the time. Can I have the microcontroller powered by its regular power pins (VBAT, VDD, VDDA) and power VDDUSB only when the device gets attached to an USB bus?

 

Thanks in advance

Ignacio


 
 

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

You can use any GPIO pin to detect VBUS. Hook it up to a resistor divider network that sets it high when VBUS is present. Initialize USB when it's present a de-initialize it when it goes away.

> Is it enough to have VDDUSB powered to detect a bus connection?

The chip doesn't know when VDDUSB is powered. At least I don't think there's a way to probe this information.

> Can I have the microcontroller powered by its regular power pins (VBAT, VDD, VDDA) and power VDDUSB only when the device gets attached to an USB bus?

Technically, yes, but the above point makes this difficult in practice, plus it's not going to save much power.

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

View solution in original post

5 REPLIES 5
TDK
Guru

You can use any GPIO pin to detect VBUS. Hook it up to a resistor divider network that sets it high when VBUS is present. Initialize USB when it's present a de-initialize it when it goes away.

> Is it enough to have VDDUSB powered to detect a bus connection?

The chip doesn't know when VDDUSB is powered. At least I don't think there's a way to probe this information.

> Can I have the microcontroller powered by its regular power pins (VBAT, VDD, VDDA) and power VDDUSB only when the device gets attached to an USB bus?

Technically, yes, but the above point makes this difficult in practice, plus it's not going to save much power.

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

Thank you TDK

 

Cheers

Ignacio

> The chip doesn't know when VDDUSB is powered. At least I don't think there's a way to probe this information.

You can use PVM1 to find out this information, see chapter Peripheral Voltage Monitoring (PVM) in RM0394 (and even throw an interrupt thus wakeup from a sleep upon its change). It compares VDDUSB with cca 1.2V, so it's not a perfect information, but probably sufficient enough for purposes of VBUS detection.

You have to regulate VBUS down to 3.3V, though, if you want to use it as VDDUSB.

JW

 

nachus001
Associate

Hello

My main concern about to power VUSB upon the bus connection (to 3.3V) is because the rest of voltages are going to be 1.8V, so the USB feature isn't going to work with that voltage, unless the voltage be switched on to 3.3V when the bus is connected, or to be OR powered with 1.8V while no bs is connected and to 3.3V when the USB cable is connected, but I'm not sure about thist last one

 

regards

Ignacio

VDDUSB is pin E5 on the STM32L412R8I. It is independent from VDD. You can have VDD = 1.8 V and VDDUSB = 3.3 V.

Power that with 3.3 V when USB is present and things should work.

TDK_0-1727104507158.png

 

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