Serial crash when receiving incoming data faster than handled
Maintainers usually reply within 1 day
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
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.
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from adafruit/Adafruit_TinyUSB_Arduino
-
follow-up
Difficulty 1/5 Under an hour Newbie friendliness 91/100
adafruit/Adafruit_TinyUSB_Arduino#627 ·
Maintainers usually reply within 1 day
-
follow-up
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
adafruit/Adafruit_TinyUSB_Arduino#607 ·
Maintainers usually reply within 1 day
-
follow-up
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
adafruit/Adafruit_TinyUSB_Arduino#597 ·
Maintainers usually reply within 1 day
-
follow-up
Difficulty 4/5 3-5 days Newbie friendliness 35/100
adafruit/Adafruit_TinyUSB_Arduino#626 · 1 comment ·
Maintainers usually reply within 1 day
-
follow-up
Difficulty 4/5 3-5 days Newbie friendliness 18/100
adafruit/Adafruit_TinyUSB_Arduino#620 · 1 comment ·
Maintainers usually reply within 1 day
All issues in adafruit/Adafruit_TinyUSB_Arduino
Similar issues
-
polygonToCells CLI silently drops vertices when whitespace precedes a coordinate's closing bracketOpen
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
issue: bug report
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 2 days
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dfa1/rocksdb-ffm#292 ·
Maintainers usually reply within 1 day
-
SPIDevice selects an active-high device as soon as it is createdPossibly taken @mikeysklar claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
adafruit/circuitpython#11869 ·
Maintainers usually reply within 1 day