Application Solution Series: USB

USB Capability Highlights

Compared with ESP32-S3, ESP32-S31 offers significant improvements in USB configuration, addressing ESP32-S3’s USB performance bottlenecks and functional limits.



ESP32-S31 provides two USB controllers: USB OTG 2.0 and USB Serial/JTAG. The USB OTG 2.0 controller expands endpoint count and FIFO buffer capacity, improving performance in multi-device and high-bandwidth scenarios. USB Serial/JTAG uses a dedicated PHY and a separate USB port, and can operate concurrently with USB OTG.

Key configuration changes and application-level performance gains are summarized below.


USB 2.0 High-Speed Support

ESP32-S31 integrates a High-Speed PHY, raising physical-layer bandwidth from 12 Mbps on ESP32-S3 to 480 Mbps for higher-throughput use cases. With the bandwidth increase, USB UVC cameras support higher resolution and frame rates, including 1080p @ 60 FPS; USB mass-storage read/write speeds improve substantially for fast data transfer.

In measured USB Device mode, ESP32-S31 achieves an application-layer effective data rate of up to 159 Mbps—nearly 17× the 9 Mbps measured on ESP32-S3.


1.gif


2.gif


Expanded Endpoints and FIFO Buffers

ESP32-S31 increases the endpoint count to 16 and raises dynamically allocable FIFO buffer size to 4 KB. More endpoints support a larger number of devices behind a USB hub and improve USB composite device connectivity. Larger FIFO resources increase maximum packet size per endpoint and overall throughput, greatly improving USB camera compatibility.


3.JPG


Typical Application Performance Gains

These upgrades extend ESP32-S31’s USB use in multimedia and multi-peripheral systems. The following sections summarize measured gains in several representative scenarios.

Multi-Camera USB + Wi-Fi Video Streaming

ESP32-S31 can connect multiple standard UVC cameras through a USB hub and output multiple live video streams over Wi-Fi or Ethernet, enabling a single-chip multi-camera system.

ESP32-S31 supports 1 to 6 USB cameras concurrently. In testing, a dual-camera setup achieves stable 1080p @ 30 FPS; with three cameras, stable 720p @ 30 FPS is achievable. This approach suits smart inspection, multi-point surveillance, and similar applications.


4.gif


5.gif


USB Camera + LCD Display

ESP32-S31 includes a hardware JPEG decode engine for real-time decoding of camera frames at typical resolutions such as 1080p @ 30 FPS and 800×600 @ 90 FPS. It supports RGB, I8080, and other LCD interfaces, using efficient DMA to route decoded video directly to the display, improving both display performance and system efficiency.

In one measured setup, ESP32-S31 connects to an 800×600 @ 30 FPS UVC camera over USB, decodes the stream, and outputs to an 800×480 LCD over RGB565 at a stable 800×480 @ 30 FPS. With 720p @ 30 FPS camera input, output reaches 720p @ 30 FPS. This suits video doorbells, reverse-assist displays, and similar products.


6.gif


7.gif


USB Multimedia Secondary Display

In USB Device mode, ESP32-S31 can expose USB audio, USB CDC, USB HID, and other device classes at the same time, enabling a USB multimedia secondary display that combines video output, audio output, and touch input.

At 800×480 resolution, the secondary display sustains 60 FPS with substantial system headroom, while supporting high-fidelity audio output and multi-point touch input. This suits PC secondary monitors, industrial control panels, and smart home control screens.


8.gif


9.gif


USB Composite Device Host Scenario

In USB Host mode, ESP32-S31 supports composite devices that combine, for example, a USB camera, USB microphone, USB speaker, and USB HID. USB class drivers can be loaded on demand for flexible resource allocation and multi-device coordination.

In one measured setup, a composite device with camera, microphone, and speaker capabilities connects to ESP32-S31 to form a minimal multimedia interaction terminal. It provides vision, voice input, and voice output to the Xiaozhi Agent with responsive interaction. The same approach applies to multimodal interaction terminals, smart conferencing devices, and AI voice assistants.


11.gif


Open-Source Resources

Documentation

https://docs.espressif.com/projects/esp-iot-solution/zh_CN/latest/usb/usb_overview/usb_overview.html

Repositories