AM243x MCU+ SDK  08.03.00
USB

Introduction

The USB SW stack in MCU+ SDK is shown below.

USB SW Stack Block Diagram

There are three layers as listed below,

  • TinyUSB: This is the USB stack itself and acts as the interface for user application to USB
  • USB Device Driver: This is the USB HW and SOC specific device drivers
  • TinyUSB Porting Layer: This is the layer which binds the open source TinyUSB stack to the SOC specific device driver

We encourage customers to use USB peripheral from tinyUSB APIs. The USB CDC Echo Example is using the CDC class API from TinyUSB. This way, customers can easily adapt to other TinyUSB examples.

For advanced customers or 3P USB stack vendors, refer to the USB device driver references listed below.

Features Supported

TinyUSB

TinyUSB is an open-source cross-platform USB Host/Device stack for embedded system, designed to be memory-safe with no dynamic allocation and thread-safe with all interrupt events are deferred then handled in the non-ISR task function.

Below features are supported in the SDK

  • USB device
  • USB CDC Class

USB Device Driver

The USB device driver is the USB HW specific software component that provides a programming abstraction to the Cadence USB IP included in the SOC and supports below features,

  • USB device instance creation/deletion
  • USB device endpoint handling
  • USB device data transfer
  • USB device interrupts and DMA

SoC Porting Layer

The SoC porting layer for USB device driver is the glue layer between the SoC and the USB device driver and does the below,

  • Pinmux needed for USB device
  • Clock source selection needed for USB device
  • Clock settings needed for USB device
  • Configure the USB HW for USB device mode

SysConfig Features

Note
It is strongly recommend to use SysConfig where it is available instead of using direct SW API calls. This will help simplify the SW application and also catch common mistakes early in the development cycle.
  • Initialize USB device driver including clock setup and pinmux

Features Not Supported

  • TinyUSB Class Drivers Other Than CDC
  • TinyUSB Host Core Driver and Class Drivers
  • USB 3.0
  • USB 2.0 Host Mode
  • USB Dual Role Mode

Important files and directory structure

Folder/Files Description
${SDK_INSTALL_PATH}/source/usb/tinyusb
config/ TinyUSB Stack configuration
portable/ TinyUSB Stack porting
tinyusb-stack/ TinyUSB Stack source files
${SDK_INSTALL_PATH}/source/usb/cdn
core_driver/ Cadence USB core driver source files
doc/ Cadence USB core driver documents
include/ Cadence USB core driver Soc porting layer API header files
soc/ Cadence USB core driver Soc porting layer source files

Additional References

References
SOC Porting Layer
USB CDC Echo Example
TinyUSB
TinyUSB Github Project
USB Device Driver
USB Device Driver Quick Start Guide
USB Device Driver APIs
USB Device Driver User's Guide
USB Device Driver Porting Guide
SOC Porting Layer
APIs for USB