Skip to content

Serial USB CDC JTAG S3 crashes when end() is called twice #8326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task done
SuGlider opened this issue Jun 18, 2023 · 0 comments · Fixed by #8332
Closed
1 task done

Serial USB CDC JTAG S3 crashes when end() is called twice #8326

SuGlider opened this issue Jun 18, 2023 · 0 comments · Fixed by #8332
Assignees
Milestone

Comments

@SuGlider
Copy link
Collaborator

Board

ESP32-S3

Device Description

Just the S3 devkit - using USB CDC/JTAG port

Hardware Configuration

None

Version

other

IDE Name

1.8.15

Operating System

Win11

Flash frequency

40MHz

PSRAM enabled

yes

Upload speed

115200

Description

When using USB JTAG/CDC as default Serial port the S3 will crash is Serial.end() is called twice.

It may also happen with 2.0.9. Crash happens with 3.0.0.

Sketch

// MUST USE USB Mode "CDC/JTAG" and "CDC on Boot: Enabled"
void setup() {
  Serial.begin();
  delay(500);
  Serial.println("First Print Testing");
  Serial.flush();
  
  Serial.end();
  Serial.end();  // Second end() causes crash.

  Serial.begin();
  delay(500);
  Serial.println("Second Print Testing");
  Serial.flush();
}

void loop() {
}

Debug Message

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x18 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403798c2
SPIWP:0xee
Octal Flash Mode Enabled
For OPI Flash, Use Default Flash Boot Mode
mode:SLOW_RD, clock div:1
load:0x3fce3818,len:0x498
load:0x403c9700,len:0x4
load:0x403c9704,len:0xad0
load:0x403cc700,len:0x2a84
entry 0x403c9880
First Print Testing

assert failed: xQueueGenericCreate queue.c:430 (uxQueueLength > ( UBaseType_t ) 0)


Backtrace: 0x403779aa:0x3fca0300 0x4037b701:0x3fca0320 0x4038129d:0x3fca0340 0x4037b95f:0x3fca0470 0x42002ed2:0x3fca0490 0x42002f2d:0x3fca04b0 0x42001b77:0x3fca04d0 0x420033aa:0x3fca04f0 0x4037e25e:0x3fca0510

Other Steps to Reproduce

Set USB JTAG/CDC mode. Enable CDC on Boot. Run the sketch.

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

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

2 participants