cancel
Showing results for 
Search instead for 
Did you mean: 

(stm32f407) USB with fixed vbus

alberto23
Associate
Posted on November 03, 2014 at 14:51

good morning

I 'm doing a project with a custom board , I've been able to make work ethernet, sdio,gpio and serial ports.

 but I  have been troubles with usb port to make run the usb host mode with usb-storage using  stm32cube's libraries.

Right now the usb detects when you connect a USB flash drive , but it is not finished making the enumeration.

I'm afraid of not being able to make work USB, because the value of vbus is set from the power supply to 5v ( as seen in the attached schematic ) .

In the documentation , I found the following sentence :

''On-chip 5 V VBUS generation is not supported. For this reason, a charge pump or, if 5 V are available on the application board, a basic power switch must be added externally to drive

the 5 V VBUS line. The external charge pump can be driven by any GPIO output. This is required for the OTG A-host, A-device and host-only configurations.''

Does this mean I need to put a switch to make it works ?

If so, could  I  put a 2N2222 to enable  5v by GPIO?.

0690X00000604w4QAA.png

PD: I apologize for my english.

#vbus #stm32 #usb-host
2 REPLIES 2
chen
Associate II
Posted on November 03, 2014 at 18:48

Hi

I am a little out of my field here (I started as an electronics engineer but now I only do embedded/real time software).

''On-chip 5 V VBUS generation is not supported. For this reason, a charge pump or, if 5 V are available on the application board, a basic power switch must be added externally to drive

the 5 V VBUS line. The external charge pump can be driven by any GPIO output. This is required for the OTG A-host, A-device and host-only configurations.''

What ST are saying is that the STM32 CANNOT supply the 5V to the USB device because

1) the STM32 is powered at 3V or 3.3V

2) a USB host MUST be able to supply 500mA to a USB device (more than any IO pin of the STM32 is capable of).

I do not know what the device ''USBLC6-2'' is or does. Guessing, I would have to say that it is some kind of buffer device so that the logic level is changed and protects the STM32 from over voltage, shorts etc.

I am not sure that TVS4 is correct. My guess is that it is some kind of over volt protection (schotky diode?)

I think you need 1 each for the D- and D+ lines.

I know you can get specialist USB 'Switch' devices, which are used for USB host implementations. They allow a controller to enable (turn on 5V and connect the D+/-) or disable (turn off 5V and disconnects the D+/-). Try using one of these devices instead.

As I said, the 'switch' MUST be capable of handling at least 500mA.

chen
Associate II
Posted on November 03, 2014 at 18:54

Ok a quick google found Texas Instruments LM3526 will do the job.

(Other vendor devices will work as well - I just happened to remember seeing an application with TI devices).