cancel
Showing results for 
Search instead for 
Did you mean: 

Can anyone point me to a simple application note (or demo board) which shows how to wire up USB power/data on an STM32G0B1 family (or similar) micro. And NO, I am not interested in USB C but I am designing a self powered device.

gh
Associate II
 
3 REPLIES 3

How is the 'G0B1 different from any other STM32 in this regard?

There are simple USB-capable Disco boards out there (e.g. the 'F072 Disco), to serve as example.

JW

gh
Associate II

Your first question should be addressed to ST, not me. If they don't make it clear, then maybe they should.

Are you sure the disco is a good example of a self-powered design? Normally the USB driver senses Vbus somehow to detect if a host is attached (eg OLIMEX STM32F3). Unfortunately I'm using the 48 pin chip not the 64 as in this example.

That was a rhetorical question. While the 'G0Bx is the first to have the non-Synopsys device+host USB IP, from device point of view it does not differ from other non-Synopsys USB devices in STM32 which have the DP pullup integrated.

The usually cited concern over self-powered USB devices is this requirement from USB2.0 7.1.5:

The voltage source on the pull-up resistor must be derived from or controlled by the power supplied on the USB

cable such that when V BUS is removed, the pull-up resistor does not supply current on the data line to which it is

attached.

There's an additional related info in 7.2.1:

They [devices] may not provide power to the pull-up resistor

on D+/D- unless V BUS is present (see Section 7.1.5). When V BUS is removed, the device must remove power

from the D+/D- pull-up resistor within 10 seconds.

I'm not going to discuss the long history of USB standards violation in many of its aspects, nor the fact that should an upstream port withstand the pullup for 10 seconds it's highly unlikely it wouldn't withstand it for undefinite time, and that I'm yet to see an USB upstream port which can't sustain 3V/2mA into DP/DM when powered down. Sure, one should err on the safe side, and it's likely that should there be any formal USB testing it will look at this particular detail, too.

There is no dedicated VBUS input onto none of the non-Synopsys USB IP on none of STM32, so you simply use any GPIO input to detect presence of VBUS (after it being properly conditioned).

JW