Usb device/host/otg

The official STMicroelectronics Arduino core
Post Reply
Posts: 39
Joined: Sun Aug 14, 2016 7:44 am

Usb device/host/otg

Post by testato » Sat Nov 26, 2016 11:28 pm

is usb actually usable on this core ?

usb device ?
usb host ?
usb otg ?

a specific question on Bluepill (stm32f103) it have the usb host or only the usb device ?

and more generally, is it possible have usb host on an mcu, or only the mcu with usb otg can have usb host ?


User avatar
Posts: 7690
Joined: Mon Apr 27, 2015 10:36 am
Location: Melbourne, Australia

Re: Usb device/host/otg

Post by RogerClark » Sun Nov 27, 2016 1:17 am

STM's official core does not support this.

In fact there is no support for USB connectivity in the Official release, as it only supports Nucleo boards

We added USB device support for F103

See viewtopic.php?f=16&t=1553

But its not an official release.

AFIK. The STM32F103 hardware does not support USB Host
The STM32F103xx performance line embeds a USB device peripheral compatible with the USB full-speed 12 Mbs. The USB interface implements a full-speed (12 Mbit/s) function interface. It has software-configurable endpoint setting and suspend/resume support. The dedicated 48 MHz clock is generated from the internal main PLL (the clock source must use a HSE crystal oscillator).

STM32F4 devices support HOST / OTG
The STM32F405xx and STM32F407xx devices embed a USB OTG high-speed (up to 480Mb/s) device/host/OTG peripheral.

As STM only intend to support basic Arduino functionality and only on Nucleo boards, I don't think they will ever release any code to do Device or Host / OTG as an official release, because Nucleo's do not have a USB OTG connector

Post Reply