cancel
Showing results for 
Search instead for 
Did you mean: 

Add a USB host port on a STM32F103 dev board

0x80
Associate

Hi,

I'm just starting out with embedded programming & electronics so please bear with me :)

I am starting a project based on the STM32F103 Nucleo board. The first thing I want to do is create a USB host port to connect a class-compliant MIDI device.

From this link I learned that means the USB class is likely OTG. What I don't understand yet is what I need in terms of hardware. I would like to use a USB type A port. Can I hook it up straight to the MCU pins on the dev board without additional ICs?

I ordered this book today which will surely help me with this, but it will take some days to arrive and I'd like to prepare already if I can.

4 REPLIES 4
0x80
Associate

I think I've learned two important things this morning:

  • Yes, USB data lines are connected directly to the pins. I could for example use this simple module.
  • The 103x processor do not support USB host.

From what I've read here USB host / on-the-go class would require a 105/7 board at least. Luckily I didn't buy the hardware yet :)

That's a bit of a bummer because I was going base my project on an open-source project which uses the 103. I guess I will have to put in a bit more effort to port that code/hardware design.

But anyway, eventually my project requires both a USB host/OTG and a USB device port (also for MIDI) simultaneously. So I will first figure out that processor supports that...

Hi,
I am also having some trouble getting a USB breakout board connected to the Nucleo-F103RB, I only need the device in peripheral mode so not worried about otg, but I only get USB Device not recognised on my pc. I am still new to STM32 and this is the first time I am prototyping my own board for the chip, so I need to know how to communicate with the chip and instead of just buying the bluepill or similar as some have suggested for this issue. 

Pull a schematic for the board and look at how the USB connects to the STM32F103 providing the ST-LINK functionality

Look at this, README.md explains wiring expectations

https://github.com/STMicroelectronics/STM32CubeF1/tree/master/Projects/STM32F103RB-Nucleo/Applications/USB_Device/HID_Standalone

And these you might port over 

https://github.com/STMicroelectronics/STM32CubeF1/tree/master/Projects/STM3210E_EVAL/Applications/USB_Device

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

This is helpful, thank you. I was looking at the bluepill schematic originally and I have the wiring setup correctly as far as I can see, so I will try these repos and see how I get on. :smiling_face_with_smiling_eyes: