SPRADN7 January 2025 AM2612
The robust driver libraries provide seamless interaction between the microcontroller and USB peripherals, simplifying development. USB, sometimes perceived as a rather complex protocol, has been made easy to work with by TinyUSB. The TinyUSB stack is a very feature-rich open-source USB stack that is thread-safe, memory-safe with no dynamic run-time allocation of memory. With the TinyUSB stack, the developer can easily create applications using the USB classes provided in the TinyUSB stack. The TinyUSB stack already has some examples in-built inside the source code for both device and host modes. For example, the stack contains examples for HID host controller, which can be easily ported out of the stack and built in the MCU_PLUS_SDK. To support classes such as RNDIS with TCP/IP, TinyUSB stack can also be configured to work with LwIP stack.
The low-level USB driver can be divided in two parts, the system-on-chip (SoC) porting layer, which has information specific to the port on AM261x and the actual USB Device Core Driver which implements the complete USB functionality. The application developer can either directly use the driver without the involvement of the middle-ware stack (TinyUSB stack) and write applications over it, OR, the middle-ware stack can be used which eases the development process a lot.
Figure 2-2 AM261x USB Software Block
DiagramThe TinyUSB stack supports the following classes: Audio, Video, Bluetooth, CDC, DFU, HID, MIDI, MSC, Network, USBTMC, Vendor, and so forth, but not all of these are feasible to be run on AM261x (for example, Bluetooth® class cannot be enabled due to no Bluetooth hardware on the AM261x). To enable a new class that is not supported in the SDK out-of-box, the developer just needs to:
With the steps above, the users can quickly enable different USB classes that are not a standard SDK offering.