Skip to content

Native USB CDC hangs up on ESP32-S2 after about 320 characters #6221

Open
@technoblogy

Description

@technoblogy

Board

Adafruit QT-Py ESP32-S2

Device Description

Plain board.

Hardware Configuration

No.

Version

v2.0.2

IDE Name

Arduino IDE

Operating System

macOS 10.13.6

Flash frequency

80MHz

PSRAM enabled

yes

Upload speed

921600

Description

Entering text into the Serial Monitor causes the Serial to hang up after about 320 characters. Run the following sketch, then cut and paste all the following text (total 512 characters) into the Serial Monitor input field, and press Return:

$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
$0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ

The Serial Monitor prints:

64
128
192
256
320

ie it hangs up after 320 characters and doesn't reach 512.

NB I've implemented the patch suggested by @SuGlider from PR #6133 in Issue #6205.

Sketch

void setup() {  
  Serial.begin(9600);
}

int Count = 0;

void loop (void) {
  if (Serial.available()) {
    Serial.read(); Count++;
    if (Count % 64 == 0) Serial.println(Count);
  }
}

Debug Message

No debug output.

Other Steps to Reproduce

Also tested on UM FeatherS2 - hangs up in the same way.

Works fine on ESP32-C3 DevKit and Adafruit ESP32 Feather.

I've tried adding Serial.setRxBufferSize(1024) but has no effect.

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Under investigation

Relationships

None yet

Development

No branches or pull requests

Issue actions