Introduction to USBX

Revision as of 12:15, 26 January 2021 by Registered User (→‎Introduction)

1. Introduction

Besides offering STMicroelectronics’s USB stack, USBX, the Azure RTOS USB embedded stack, is currently supported and offered with a set of applications on STM32 MCUs.
The USB Overview is a dedicated wiki page that was implemented to provide a general overview of the Universal Serial Bus and its main features.
USBX is the Azure RTOS USB Host and USB Device embedded stack. It is tightly coupled with ThreadX. For some classes, it requires the FileX and NetXDuo stacks. It allows to work with USB devices with multiple configurations, composite devices, USB OTG and supports the USB power management.
USBX provides both USB Host and USB Device stack with a large set of the USB classes. The modular architecture makes the porting on different USB hardware IPs easier as soon as the low-level driver can answer the USBX requests. In the STM32 context, the USB IPs either host or device, vary from a family to another. Even though all IP should be supported transparently by the USBX thanks to the common STM32 HAL driver API.
USBX provides all common USB features and classes. The following figure provides the list of currently supported classes:

USBX supported classes


  • HUB class cannot be supported on current STM32 products due to a HW limitation.

Besides ThreadX integration with USBX, the USB events are managed through interrupts.
The USBX stack has mainly three layers:

  • The lower layer is the controller layer that ensures the interfacing with the Hardware USB peripheral and for STM32 MCUs this layer is compatible with the HAL.
  • The middle layer ensures the USB stack requirements processing and the interfacing between the low and high layers.
  • The higher layer includes the different classes and ensures the interfacing with the application layer.

The following figure provides an overview of the USBX three layers architecture and main components.

USBX layers and components overeview

As presented in the following figure, the different layers can be easily found within the USBX folder.

USBX Folder architecture overview

For more details, please refer to Azure RTOS USBX documentation.

2. USBX Device for STM32

3. USBX Host for STM32


No categories assignedEdit