ESP32-C3 supermini serial port problem
Posted: Mon Apr 15, 2024 5:55 pm
I'm an amateur Arduino user who wants to upgrade to something with more RAM. The ESP32-C3 supermini looked good because its small size fits on a breadboard. However, like many people, I have found it very tricky to use. I now have a puzzling situation with a very simple sketch - the basic blink in fact. Here's my code, it won't surprise you.
I can use either the internal LED on GPIO8 or an external one on GPIO21. Using the Arduino IDE 2 I can compile and upload this sketch repeatedly and it blinks the LED. Now if I *uncomment* the Serial.begin(9600); line I can upload once more, and it does blink (and indeed send messages to the serial monitor if I include any prints), but any subsequent attempt to upload fails with the following messages:
It seems that calling Serial.begin() somehow disconnects the flash(?). I do have USB CDC on boot enabled, and I have played around with the parameters that the IDE offers without success. The only way out of this error is to put the board into upload mode by grounding GPIO9 and resetting. So in fact the board is just-about usable, as sketches can be uploaded and run, but its not user-friendly to have to keep forcing upload mode. Any suggestions as to how to improve things would be very welcome.
Andrew
Apologies if I have not included some information that I should have, this is my first post here.
- int LED_B = 8;
- //int LED_B = 21;
- void setup() {
- pinMode (LED_B, OUTPUT);
- //Serial.begin(9600);
- }
- void loop() {
- digitalWrite(LED_B, HIGH);
- delay(1000);
- digitalWrite(LED_B, LOW);
- delay(1000);
- }
- esptool.py v4.5.1
- Serial port COM9
- Connecting...
- Chip is ESP32-C3 (revision v0.4)
- Features: WiFi, BLE
- Crystal is 40MHz
- MAC: 80:65:99:6c:bb:d4
- Uploading stub...
- Running stub...
- Stub running...
- A fatal error occurred: Unable to verify flash chip connection (No serial data received.).
- Failed uploading: uploading error: exit status 2
Andrew
Apologies if I have not included some information that I should have, this is my first post here.