cancel
Showing results for 
Search instead for 
Did you mean: 

Does pull-up resistor on USB bus need the 2-stage transistor switch?

Posted on November 16, 2010 at 18:32

Does pull-up resistor on USB bus need the 2-stage transistor switch?

8 REPLIES 8
afinko
Associate II
Posted on May 17, 2011 at 14:15

As you mentioned, in STM3210E:

http://www.st.com/stonline/products/literature/um/14220.pdf

there is two stage tranzistors to pull-up (T1 and T2 on page 32/48).

I made the same on my own hardware design and it work just fine.

I do not know if simple MCU GPIO pin can be used with 1K5. Maybe not enough current can by provided from GPIO.

Afi

Posted on May 17, 2011 at 14:15

I do not know if simple MCU GPIO pin can be used with 1K5. Maybe not enough current can by provided from GPIO.

GPIO current capability cannot be the reason - 3.3V / 1k5 makes only 2 mA.

Also the resistor protects GPIO pin against an overcurrent due to eventual external overvoltage.

Ivan

afinko
Associate II
Posted on May 17, 2011 at 14:15

I would say the best could be to test it if it will work ...

js23
Associate III
Posted on May 17, 2011 at 14:15

The only problem I see is when you connect the USB cable to an unpowered controller as you will apply voltage directly to a standard I/O pin. I do not think that this will cause damage to the controller (I already tried), but it is sure out of spec.

A solution might be inserting a schottky diode between the controller and the resistor. Of course this will lead to some voltage drop so the voltage might be out of spec, too.
xacc
Associate II
Posted on May 17, 2011 at 14:15

You dont really need it.

It does work without it. I have such a set up on my 1 board.

The problem is with the polarity of the I/O pin after reset.

I pull the pin down asap and before any USB initialization, then add a 250ms delay (to simulate a USB disconnect) before pulling it up.

This works mostly.

Posted on May 17, 2011 at 14:15

 

It does work without it. I have such a set up on my 1 board.

 

Thank you for your experience.

The problem is with the polarity of the I/O pin after reset.

 

 

I don't understand...

I think that there is no voltage on USB Data pins from the host until a voltage is injected through the pull-up resistor on the device side and a host driver is switched on.

I pull the pin down asap and before any USB initialization, then add a 250ms delay (to simulate a USB disconnect) before pulling it up.

Why you set the pin down at the beginning and not leave it in 3rd state (floating input)?

xacc
Associate II
Posted on May 17, 2011 at 14:15

I am not sure how to do a floating input on a output pin. Would that be the GPIO_Mode_Out_OD option?

Posted on May 17, 2011 at 14:15

I am not sure how to do a floating input on a output pin. Would that be the GPIO_Mode_Out_OD option?

 

I think about switching of GPIO_Mode_IN_FLOATING and GPIO_Mode_Out_PP modes in GPIO_InitTypeDef structure and calling of GPIO_Init function.