Skip to content

Show HN: Handling UART backpressure on ESP32 without blocking producers

github.com/choihimchan
2 pointsoctablock1 comment
On HN

While working with ESP32, I kept running into the same failure mode: UART / BLE output occasionally falls behind, and simple queues either grow unbounded or force producers to block.

I built a small embedded scheduling core focused on runtime behavior, not API completeness.

What this demo shows: - Producers never block - Output is limited by a bytes-per-tick budget - TX backpressure causes jobs to requeue (not disappear) - Low-priority telemetry degrades explicitly under pressure - Every decision is observable via runtime counters and logs

This is not an RTOS scheduler or a message queue library. It’s a validated snapshot of how the system behaves under sustained output pressure on ESP32 (Arduino).

I’m curious how others handle this problem on small MCUs: explicit degradation, blocking producers, or something else?

Comments

Cool work! Any plans for an ESP-IDF native example/port? I think it could help adoption among ESP-IDF users.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.