Skip to main content
Lukasz Przenioslo
Associate III
August 22, 2017
Question

VDDUSB connection

  • August 22, 2017
  • 1 reply
  • 3158 views
Posted on August 22, 2017 at 15:07

Hello there,

I have a question regarding VDDUSB connection in STM32L452 MCU. Should it be applied all the time, or only when the USB cable is being connected? I was wondering either it is possible to apply it from the USB cable (with 5 V to 3.3 V conversion) because the device normally runs on battery and I dont want to power the USB module for the time of no USB connection if that is possible. If such solution would be considered, should one reinitialize the USB module in software each time USB is connected? In F4 device there was a dedicated pin for notifying the device that USB was connected. In STM32L4 there are only D+/D- lines available.

I would appreciate all help regarding this issue.

#vdd #stm32l4 #usb
This topic has been closed for replies.

1 reply

waclawek.jan
Super User
August 23, 2017
Posted on August 23, 2017 at 12:20

What does the related datasheet say?

JW

Lukasz Przenioslo
Associate III
August 23, 2017
Posted on August 23, 2017 at 13:02

I found couple things (DocID027294 Rev 2):

The V DDUSB voltage level is independent from the VDD voltage and should preferably be connected to VDD when the USB is not used.The following sequence must be done before using the USB_FS peripheral:

1. If V DDUSB is independent from V DD : (a)

a) Enable the PVM1 by setting PVME1 bit in the Power control register 2 (PWR_CR2).

b) Wait for the PVM1 wakeup time

c) Wait until PVMO1 bit is cleared in the Power status register 2 (PWR_SR2).

d) Optional: Disable the PVM1 for consumption saving.

2. Set the USV bit in the Power control register 2 (PWR_CR2) to remove the V DDUSB power isolation.

STM32L4452 has no USB detect line. In this case I assume I would need an additional external interrupt line in order to find out that a USB host was connected. I would then have to follow the steps from above point 1 and 2. Is that correct? I wonder either it is worth the hassle is software. Because if the USB peripheral powered and turned on permanently does not consume significant current, maybe its not needed to turn it off at all? But where to find the information on current usage of the USB peripheral?

What do you think?

waclawek.jan
Super User
August 23, 2017
Posted on August 23, 2017 at 13:49

OT: I went for the

http://www.st.com/content/ccc/resource/technical/document/reference_manual/group0/b0/ac/3e/8f/6d/21/47/af/DM00151940/files/DM00151940.pdf/jcr:content/translations/en.DM00151940.pdf

(I believe this is the newer, better, shinier) to find out this:0690X00000607z5QAA.png

JW