Quick hack: Add native (user) USB to ST’s Nucleo boards

I recently bought myself one of ST’s cheap Nucleo development boards with an STM32F072RB controller on it to quickly start developing one of my projects. The microcontroller has native USB support even without an external clock which makes it quite attractive.

The downside is that this board does not come with a USB connector that can be used by the controller itself. The USB connector on it is already used by ST’s own programmer (ST-Link). You could of course rewire the port to the microcontroller directly – but then you would lose the connection to the ST-Link and had to connect an external programmer.

So I came up with another solution: I just glued a straight (180°) THT mini USB connector to the bottom side of the board and wired the USB-D- pin to PA11 and USB-D+ pin to PA12. Luckily both pins are not already used on the board and are easily accessible since they are routed to pin headers. USB GND (and shield) must also be connected to GND. You can see the little hack in the following picture. The same hack can probably be done with all Nucleo boards that provide a controller with USB support. Maybe someone finds this useful. 😉

Glued mini USB connector to bottom side of Nucleo board and wired the data lines to the microcontroller port pins. Fits well. ;-)
Glued mini USB connector to bottom side of Nucleo board and wired the data lines to the microcontroller port pins. Fits well. 😉

Happy hacking,

André

Author: André Heßling

I am an electronic engineer living in Voerde, Germany.

10 thoughts on “Quick hack: Add native (user) USB to ST’s Nucleo boards”

    1. Hi Zhenya,

      the connection to +5V of USB is not needed in my case because I supply the board separately using the other USB connector (ST-Link).
      Technically you are not required to connect pin 1 of the USB connector (that is if you don’t need the 5V).

      Kind regards,
      André

        1. This will not work. The STM32F072 device has a USB device interface, not a USB host interface.
          Your modem is already a device so there is no way to connect two USB devices together.
          It needs a host interface (e.g. a PC, Raspberry Pi, etc.).

    1. Yes, that could work. But keep in mind that you must write a USB device driver for your modem. This is probably not an easy task.

        1. Sorry, I cannot help you with this. I have never done anything with the USB host interface or with a GSM modem as USB device. This is also out of scope of this article.

Leave a Reply

Your email address will not be published. Required fields are marked *