-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
Arduino serial monitor hang/freezes the microcontroller #6556
Comments
|
Hello @janczeresnia, thanks for reporting this. @SuGlider Can you please help with triaging of this issue? |
|
I guess, this is the board you are using: |
|
Unfortunately, I don't have such board here to test it. I can see that it uses CH340 for Serial communication, which may be the port used to connect to the Arduino IDE Serial Monitor. In order to identify that ESP32-C3 really hangs/freezes, I would suggest using a sketch that creates a visual effect along with Serial writing, such as this: //
//Sample code to control the RGB 5050 LED on the Ai-Thinker ESP32-C3-01M-Kit
//
// On the ESP32-C3, the RED Led of the RGB5050 is GPIO 3
#define PIN 3
#define DELAYVAL 500 // Time (in milliseconds) to pause between blinking
void setup() {
Serial.begin(115200); // activates UART Serial port on CH340 (USB)
Serial.printf("\nRGB LED and UART Testing...\nBlinking delay is %d milliseconds.\n", DELAYVAL);
Serial.printf("LED IO #%d\n", PIN);
pinMode(PIN, OUTPUT);
}
void loop() {
//Set the LED on and writes to Serial Monitor
digitalWrite(PIN, HIGH);
Serial.println("LED on."):
delay(DELAYVAL);
//Set the LED off and writes to Serial Monitor
digitalWrite(PIN, LOW);
Serial.println("LED off."):
delay(DELAYVAL);
}If LED continues to blink, even when Serial Monitor freezes, it means that the ESP32-C3 didn't hang up. |
|
I am experiencing similar issue as well. When I enable "tools --> Serial Monitor" in Arduino IDE 2.0.0-rc3, the ESP32 Dev Module board freezes. It behaves like the Reset button is press and hold. When I close the Serial Monitor, the ESP32 board reboot and run normally. |
|
@tonychengtl - is you issue related to the ESP32-C3 or ESP32 board? |
|
@SuGlider the board I am using is a 30-pin ESP32 Dev PCBA with ESP32-WROOM-32 module and CP2102 USB-to-UART bridge. |
|
@SuGlider Just tested with a new board. It works fine. So mine was the hardware issue. I will investigate further. Guess 8050 transistor was damaged. Thanks a lot and sorry for any inconvenience caused. @janczeresnia you could try a new board as well. |
|
@VojtechBartoska - I think it is not software related and we can close it soon. |
|
I'm closing as HW issue. @janczeresnia If it's needed please reopen the issue. Thank you all for contribution. |
I also used the ESP-C3-01M-Kit today with the same problem, but it seems to be a problem how the terminal is accessing the USB-serial port of this board. When accessing the USB-serial port via putty/kitty or Tera Term for Windows (also when set to none for flow control) the board seem to be in reset state until the connection is closed. When using HTerm for Windows (https://www.der-hammer.info/pages/terminal.html) I did get the Arduino IDE serial Monitor running , when you change (before starting the Arduino IDE) to With a TTL-serial USB-converter on RX/TX/GND (not CDC) the output works without these freeze ;) [EDIT] there seem to be a "issue" with the CHIP_ENABLE, but when connecting via Terminal to the board - |
|
Unfortunately the same problem: Other Kits works well: ESP32-WROOM-32U is OK, ESP32-S3-DevKitC-1 N16R8 is OK . Unfortunately, setting ... ... in boards.txt ... did not help ... Probably hardware issue on ESP-C3-01M-Kit, as when switchng Serial Monitor ON, some readable data (about 2-3 lines goes thru, start and end words are cutted off in middle of word) sent from board came thru, before all stops. If swithed serial monitor off, board works well from reset status. When activating Serial monitor, level at pin "EN" (enable) drops to LOW. Solution probably need somehow keep pin EN in high state, but resistor 1k5 to +3,3V was not successfull, probably CH340 keeps low level hard and I want not to damage it by connecting direct to +3,3V . |
|
My ESP-C3-01M-Kit doesnt get damaged/keeps working while using directly the 3.3v to set EN high. The text before it turn off is the Boot-ROM Message (which I also have on a ESP32 Lite V1.0.0 Rev1) |
|
@Mira141 Rerouting is done in a Arduino-Sketch via (activate the needed lines): And you have to use the same CD Boot setting for flashing the ESP-C3-01M-Kit: |
|
Same issue in VS Code, it was DTR/RTS set in Serial monitor |
|
I also own this development board and I confirm that the same result occurs when I open the serial monitor in arduino ide. only in arduino ide. if I use another application, the board works without problems. modified in boards.txt the parameters related to DTR and RTS and in vain. I want to believe that the board was not supposed to behave like this. I think it's a hardware bug. |



Board
ESP32C3 Dev Module
Device Description
NodeMCU ESP-C3-01M-Kit
Hardware Configuration
New board straight from the store connected only to USB
Version
latest master
IDE Name
Arduino IDE 1.8.19
Operating System
Linux Gentoo
Flash frequency
80MHz
PSRAM enabled
no
Upload speed
921600
Description
Serial Monitor in Arduino freezes and locks the microcontroller. Every other program like minicom and cutecom works fine. Every time after connecting via UART to ESP32C0 the microcontroller is restarting. But it works. Only the serial monitor in Arduino completely blocks the MCU, it only happens with the ESP32C0 microcontroller, all others like XIAO Pico or ESP8266 work properly with the serial Arduino monitor.
Sketch
This happens with every sketch. The sketch doesn't matter here.Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: