Page 1 of 1

ESP32 C3 mini not programming

Posted: Sun Mar 09, 2025 5:21 pm
by Barczi
I have a custom esp32 c3 mini board and I was programming it and using it. Suddenly it stopped programming. It always shows on the same COM port, when I try to upload program it gets stuck on "Connecting...", then it shows:
"A fatal error occurred: No serial data received."
Nothing changed between failed and successful upload.

Re: ESP32 C3 mini not programming

Posted: Mon Mar 10, 2025 2:04 am
by Sprite
Hard to say, you're not giving many details. Can you post at least the schematics of your board? What was the last firmware you programmed into it supposed to do? What OS and Arduino version are you using? Are you forcing the C3 into bootloader mode in some way?

Re: ESP32 C3 mini not programming

Posted: Mon Mar 10, 2025 7:31 pm
by Barczi
Before use I forced the board to go into the bootloader and then solder it on the board forgot to add IO8 pin on the board, so forcing it again means desoldering module (which I can do, if necessary). There is no RC delay circuit on enable (never needed it).

This is code after which it all broke:

Code: Select all

#include <BleKeyboard.h>
BleKeyboard bleKeyboard("Media-control", "Barczi", 100);

#define backlight 0
#define battlvl 2
#define chargerswitch 3

#define back 10
#define voldown 1
#define pause 6
#define volup 5
#define next 4


void setup() {

  Serial.begin(115200);
  bleKeyboard.begin();

  pinMode(backlight, OUTPUT);

  pinMode(back, INPUT);
  pinMode(voldown, INPUT);
  pinMode(pause, INPUT);
  pinMode(volup, INPUT);
  pinMode(next, INPUT);
  
}


void loop() {

  if(digitalRead(back)==LOW){
    Serial.println("back");
    blink(500);
  }
  if(digitalRead(voldown)==LOW){
    Serial.println("voldown");
    blink(500);
  }
  if(digitalRead(pause)==LOW){
    Serial.println("pause");
    blink(500);
  }
  if(digitalRead(volup)==LOW){
    Serial.println("volup");
    blink(500);
  }
  if(digitalRead(next)==LOW){
    Serial.println("next");
    blink(500);
  }
}

void blink(int intervol){
  digitalWrite(backlight, HIGH);
  delay(intervol);
  digitalWrite(backlight, LOW);
}
And this is a image of important part of schematic.
Image

Re: ESP32 C3 mini not programming

Posted: Mon Mar 10, 2025 9:34 pm
by lbernstone
If you don't follow the hardware design guidelines, then your behavior may not be reliable. In addition to the RC timing circuit, you should have gpio8 pulled up, and 5.1k resistors pulled down on usb cc1 & cc2.