Host transports

Previous: Paced streams · Up: Samples in and out · Next: Modulation and coding

The link to the host sets the rates of every path in this part: a ring that runs gapless on the chip still loses samples if the link cannot carry them. This page lists the links, what each carries and which chip uses which. It builds on the paths of Samples in and out.

Transports at a glance

Link

Chips and boards

Apps

Capacity

Best measured stream

USB full speed, CDC-NCM (VITA 49.2)

ESP32-S3

stream

about 1 MB/s receive

8 bit / 400 kS/s transmit, 100 % (stream)

USB full speed, vendor bulk

ESP32-S3

osmosdr

1.16 MB/s in, 1.18 MB/s out

500 kS/s 8 or 4-bit receive, gapless (osmosdr)

USB-Serial-JTAG

ESP32-C6, ESP32-C5

osmosdr_serial

about 500 kB/s each way

250 kS/s 8-bit receive

UART

WHY2025 badge, C6 to P4

osmosdr_serial

5 Mbaud

the same rates as USB-Serial-JTAG

SDIO

WHY2025 badge, C6 to P4

osmosdr_serial

about 13 MB/s within a transfer

11.6 MB/s raw; 2 MS/s paced receive

USB high speed, vendor bulk

ESP32-S31

osmosdr_hs

40.157 MB/s with a 256-word TX FIFO

20 MS/s (osmosdr_hs)

USB high speed, bridge

WHY2025 badge, P4 for the C6

osmosdr_bridge, pcap

SDIO to the C6 (above)

2 MS/s receive, gapless in 5 s runs (osmosdr_bridge)

RP2040 links

MCH2022 badge, classic ESP32

osmosdr_serial, mch2022_coproc

UART up to 5 Mbaud; FPGA fast line 15 Mbaud; USB alone 928 kB/s

450 kS/s at 2 MS/s through the FPGA, some 900 kB/s (MCH2022 badge)

USB full speed

The ESP32-S3 apps use the S3’s OTG port at full speed.

VITA 49.2 over CDC-NCM

  • The USB transport of stream is CDC-NCM, an Ethernet-like network device over USB.

  • Both the receive VITA stream and the transmit VITA command and data channel ride over UDP/IPv6 inside that virtual link, on different UDP ports.

  • USB full speed limits the receive stream to about 1 MB/s. The rates this gives per item width, and the packet format, are in stream.

osmosdr vendor bulk

  • USB full speed, vendor bulk: 1.16 MB/s in, 1.18 MB/s out, measured with two XIAO ESP32S3 boards.

  • The vendor requests and the block format are in osmosdr.

USB high speed

The ESP32-S31 and the ESP32-P4 have a USB 2.0 high-speed OTG port.

TX FIFO sizing

A stream’s bulk IN endpoint needs more than one packet of TX FIFO.

ESP32-S31

ESP32-P4

FIFO RAM (GHWCFG3)

896 words free in all; the FIFOs’ power-on depth is 512 words

896 words, read on the badge

Bulk IN FIFO

128 words in DIEPTXF1 (below)

an IN endpoint is bulk capable only with a FIFO of 128 words

Working configuration

256 words or more

g-tx-fifo-size = <16 128 128 64 64 64 64>: 16 words for CDC-ACM’s notification endpoint, 128 each for the two bulk IN endpoints (816 words in all with the RX FIFO and EP0’s)

What failed

128 words (above)

three FIFOs of 128 did not fit: the driver refused them, USB never came up and MCUboot reverted the image

  • On the S31, with 128 words every IN token during a refill gets a NAK, and the link stops at exactly 16.384 MB/s, 4 packets a microframe.

  • From 256 words it carries 40.157 MB/s, 20 MS/s plus block headers, without a gap.

  • On the S31, DMA burst length and USBTRDTIM (0, 5 and 9 tried, the driver’s value left alone) hardly matter.

  • A freshly reset S31 core reads 0 in DIEPTXFn: it is in host mode until forced.

  • The P4’s vendor interface and requests are in pcap internals.

ESP32-S31 port

  • The only OTG connector is the USB-A socket J4, with VBUS always driven: read osmosdr_hs before connecting it to a PC.

  • Zephyr’s DWC2 driver works, buffer DMA from TCM included.

A marginal cable

A marginal cable looks like a dead PHY.

  • The host reports high speed, then -71 at every transaction, because the chirp is slow enough to survive what the data is not.

  • The tell is GINTSTS.SOF (sticky, nothing clears it) staying 0, and full speed working (DCFG.DEVSPD 1 and a soft reconnect, possible over JTAG).

  • adj_vref_sq boots as 8 where the HAL’s header says 2. Lowering it lets a bad cable decode some packets, but a good cable needs no change.

  • Host mode over JTAG with a USB stick in J4 tests the chip’s path with no cable at all.

ESP32-P4 bridge

osmosdr_bridge makes the WHY2025 badge’s P4 a high-speed USB device for the C6’s radio:

  • Vendor requests go to the C6 as request frames, and its replies come back.

  • The C6’s receive blocks are already in the USB block format and go out on bulk IN as they are, from a pool of 16 blocks (16 ms at 2 MS/s).

  • The host’s transmit samples go to the C6 as transmit frames.

  • Receive reaches 2 MS/s (8-bit items above 250 kS/s), transmit 250 kS/s: the C6’s limits.