Skip to content

Performance research: RadioLib per-packet overhead caps FLRC throughput at ~80 kbps on ESP32-C3 #2841

Description

@c03rad0r

Finding

During LR2021 throughput characterization for the variant PR (#2739), we measured RadioLib's per-packet RX pipeline overhead on ESP32-C3:

Configuration Time/packet Throughput
RadioLib default (LoRa) ~15-20ms ~80 kbps
Raw SPI bypass (direct LR2021 commands) 188µs 838.8 kbps
FLRC air rate (theoretical max) 2600 kbps

Root cause

RadioLib's RX pipeline performs multiple SPI round-trips per packet:

  1. readData() — read FIFO via RadioLib abstraction
  2. getRSSI() — separate SPI read
  3. standby() — mode change (SPI command + BUSY wait)
  4. startReceive() — re-enter RX (SPI command + BUSY wait)

Each round-trip is a CS-low → SPI command → CS-high sequence with a BUSY wait. On a single-core ESP32-C3 at 80 MHz, this adds up to ~15ms per packet.

Raw SPI bypass approach

By accessing LR2021 registers directly (bypassing RadioLib's per-packet methods), we collapse 8+ SPI transactions into 3:

  1. Read FIFO at offset 0 (single burst read)
  2. Clear IRQ flags
  3. Restart RX (no standby needed)

This achieves 838.8 kbps (8.3x improvement) with 500/500 unique packets, 0% PER.

Impact on MeshCore

  • LoRa mode (current): No impact. LoRa air time (100ms+) dwarfs processing overhead.
  • FLRC mode (future): Significant. If MeshCore adds FLRC support for high-throughput scenarios (file transfer, image sharing), this overhead becomes the bottleneck.

Suggestion

A future setFastRxMode() option in RadioLib could use minimal SPI round-trips for FLRC/high-speed modes. This would benefit any RadioLib user running FLRC, not just MeshCore.

References

This is informational — no action needed unless MeshCore plans FLRC support.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions