arduino / arduino/ArduinoCore-avr

Arduino Micro USB Serial cannot receive more than 255 data once

Open
#125 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C
Stars
1.5k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

**Version**: Arduino IDE=1.8.0; Mac=10.10.5; MCU=Atmega32U4
**Issue**: Arduino Micro USB Serial is crashed if send more than 255 data once to Serial. when it is occurred , the USB register is: 1) UEINTX = 0b 10010100 2)UEBCLX = 0b 0. That means the RX FIFO is empty but FIFOCON is not released, so the host has to wait until timeout.
**Code**:
```arduino
void setup() {
Serial.begin(115200);
}

void loop() {
if (Serial.available()) { // If anything comes in Serial (USB),
Serial.write(Serial.read()); // read it and send it out Serial1 (pins 0 & 1)
}
}
```

**Send data**:
12345678901234567890123456789012345678901234567890
22345678901234567890123456789012345678901234567890
32345678901234567890123456789012345678901234567890
42345678901234567890123456789012345678901234567890
523456789012345678901234567890123456789012345678

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the supplied sketch on an Arduino Micro with an ATmega32U4, sending more than 255 bytes over USB Serial. Inspect the reported UEINTX and UEBCLX states when reception hangs; done means the device continues receiving and echoing the complete input without waiting for a host timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.