ESP32 C3 mini not programming

Barczi
Posts: 5
Joined: Sat Mar 08, 2025 10:15 am

ESP32 C3 mini not programming

Postby Barczi » Sun Mar 09, 2025 5:21 pm

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.

Sprite
Espressif staff
Espressif staff
Posts: 10609
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 C3 mini not programming

Postby Sprite » Mon Mar 10, 2025 2:04 am

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?

Barczi
Posts: 5
Joined: Sat Mar 08, 2025 10:15 am

Re: ESP32 C3 mini not programming

Postby Barczi » Mon Mar 10, 2025 7:31 pm

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
Attachments
Zrzut ekranu 2025-03-10 202751.png
Zrzut ekranu 2025-03-10 202751.png (61.77 KiB) Viewed 1126 times

lbernstone
Posts: 1132
Joined: Mon Jul 22, 2019 3:20 pm

Re: ESP32 C3 mini not programming

Postby lbernstone » Mon Mar 10, 2025 9:34 pm

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.

Who is online

Users browsing this forum: No registered users and 1 guest