Skip to main content
Visitor II
September 23, 2024
Solved

STM32L412xx UFBGA package VBUS pins?

  • September 23, 2024
  • 2 replies
  • 1215 views

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


 
 

    This topic has been closed for replies.
    Best answer by TDK

    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.

    2 replies

    TDKAnswer
    Super User
    September 23, 2024

    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.

    nachus001Author
    Visitor II
    September 23, 2024

    Thank you TDK

     

    Cheers

    Ignacio

    nachus001Author
    Visitor II
    September 23, 2024

    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

    Super User
    September 23, 2024

    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