Skip to content
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

ESP32 C3 Supermini only boots when USB is connected and Serial is used. #9545

Closed
1 task done
satbeginner opened this issue Apr 20, 2024 · 5 comments · Fixed by #9565
Closed
1 task done

ESP32 C3 Supermini only boots when USB is connected and Serial is used. #9545

satbeginner opened this issue Apr 20, 2024 · 5 comments · Fixed by #9565
Assignees
Labels
Milestone

Comments

@satbeginner
Copy link

Board

ESP32 C3 Supermini

Device Description

ESP32C3 Dev Module

Hardware Configuration

No pins connected, just the build-in LED is used.

Version

latest master (checkout manually)

IDE Name

Arduino IDE

Operating System

Windows-10

Flash frequency

80MHz

PSRAM enabled

yes

Upload speed

115200

Description

Hi all, I was used that when I use a Serial.begin(115200) in Setup() and I have USB CDC on Boot enabled I can see any Serial.print messages in the Serial Monitor of the IDE.
And yes, that works.
However, like since one week or so, when I flash the code that still works, but now the ESP32C3 no longer boots when the board is NOT connected to a usb port of my PC.
Even with the IDE not started it will not boot on pressing reset or at power on.
But, as soon as I start the IDE or open the serial port (COM12 in my case) eg. by using Putty on that serial port, at that moment YES, the board boots and will start to output the Serial.print messages.

I was used that a board would run anyway, even with no serial port connected.
If I flash with USB CDC on boot Disabled, it won't run either.

I can make it run only when I remove all Serial.xxxx statements from my code before flashing??

I have the feeling this started about a week ago, because I had code running that I flashed a week ago that was running fine when using an external 5V supply. (Yes, I checked the voltages)

I changed some small stuff in the code and flashed again this week, and now it won't boot anymore, only when connected to either the IDE or Putty using the proper COM-port, or commenting out ALL Serial.xxxx statements?
When I use Putty to see the output of the Serial.xxx statements the ESP32 stops working when I disconnect Putty...

Is this because the ESP32C3 always expects a serial-port active when declared as Serial.begin(115200)??

Is there a way of keeping the Serial.xxxx statements in there but setting the serial port to ignore when not there?

I am stumped, but it does reproduce 100%.

Un saludo,

Leo

Sketch

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(8, OUTPUT);
  Serial.begin(115200);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(8, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(8, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
  Serial.println("ESP32 is running");

Debug Message

15:57:39.843 -> ESP32 is running
15:57:41.808 -> ESP32 is running
15:57:43.797 -> ESP32 is running
15:57:45.847 -> ESP32 is running
15:57:47.809 -> ESP32 is running
15:57:49.834 -> ESP32 is running
15:57:51.869 -> ESP32 is running
15:57:53.855 -> ESP32 is running
15:57:55.883 -> ESP32 is running

Other Steps to Reproduce

Flased without any Serial.xxxxx statements it will boot and run.
Also when flashed with the Serial- statements connected to PC, but with Putty active instead of the Arduino IDE, it will boot and run too.

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

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@satbeginner satbeginner added the Status: Awaiting triage Issue is waiting for triage label Apr 20, 2024
@satbeginner satbeginner changed the title EP32 C3 Supermini only boots when USB is connected? ESP32 C3 Supermini only boots when USB is connected and Serial is used. Apr 20, 2024
@SuGlider SuGlider added Type: Bug 🐛 All bugs and removed Status: Awaiting triage Issue is waiting for triage labels Apr 24, 2024
@SuGlider
Copy link
Collaborator

@satbeginner - Thanks for reporting.
It seems to be a bug within Serial.print().

Let me investigate it.

@SuGlider
Copy link
Collaborator

It was fixed in 2.0.15 but not in 3.0.0-RC1... I'll submit the necessary PR.

@SuGlider SuGlider added this to the 3.0.0-RC2 milestone Apr 24, 2024
@Gspohu
Copy link

Gspohu commented Apr 24, 2024

I confirm this bug on ESP32-S3. @SuGlider Can you provide this PR or commit that fix this issue in 2.0.15 ? Thanks !

@satbeginner
Copy link
Author

Hi all, thanks for your work.
In Arduino IDE the 3.0.0-rc1 just installed, I can confirm not yet fixed in rc1, will wait for Arduino update to rc2.

Thanks again for your work !

Leo

@satbeginner
Copy link
Author

Hi all, today my Arduino IDE upgraded the board library to 3.0.0-rc2 so I could test it on a ESp32 C3: Success!!
It gives the Serial.print output visible in the IDE Serial Monitor, and most important: the ESp32C3 boots and runs perfect, even when powered from a usb power brick.
So no need anymore to have an active USB Serial port attached to the eSp32.

Many thanks,

Leo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

3 participants