Thinking about going USB

The USB specs are pretty large.

Specifications

USB 2.0 specs [1]. Explanations [2].

Good description of the protocol [3].

Another source [4].

Protocol analyzers

USB communications can be spyed with:

Software Wireshark (example video there [5]).

Hardware OpenVizsla An Open-source FPGA-based USB sniffer [6]... based of the Xilinx Spartan 6 LX9 TQFP144 (nice choice!).

About the STM32F1

The IP cores for STM32F1xx are not consistent among all versions:

  • STM32F103xx (medium density, performance line) and STM32F102xx (medium density, USB access line): USB "USB full-speed device interface". (seems like made by ST)
  • STM32F105xx and STM32F107xx (connectivity line): OTG_FS "USB on-the-go full-speed". (seems like bought at Synopsys)

For the USB ip, the user manual is UM0424 [7]. Note that the standard ST all-in-one header file for register definitions (stm32f10x.h) cannot be used alone because the registers for USB are not defined. You have to add you own header. For example, ChibiOS/RT did it there [8].