Replace USB-micro jack function using off-board USB

Begging the patience of this forum as this is my first post and I am quite green.

Could someone point me toward the simplest means by which to utilize a secondary USB interface in place of the on-board hardware?

I'm currently using on-board USB for project download (perpetual bootloader mode) and HID function via USBComposite library.

The blue pill device fits in my project box without issue, but there is no room in there for a USB-micro cable connection. (Not even a right angle connection... and super-slim right angle USB micro ribbon cables are less common and MUCH more expensive that I would have guessed.) Furthermore, I'm out of patience with the terrible mechanical properties of small USB-B ports on non-desktop devices. I plan to install a Neutrik NA-USB connection in my chassis. Wiring this rugged interface to a set of soldered pads seems like my best chance for keeping everything intact and working over the long haul.

I've noted that PA11 and PA12 are labeled USB+/-, but I've found no online discussion regarding the use of these pins for USB. I've seen several tutorials which involve using PA09 and PA10 as an interface to a USB/ST-LINK device for uploading... but I've seen no mention of using such a device as a 'standard' HID connection.

In cases like this I generally find that the answer is either A) So simple that nobody bothers discussing it online or B) So complex that it is not worth the trouble for a beginner like myself. Can anyone advise on which path I'm walking?


  • There is no second USB on blue pill. The one on board uses PA11 and PA12 pins.

    PA09 and PA10 pins are USART pins. They are used to upload FW but only with USB-UART interface.

    You can add a secondary USB connector and connect it to PA11 and PA12 but you have to remember to add resistors.

    Or you can remove usb socket from board and solder wire to connector in it's place.

  • Resurrecting my own zombie thread, since I'm back on this project.

    Thank you @GonzoG. I think that was the information I was looking for. If I understand you, PA11 and PA12 are logically common to the D+ and D- signals of the onboard USB-B-micro, did I understand that correctly? And if I use the correct resistors in the correct configuration, I should be able to wire an off-board USB-B connector through the resistors and to PA11 and PA12 to create a physically separate (although logically common) USB connection, for use with perpetual bootloader and HID emulation?

    Is it truly as simple as my sketch below? (Yes, I'll rewire the USB Vbus and Ground properly.)

  • Just a quick follow up, yes it is that simple. I was able to connect to my blue pill (acting as a usb-midi device) using the above schematic. (Used 33R resistors, since I had them on hand. I imagine these are just current limiting resistors specified by the USB electrical spec. So any small value in the 10's might work. I'll order in 20s for the breakout board I'm building.)

    Thanks all.

Sign In or Register to comment.