cancel
Showing results for 
Search instead for 
Did you mean: 

Is VUSB required/recommended for self-powered STM32 USB device?

mwp
Senior
Posted on August 08, 2016 at 19:20

Hi all,

Is the VUSB input required/recommended for self-powered STM32 USB device?

From everything ive read, the VUSB input is required for connection/disconnect detection, but in practice, everything seems to work just fine without it.

I've looked through the ST USB device library, and while there is a switch for VUSB/SELF_POWERED device support, it seems to nothing whatsoever (the switch/var is never checked by any of the ST USB device library code).

So... am i safe to just not use the VUSB input?

That pin is rather valuable and could be used elsewhere.

Thanks in advance!

#!stm32-!usb-!vusb
6 REPLIES 6
troy1818
Senior
Posted on August 09, 2016 at 07:55

You can read about it in AN4661 (for stm32f7). The VUSB (or VDDUSB) pin is powering the usb bus. So as an example, if you are running the MCU at 1.8V this pin is needed to be connected to external power. This pin should however always be connected as I understand it. If not ''used'' then connect it to VDD.

mwp
Senior
Posted on August 09, 2016 at 08:45

First, thanks for the reply.

I should have mentioned im looking at the STM32F401 in particular.

VDDUSB on the STM32F7x serves a very different purpose compared to the VBUS pin on the STM32F4 and other earlier STM32's.

Their functions are not comparable at all.

troy1818
Senior
Posted on August 09, 2016 at 10:07

Ah, yes. This is a different thing. You wrote VUSB in original post so I made assumptions :)...

brent239955_st
Associate II
Posted on August 10, 2016 at 16:10

From ''

http://www.st.com/content/ccc/resource/technical/document/reference_manual/5d/b1/ef/b2/a1/66/40/80/DM000968pdf/files/DM000968pdf/jcr:content/translations/en.DM000968pdf

'' , page 669:

The VBUS pin can be freed by disabling the VBUS sensing option. This is done by setting the

NOVBUSSENS bit in the OTG_FS_GCCFG register. In this case the VBUS is considered

internally to be always at VBUS valid level (5 V).

0690X00000605LOQAY.png

________________

Attachments :

STM32F401RCT6__VBUS_from_RM0368.png : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I16q&d=%2Fa%2F0X0000000biV%2FddTss1mHvkjDTMV8EEhQiaLn0jSHU15LbvQ5BAMPWqE&asPdf=false
Tejal Gadad
Associate II

I have a similar question to this, can I use the VBUS only for VBUS sensing using pin A9 on SMT32F446 and give external power to the STM32 using a battery and voltage regulator for 3.3V? Is it okay if I do not use the 5V at VBUS to power the STM32 chip?

The USB specification requires the device not to output any signal onto the data lines (DP/DM), if there is no valid voltage on VBUS.

So, if you want to implement a device conforming to the USB specification, you either power it from VUSB (i.e. "bus-powered device"), or if it has an independent power source (i.e. "self-powered device"), you should not enable the USB transceiver until you detect valid voltage on VUSB. You can detect it in any way, not necessarily using PA9, although most of the libraries probably assume the latter.

JW