-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
esp32c3 chip revision: 3 wifi.begin crash #6027
Comments
Hello @3050311118 running your code on my M5StampC3 works fine - no crash.
Thanks |
@3050311118 i checked your example on my board ESP32-C3-12F, at 80 MHz, SPI mode: QIO and do get cyclic reboot, only works in DIO mode, message output is incorrect
|
good catch. I missed that one. Any idea why the message output is incorrect? Thanks |
https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/startup.html There are 2 stage boot loaders. The messages are from ROM and from each stage bootloader. ROM and First Stage Bootloader Messages:
Second Stage Bootloader Messages:
|
I have also a ESP32-C3-WROOM-02 rev 3 and the same problem - I have used the newest version 2.0.2 but had no look. |
Issue confirmed. |
@3050311118 @hggh @sh-user @felmue @me-no-dev Issue analysis indicates that the problem has nothing to do with WiFi! The problem is related to using GPIO13 as LED in the Sketch. To solve it, just change the LED pin in the sketch. #include <WiFi.h>
#include <WiFiClient.h>
#include <WebServer.h>
#include <ESPmDNS.h>
const char* ssid = "xxxxx";
const char* password = "yyyyyy";
WebServer server(80);
const int led = 2; // NEVER USE GPIO13 with ESP32 C3.
void handleRoot() {
digitalWrite(led, 1);
server.send(200, "text/plain", "hello from esp32!");
digitalWrite(led, 0);
}
void handleNotFound() {
digitalWrite(led, 1);
String message = "File Not Found\n\n";
message += "URI: ";
message += server.uri();
message += "\nMethod: ";
message += (server.method() == HTTP_GET) ? "GET" : "POST";
message += "\nArguments: ";
message += server.args();
message += "\n";
for (uint8_t i = 0; i < server.args(); i++) {
message += " " + server.argName(i) + ": " + server.arg(i) + "\n";
}
server.send(404, "text/plain", message);
digitalWrite(led, 0);
}
void setup(void) {
pinMode(led, OUTPUT);
digitalWrite(led, 0);
Serial.begin(115200);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
Serial.println("");
// Wait for connection
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
if (MDNS.begin("esp32")) {
Serial.println("MDNS responder started");
}
server.on("/", handleRoot);
server.on("/inline", []() {
server.send(200, "text/plain", "this works as well");
});
server.onNotFound(handleNotFound);
server.begin();
Serial.println("HTTP server started");
}
void loop(void) {
server.handleClient();
delay(2);//allow the cpu to switch to other tasks
} |
Board
ESP32C3
Device Description
ESP32C3 chip revision: 3
Hardware Configuration
NO
Version
latest master
IDE Name
ARDUINO IDE
Operating System
WINDOWS
Flash frequency
80M
PSRAM enabled
no
Upload speed
115200
Description
WIFI.begin crash . when connectting to wifi router
bluetooth OK
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: