AnsweredAssumed Answered

USB D+ Pullup with gpio

Question asked by longchair.m on Oct 24, 2012
Latest reply on Sep 9, 2013 by xcxl.seb
Hello everyone,

I have been experiencing an issue with USB recently on which I wouls need some tips.

I have an Olimex H103 board running a STM32F103 chip. I have been running my code on it and usb works fine.

I have made my own board for an application and implemented the USB line slighly differently.
In order to make the line pullup, I have used a GPIO line.
So in my configuration PB4 is configured as PP output, connected to a 1K5 resistor which is connected to the D+ Line.

from the code which is tunning on my olimex board I only had to modify :
- The GPIO Output port used for USB DISCONNECT
- The State of the IO in USB_Cable_Config function (I need to invert the actuation because I have a PP output instead of OD).

When I startup the program, the USB is initilialized, when the pullup is activated, my PC is detecting a device, But I don't get any further, no interruption is coming, and windows will tell that the device is unknown.

When I run this same code on olimex, I get interrupts right after the line is pulled up, which are completed the detection process.

I have tested the continuity of the 4 pins up to the chip and they all seem ok.

I would like to know if this way to pullup the line with a GPIO is valid and if you would have an idea of what might go wrong.

Thanks for your suggestions :)