USB
USB
Integrated USB 2.0 with built-in PHY, versatile Host, Device, and OTG applications
Overview
The Ameba series of SoCs integrates USB 2.0 controller with built-in PHY, providing a wide range of solutions for USB Host, Device, and Dual-Role/OTG applications. Supporting various scenarios such as communication, multimedia, storage and human interface devices, their performance, compatibility and reliability have been extensively validated across a multitude of mass-produced customer products.
USB Classes Overview
CDC ACM (USB Communication Device Class - Abstract Control Model)
CDC ACM is the most commonly used subclass of USB CDC class, simulating a serial communication port (virtual serial port), allowing the host to perform serial data communication with the device via USB. It is widely used for debugging, transparent transmission, data transfer, custom communication protocols, and other scenarios.
Endpoint/Pipe Configuration
| Type | Count | Dependency | Description |
|---|---|---|---|
| Control IN/OUT | 1 | Required | Used for device enumeration and class-specific requests |
| Bulk IN | 1 | Required | Used for data transfer from device to host |
| Bulk OUT | 1 | Required | Used for data transfer from host to device |
| Interrupt IN | 1 | Optional | Used for notification/status updates |
CDC ACM Host
- Function: Connects USB-to-serial devices, modems, etc., generating virtual serial ports on the host side (e.g., /dev/ttyACM0, COM ports) for serial data communication
- Typical Applications: Industrial gateways, PLC controllers, embedded development board debugging interfaces, 4G/5G module AT command channels, etc.
- Supported SDKs: FreeRTOS, Linux, Zephyr
CDC ACM Device
- Function: Simulates a USB virtual serial port device, recognized by the host as a standard COM port without drivers, supporting bidirectional data transmission, commonly used for firmware debugging log output and command interaction
- Typical Applications: USB-to-serial modules, IoT module debugging interfaces, USB programming tools, wireless module AT command interfaces, etc.
- Supported SDKs: FreeRTOS, Linux
CDC ECM (USB Communication Device Class - Ethernet Control Model)
CDC ECM is the Ethernet subclass of USB CDC class, allowing USB devices to emulate a standard Ethernet NIC, providing network connectivity to the host via USB interface. Similar USB CDC network subclasses include CDC NCM and RNDIS, with main differences as follows:
| Protocol | Standard Source | Throughput | Characteristics |
|---|---|---|---|
| CDC ECM | USB-IF | Medium | Standard Ethernet frame encapsulation, driverless support on Linux/macOS/Win 10+ |
| CDC NCM | USB-IF | Highest | Multi-frame aggregation transmission, high throughput, higher implementation cost on embedded side, driverless support on Linux/macOS/Win 8.1+ |
| RNDIS | Microsoft | Medium | Non-USB-IF standard, Microsoft proprietary protocol, driverless support on Windows, being phased out on other platforms |
Endpoint/Pipe Configuration
| Type | Count | Dependency | Description |
|---|---|---|---|
| Control IN/OUT | 1 | Required | Used for device enumeration and class-specific requests |
| Bulk IN | 1 | Required | Used for data transfer from device to host |
| Bulk OUT | 1 | Required | Used for data transfer from host to device |
| Interrupt IN | 1 | Optional | Used for notification/status updates |
CDC ECM Host
- Function: Connects USB network adapters, 4G/5G USB dongles, etc., generating standard Ethernet interfaces on the host side (e.g., eth0, usb0) for USB network sharing
- Typical Applications: Industrial routers, embedded Linux gateways, USB wired network adapters, mobile Wi-Fi hotspots, etc.
- Supported SDKs: FreeRTOS, Linux, Zephyr
CDC ECM Device
- Function: Emulates a USB Ethernet NIC, providing network access capability to the host via USB interface, supporting TCP/IP protocol stack, enabling USB tethering when combined with Wi-Fi
- Typical Applications: USB tethering modules, Wi-Fi to USB wired NIC, 4G/5G USB network sticks, embedded network debugging interfaces, etc.
- Supported SDKs: FreeRTOS, Linux
HID (USB Human Interface Device Class)
HID is a standard human interface device class protocol defined by USB-IF, enabling data exchange between the host and input/output devices.
Endpoint/Pipe Configuration
| Type | Count | Dependency | Description |
|---|---|---|---|
| Control IN/OUT | 1 | Required | Used for device enumeration and class-specific requests |
| Interrupt IN | 1 | Required | Used for data transfer from device to host |
| Interrupt OUT | 1 | Optional | Used for data transfer from host to device |
HID Host
- Function: Connects USB keyboards, mice, gamepads, touchpads and other HID devices, parsing input data via Report Descriptor
- Typical Applications: Smart TVs, set-top boxes, gaming consoles, industrial control terminals, etc.
- Supported SDKs: Linux
HID Device
- Function: Emulates a USB HID device, reporting key presses, coordinates, sensor data, etc. to the host via Report Descriptor
- Typical Applications: USB keyboards, USB mice, wireless gamepad receivers, USB custom data acquisition devices, etc.
- Supported SDKs: FreeRTOS, Linux, Zephyr
MSC (USB Mass Storage Class)
MSC is a standard mass storage device class protocol defined by USB-IF, implementing host access to storage media via SCSI command set, supporting plug-and-play for USB flash drives, external hard drives, card readers and other storage devices.
Endpoint/Pipe Configuration
| Type | Count | Dependency | Description |
|---|---|---|---|
| Control IN/OUT | 1 | Required | Used for device enumeration and class-specific requests |
| Bulk IN | 1 | Required | Used for data transfer from device to host |
| Bulk OUT | 1 | Required | Used for data transfer from host to device |
MSC Host
- Function: Connects USB storage devices, performing read/write operations on storage media via SCSI commands, supporting mounting and accessing FAT32, exFAT and other file systems
- Typical Applications: Smart TVs, car entertainment systems, industrial data acquisition terminals, embedded OTA upgrade systems, NAS storage devices, etc.
- Supported SDKs: FreeRTOS (FAT32 only), Linux
MSC Device
- Function: Emulates a USB mass storage device, exposing SD card, eMMC and other storage media to the host as standard SCSI LUNs, enabling file transfer and firmware upgrades
- Typical Applications: USB flash drives, USB card readers, USB portable SSDs, IoT device firmware upgrade interfaces, USB data loggers, etc.
- Supported SDKs: FreeRTOS, Linux, Zephyr
UAC (USB Audio Class)
UAC is a standard audio device class protocol defined by USB-IF, enabling audio transmission (playback, recording) and control (volume, mute, etc.) between host and devices. Ameba USB stack supports UAC 1.0 and UAC 2.0, with basic differences between protocol versions as follows:
| Version | Max Sample Rate | Features |
|---|---|---|
| UAC 1.0 | 96kHz / 24bit | Basic audio streaming, synchronous transfer |
| UAC 2.0 | 384kHz / 32bit | High-resolution audio, feedback mechanism, power saving |
| UAC 3.0 | 768kHz+ | Low power mode, Power Domains |
Endpoint/Pipe Configuration
| Type | Count | Dependency | Description |
|---|---|---|---|
| Control IN/OUT | 1 | Required | Used for device enumeration and class-specific requests |
| Isochronous IN | 1 | Optional | Used for audio recording from device to host |
| Isochronous OUT | 1 | Optional | Used for audio playback from host to device |
UAC Host
- Function: Connects Type-C headphones, USB microphones, USB speakers and other USB audio devices, enabling audio transmission and control
- Typical Applications: Smart doorbells, smart speakers, smart TVs, smart audio modules, etc.
- Supported SDKs: FreeRTOS, Linux, Zephyr
UAC Device
- Function: Emulates a USB sound card, supporting audio transmission and control requests from the host, enabling wired and wireless audio transmission when combined with audio, Bluetooth, Wi-Fi and other interfaces
- Typical Applications: USB microphones, USB speakers, USB sound cards, wireless audio modules, etc.
- Supported SDKs: FreeRTOS, Linux
UVC (USB Video Class)
UVC is a standard video device class protocol defined by USB-IF, enabling video streaming transmission and control between host and cameras, video capture devices.
Endpoint/Pipe Configuration
| Type | Count | Dependency | Description |
|---|---|---|---|
| Control IN/OUT | 1 | Required | Used for device enumeration and class-specific requests |
| Isochronous IN | 1 | Required | Used for video stream transfer from device to host |
| Interrupt IN | 1 | Optional | Used for video control and status notifications |
UVC Host
- Function: Connects USB cameras, video capture cards and other UVC devices, acquiring and processing video streams. Combined with Wi-Fi, it can implement wireless video streaming.
- Typical Applications: Smart doorbells, video conference terminals, industrial visual inspection, embedded face recognition systems, live streaming capture devices, etc.
- Supported SDKs: FreeRTOS, Linux
UVC Device
- Function: Emulates a USB camera, providing standard video streams to the host, enabling complete USB camera solutions when combined with image sensors
- Typical Applications: USB webcams, USB video capture sticks, USB endoscopes, USB industrial cameras, etc.
- Supported SDKs: FreeRTOS
Vendor (USB Vendor-Specific Class)
Vendor is a device class reserved for vendor-specific use in USB protocol (Class Code 0xFF), not constrained by USB-IF standard class specifications. Vendors can define custom transmission protocols, endpoint configurations and data formats, achieving highly flexible USB communication solutions with dedicated drivers.
Endpoint/Pipe Configuration
| Type | Count | Dependency | Description |
|---|---|---|---|
| Control IN/OUT | 1 | Required | Used for device enumeration and class-specific requests |
| Bulk/Interrupt/Isochronous | User-defined | Optional | Flexible configuration based on application requirements |
Vendor Host
- Function: Communicates with custom USB devices via custom drivers, supporting flexible definition of control commands and data transmission protocols, enabling flexible USB communication solutions
- Typical Applications: USB programmers, USB protocol analyzers, industrial automation controllers, USB data acquisition systems, etc.
- Supported SDKs: FreeRTOS, Linux, Zephyr
Vendor Device
- Function: Declares itself as a vendor-specific device to the host with Class Code 0xFF, implementing private communication protocols via custom endpoints and data formats, achieving customized USB functionality
- Typical Applications: USB wireless transmission modules, USB dongles, USB firmware upgrade interfaces, etc.
- Supported SDKs: FreeRTOS, Linux, Zephyr
FreeRTOS USB Stack
Independently developed by Realtek, providing extensive USB IF standard class protocol support and user-friendly programming interfaces, with core advantages of high performance, high reliability, and high configurability, fully validated in many customers' mass-produced products.
- Supports rich USB IF standard class protocols, covering common host and device function classes such as CDC ACM/ECM, HID, MSC, UAC, UVC, etc.
- Supports composite host/device functions, carrying multiple function classes through a single USB interface to meet diverse application needs
- Supports vendor-specific host/device, enabling rapid construction of private USB communication protocols based on standard frameworks
- Supports dynamic switching between host and device roles to adapt to flexible connection topologies
- Automatically detects bus errors and provides automatic retransmission mechanism, ensuring data integrity and reliability
- Automatically detects connection status and provides debouncing mechanism, effectively avoiding false triggers caused by insertion/removal bounce, ensuring stable system operation
- Fully validated in many customers' mass-produced products
- Provides streamlined asynchronous callback-based API, significantly reducing learning cost while reducing CPU scheduling overhead and improving overall system real-time performance
- Provides templated generic class driver and application development model, requiring users to implement only a few callback interfaces for customized development, greatly shortening product development cycle
- Fully customizable device descriptors, including but not limited to VID/PID, device strings, endpoint configuration, etc., meeting brand customization needs
- Configurable class driver and core driver parameters, supporting fine-tuned optimization for different application scenarios
- Supports function module tailoring for resource-constrained embedded platforms
Linux USB Stack
Reuses Linux kernel native USB framework, fully compatible with Linux standard USB ecosystem, natively supports all USB host and device function classes continuously evolved by Linux community, maximizing reduction of user software development and maintenance costs.
- Upper protocol stack fully reuses Linux kernel native USB subsystem, fully compatible with Linux standard USB host and device frameworks, as well as user-space USB access interfaces, seamlessly integrating with mainstream software ecosystems
- Natively supports all USB standard class drivers integrated in Linux kernel, including CDC ACM/ECM/NCM, HID, MSC, UAC, UVC, etc.
- Continuously updated with Linux kernel versions, timely receiving feature enhancements, security fixes and performance optimizations
- Provides underlying USB PHY driver, supporting flexible configuration of calibration parameters via DTS
- Optimizes native USB controller driver for Ameba series chip USB hardware features, improving reliability
Zephyr USB Stack
Independently developed by Realtek, compared to native Zephyr USB stack which only provides limited device mode support, Ameba Zephyr USB stack is more mature and stable, and additionally provides complete USB host stack support, filling the gap in host functionality of the native protocol stack.
- Supports rich USB-IF standard class protocols, covering common host and device function classes, such as CDC ACM, HID, MSC, UAC, etc.
- Supports composite host/device functions, carrying multiple function classes through a single USB interface, meeting diverse application needs
- Supports vendor-specific host/device, enabling rapid construction of private USB communication protocols based on standard frameworks
- Compared to Zephyr native USB stack, additionally provides complete USB host stack support
- Shares fully validated USB stack core driver code with FreeRTOS SDK, providing higher engineering maturity and reliability compared to Zephyr native USB stack
- Automatically detects bus errors and provides automatic retransmission mechanism, ensuring data integrity and reliability
- Automatically detects connection status and provides debouncing mechanism, effectively avoiding false triggers caused by insertion/removal bounce, ensuring stable system operation
- Provides streamlined asynchronous callback-based API, significantly reducing learning cost while reducing CPU scheduling overhead and improving overall system real-time performance
- Provides templated generic class driver and application development model, requiring users to implement only a few callback interfaces for customized development, greatly shortening product development cycle
- Fully customizable device descriptors, including VID/PID, device strings, number of interfaces and endpoint configuration, etc., meeting brand customization needs
- Configurable class driver and core driver parameters, supporting fine-tuned optimization for different application scenarios
- Deeply integrated with Zephyr build system, supporting function module tailoring, effectively controlling firmware size for resource-constrained embedded platforms
Typical Applications
- USB Audio/Video Transmission: Smart door viewers, video doorbells, smart locks, smart surveillance, image capture, smart speakers, etc.
- USB 4G/Ethernet Communication: IoT gateways, mobile hotspots, ethernet adapters, smart surveillance, etc.
- USB External Storage: Smart speakers, data acquisition, OTA upgrades, remote file management, smart audio/video, etc.
- USB Transparent Transmission: Serial communication, custom communication protocols, etc.
USB Audio/Video Transmission
Smart door viewers, video doorbells, smart locks, smart surveillance, image capture, smart speakers, etc.
USB 4G/Ethernet Communication
IoT gateways, mobile hotspots, ethernet adapters, smart surveillance, etc.
USB External Storage
Smart speakers, data acquisition, OTA upgrades, remote file management, smart audio/video, etc.
USB Transparent Transmission
Serial communication, custom communication protocols, etc.
- USB Audio Device: Headphones, microphones, speakers, smart speakers, smart broadcasting, wired and wireless audio applications
- USB HID Device: Smart remote controls, smart keyboards/mice, gamepads, remote control, human-computer interaction applications
- USB Storage Device: Reading pens, voice recorders, audio players, wireless storage, etc.
- USB Transparent Transmission: Serial communication, custom communication protocols, etc.
- USB Wireless Card: USB wireless network card
USB Audio Device
Headphones, microphones, speakers, smart speakers, smart broadcasting, wired and wireless audio applications
USB HID Device
Smart remote controls, smart keyboards/mice, gamepads, remote control, human-computer interaction applications
USB Storage Device
Reading pens, voice recorders, audio players, wireless storage, etc.
USB Transparent Transmission
Serial communication, custom communication protocols, etc.
USB Wireless Card
USB wireless network card, providing network access for the host
- Wireless CarPlay Adapter: When powered on, it operates in device mode. After completing necessary authentication, it switches to host mode and actively establishes NCM and iAP2 communication with the car head unit to implement CarPlay functionality.
- Data Acquisition Device: In host mode, connects barcode scanners or sensors (HID/CDC) to acquire field data. When connected to PC, switches to device mode, emulating a serial port or USB flash drive to batch upload collected data to the management system.
- USB Storage Device: In host mode, accesses external storage media such as USB flash drives. When connected to PC, switches to MSC device mode for convenient file import/export, suitable for smart speakers, smart recorders and other application scenarios.
Wireless CarPlay Adapter
When powered on, it operates in device mode. After completing necessary authentication, it switches to host mode and actively establishes NCM and iAP2 communication with the car head unit to implement CarPlay functionality.
Data Acquisition Device
In host mode, connects barcode scanners or sensors (HID/CDC) to acquire field data. When connected to PC, switches to device mode, emulating a serial port or USB flash drive to batch upload collected data to the management system.
USB Storage Device
In host mode, accesses external storage media such as USB flash drives. When connected to PC, switches to MSC device mode for convenient file import/export, suitable for smart speakers, smart recorders and other application scenarios.
Development Resources
| Icon | Resource Name | Link |
|---|---|---|
![]() |
SDK Download | Link |
![]() |
FreeRTOS USB Development Guide | Link |
![]() |
Linux USB Development Guide | Link |
![]() |
Zephyr USB Development Guide | Link |
![]() |
Contact Us | Link |
Recommended ICs
| Features | Filter | RTL8721Dx | RTL8720E | RTL8710E | RTL8726E | RTL8713E | RTL8730E | RTL8721F | RTL872xD | RTL8735B |
|---|---|---|---|---|---|---|---|---|---|---|
| Application Processor |
Cortex-M | Cortex-M | Cortex-M | Cortex-M | Cortex-M | Cortex-A | Cortex-M | Cortex-M | Cortex-M | |
| DSP | ||||||||||
| ISP | ||||||||||
| Arm TrustZone | ||||||||||
| Dual Band | ||||||||||
| Wi-Fi 6 | ||||||||||
| R-MESH | ||||||||||
| Ultra-low Power | ||||||||||
| Ethernet | ||||||||||
| BT Dual Mode | ||||||||||
| HMI | ||||||||||
| Audio ADC | ||||||||||
| Audio DAC | ||||||||||
| SDIO Host | ||||||||||
| SD/EMMC Host | ||||||||||
| USB | ||||||||||
|
BT Dedicated Antenna |
||||||||||
| CAN |
| Feature | RTL8721Dx | RTL8730E | RTL872xD | RTL8721F | RTL8735B |
|---|---|---|---|---|---|
| High-Speed Mode (480Mbps) | |||||
| Full-Speed Mode (12Mbps) | |||||
| Host Mode | |||||
| Device Mode | |||||
| Device IN Endpoints | 4 | 4 | 4 | 6 | 4 |
| Device OUT Endpoints | 4 | 4 | 4 | 6 | 4 |
| Host Channels | 8 | 8 | 12 | 8 |


