-
Notifications
You must be signed in to change notification settings - Fork 7.6k
[Application Failure - Bad Code] esp32c3 always rebooting #10085
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
Comments
custom code speedypal.zip |
@frrhhhann - what are those pins: // constants for arduino pins
const int8_t ButtonPinL = D1; // the number of the left button pin
const int8_t ButtonPinR = D2; // the number of the right button pin
const int8_t chipSelect = D3; // D3 for Seeed ESP32S3, 21 for Seeed Sense // the number of Chip Select pin for the SD card
const int8_t TXpin = D6; // the number of the TX pin
const int8_t RXpin = D7; // the number of the RX pin Those are not listed in https://github.com/espressif/arduino-esp32/blob/master/variants/esp32c3/pins_arduino.h |
Found within |
i change the pin but still have rebooting problem |
My suggestion is to run this sketch using void setup()
{
pinMode(ButtonPinR, INPUT_PULLUP);
pinMode(ButtonPinL, INPUT_PULLUP);
Wire.begin();
Serial.begin(115200); // usb connection on Arduino Nano
Serial.setDebugOutput(true); // <=== this line will force all Debug Output to go to USB CDC port |
i add this to the code but still no luck Serial.setDebugOutput(true); // <=== this line will force all Debug Output to go to USB CDC port |
Did you set the core debug level to Verbose in the board menu? |
@frrhhhann - this is a memory fault error. Bad pointer. I have found it... in Fix it by |
No Arduino Core issue. This is user code failure. |
where do i need to replace the code? // '01', 64x64px
const unsigned char Speeduino_Logo_Anim_01 [] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
In void splashStart(){
int16_t centerX = (SCREEN_WIDTH - 64) / 2;
int16_t centerY = (SCREEN_HEIGHT - 64) / 2;
int16_t width = 64;
int16_t height = 64;
int16_t x1, y1;
uint16_t w, h;
int logoX; // offset for logo display based on screen orientation
String noECU = "LOADING";
int frame = 0;
if (SCREEN_ROTATION == 0 || SCREEN_ROTATION == 2) logoX = 32;
if (SCREEN_ROTATION == 1 || SCREEN_ROTATION == 3) logoX = 0;
Serial.println("displaying logo");
// Display initial boot animation
for ( int i = 0; i < Speeduino_Logo_Anim_LEN ; i ++) {
selectedOLED->clearDisplay();
selectedOLED->drawBitmap(logoX, 0, Speeduino_Logo_Anim_Array[i], 64, 64, SH110X_WHITE);
endPage();
delay(50);
}
// Cycle boot animation until ECU is detected
while (!ecuConnected) {
selectedOLED->clearDisplay();
selectedOLED->drawBitmap(logoX, 0, Speeduino_Logo_Anim_Array[frame], 64, 64, SH110X_WHITE);
frame ++;
if (frame >= Speeduino_Logo_Anim_LEN) frame = 0; // <<<<<<<<<============================ HERE
selectedOLED->getTextBounds(noECU,0,0,&x1, &y1, &w, &h);
if (SCREEN_ROTATION == 0 || SCREEN_ROTATION == 2) selectedOLED->setCursor(SCREEN_WIDTH-w-4, SCREEN_HEIGHT-h-4);
if (SCREEN_ROTATION == 1 || SCREEN_ROTATION == 3) selectedOLED->setCursor((SCREEN_WIDTH-w)/2, SCREEN_HEIGHT-h-4);
selectedOLED->setTextSize(1);
selectedOLED->setTextColor(SH110X_WHITE);
selectedOLED->print("LOADING");
endPage();
delay(50);
// is the Speeduino connected? Also, read the ECU's information into a buffer called "buffer"
if (ecuWait < 5) ecuWait = 5; // don't wait less than 5ms for Speeduino to respond
ecuConnected = requestData(ecuWait);
}
}
|
when esp32 is not connected via rx tx pin d6 and d7 is works perfectly without rebooting, but when i connect to ecu via rx tx it keep rebooting |
We don't have the hardware that you are using. So far it has been an application issue, not an Arduino Core code problem. Please debug it and find out if there is any Arduino Core failure. Good luck! |
Board
esp32c3
Device Description
i recently made digital dash for display car ecu data using xiao seed esp32c3, but the esp32 keep rebooting, the code i'm using is from this github https://github.com/73Volvo/Speedypal/tree/main but the original code is for xiao seed esp32s3 with 0.96 oled ssd1306, i custom the code for using xiao esp32c3 only delete led indicator because xiao esp32c3 don't have built in led, and change ssd1306 library to sh1106g. it works fine it can upload the code and display startup logo but it keep rebooting
Hardware Configuration
xiaoo esp32c3, D4 D5 for i2c connect to sh1106g 1.3 inch oled, D7 D6 for RX TX comunication to ecu
Version
latest master (checkout manually)
IDE Name
arduino ide
Operating System
windows 10
Flash frequency
160Mhz
PSRAM enabled
yes
Upload speed
115200
Description
i finished project but my xiao esp32c3 keep rebooting in serial monitor
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: