Serial crash when receiving incoming data faster than handled

Open
#293 36 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@SmittyHalibut is already working on this.

Since Oct 26, 2026.

  • #593 by @SmittyHalibut — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
56/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
arduino, c
Domain
embedded-iot

Research direction

Start by running the attached serial-crash.zip PlatformIO program on a Pico under Linux, then send repeated bursts of data while the loop is rate-limited. Compare behavior with and without the delay and inspect the serial handling path for the cause of the crash. Done means sustained incoming data no longer makes the Pico unresponsive or prevent sketch uploads.

Written by the indexing model from the issue text.

Description

Bug
Operating System

Linux

Arduino IDE version

Platform.io with

Board

pico

ArduinoCore version

earlephilhower#master

TinyUSB Library version

2.1.0

Sketch as ATTACHED TXT

The attached program just returns input or output '.' when no output is available, as fast as possible.
It limits the rate to 1000 characters per second, by using a delay in the loop.

serial-crash.zip

Using that program writing data from the host will quickly crash the pico (like by pasting 10 lines of codes again and again)
When crashed, the pico won't reboot for sketch upload.

Removing the delay in the loop seems to avoid crash of the program.

I've tried running on the second core, with the same results.

Compiled Log as ATTACHED TXT

No log available

What happened ?

The pico becomes unresponsive. Serial seems dead.

How to reproduce ?

Run the attached platform io program
Watch the serial monitor
Send bunch of data

The output will stop at some point, the pico won't even reboot.

Debug Log

No response

Screenshots

No response

Dominant language
C
Stars
654
Forks
187
Avg merge
21h 1m
Merged PRs (30d)
17

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from adafruit/Adafruit_TinyUSB_Arduino

All issues in adafruit/Adafruit_TinyUSB_Arduino

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.