When I upload my code the programm starts running and everything works fine. But when I cut off power for a short moment and put it on again(externally or PC), the code does not get executed anymore. I have to plug power off and on again many times to make it work. Pressing Restart does not change anything. Unconnecting the USB-C, pressing Boot, reconnecting the USB and letting the Boot button go afterwards does help, but there must be a way to fix this problem. It would be extremly unreliable if you have to restart the board like this every time afer power got cut off. (also it has nothing to do with the code, the same behavior showed while making a LED blink)
Maybe I have to put a capacitor somewere? Has anyone had this problem as well? I did not find much about it on the internet.
Yep I think it can be fixed all you need to do??? Oops without an annotated schematic I do not have a chance of helping you solve your problem. It is also possible it is a software problem so posting that would be a big help. It appears you have external hardware items also connected, post links to there technical information.
Thank you for your quick response. This is the schematic of the board:
Seeeduino-XIAO-ESP32C3-SCH.pdf (446,0 KB)
This is the code. But I am 99% sure it has nothing to do with it, because I've tried different codes and the same behavior kept showing. I have no external hardware connected to the board.
const int ledPin = 2;
void setup() {
// put your setup code here, to run once:
pinMode(ledPin, OUTPUT);
delay(1000);
}
void loop() {
// put your main code here, to run repeatedly:
// Die LED einschalten
digitalWrite(ledPin, HIGH);
// Eine Verzögerung von einer Sekunde einfügen
delay(1000);
// Die LED ausschalten
digitalWrite(ledPin, LOW);
// Eine weitere Verzögerung von einer Sekunde einfügen
delay(1000);
}
Try connecing a 10K resistor between D0 and 3.3V
It worked! Thank you so much! Could you explain what it did?
D0 connects to the ESP GPIO2.
GPIO2 is one of the strapping (configuration) pins used during boot-up.
If not pulled-up to 3.3V, IC operation is unpredictable and/or erratic.
The seeed studio board did not have GPIO2 pulled-up to 3.3V.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.