Esp32 keep rebooting problem

a24356789
Posts: 4
Joined: Sun Dec 06, 2020 4:31 pm

Esp32 keep rebooting problem

Postby a24356789 » Mon Dec 07, 2020 4:46 am

Hi?
When i upload the bluetooth program to it,I don't know why my esp 32 keep rebooting.
Flash Frequency: 40MHz
Flash mod: Dio
Flash size: 4MB
PSRAM: Disabled





Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:928
ho 0 tail 12 room 4
load:0x40078000,len:10080
load:0x40080400,len:5828
entry 0x400806a8
Guru Meditation Error: Core 0 panic'ed (LoadStoreError). Exception was unhandled.
Core 0 register dump:
PC : 0x40114b9d PS : 0x00060b30 A0 : 0x800defb8 A1 : 0x3ffcff20
A2 : 0x400df00c A3 : 0x3ffbdc68 A4 : 0x3f407018 A5 : 0x00001400
A6 : 0x00001800 A7 : 0x00000003 A8 : 0x80114b9d A9 : 0x3ffcfed0
A10 : 0x3ffdf474 A11 : 0x00000000 A12 : 0x00000000 A13 : 0x00001800
A14 : 0x00000000 A15 : 0x3ffcde80 SAR : 0x00000010 EXCCAUSE: 0x00000003
EXCVADDR: 0x3f40701c LBEG : 0x4000c46c LEND : 0x4000c477 LCOUNT : 0x00000000

ELF file SHA256: 0000000000000000

Backtrace: 0x40114b9d:0x3ffcff20 0x400defb5:0x3ffcff40 0x400df606:0x3ffcff90 0x400d597d:0x3ffcffb0 0x4008f53a:0x3ffcffe0

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:928
ho 0 tail 12 room 4
load:0x40078000,len:10080
load:0x40080400,len:5828
entry 0x400806a8
Guru Meditation Error: Core 0 panic'ed (LoadStoreError). Exception was unhandled.
Core 0 register dump:
PC : 0x40114b9d PS : 0x00060b30 A0 : 0x800defb8 A1 : 0x3ffcff20
A2 : 0x400df00c A3 : 0x3ffbdc68 A4 : 0x3f407018 A5 : 0x00001400
A6 : 0x00001800 A7 : 0x00000003 A8 : 0x80114b9d A9 : 0x3ffcfed0
A10 : 0x3ffdf474 A11 : 0x00000000 A12 : 0x00000000 A13 : 0x00001800
A14 : 0x00000000 A15 : 0x3ffcde80 SAR : 0x00000000 EXCCAUSE: 0x00000003
EXCVADDR: 0x3f40701c LBEG : 0x4000c46c LEND : 0x4000c477 LCOUNT : 0x00000000

ELF file SHA256: 0000000000000000

Backtrace: 0x40114b9d:0x3ffcff20 0x400defb5:0x3ffcff40 0x400df606:0x3ffcff90 0x400d597d:0x3ffcffb0 0x4008f53a:0x3ffcffe0





This is the code:
#include "BluetoothSerial.h"

#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif

BluetoothSerial SerialBT;


void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
SerialBT.begin("ESP32P01");
pinMode(25, OUTPUT);

digitalWrite(25, HIGH); // LED Red
delay(500);
digitalWrite(25, LOW); // LED Red
delay(500);
digitalWrite(25, HIGH); // LED Red
delay(500);
digitalWrite(25, LOW); // LED Red
delay(500);

}

void loop() {
// put your main code here, to run repeatedly:
if (SerialBT.available()) {
char rxdata = SerialBT.read();
Serial.write(rxdata);
if (rxdata == '1') digitalWrite(25, !digitalRead(25));
}
}

what problem?

markxr
Posts: 15
Joined: Sun Aug 16, 2020 7:32 pm

Re: Esp32 keep rebooting problem

Postby markxr » Tue Dec 08, 2020 11:45 am

It's crashed because of an illegal memory access, your firmware image is doing something wrong. Either your C code uses pointers incorrectly (the most common reason) or something is really corrupted.

Without access to your source or more information, nobody can help. If you have the ability to run a debugger, you could use that. Alternatively, put some instrumentation in to see how far it's getting into your program, I guess not very far because the esp-idf libraries are very noisy and print lots of debug info by default.

Did you compile and run a "Hello, world" program ok? Did you compile and run a "blink led" program?

Who is online

Users browsing this forum: No registered users and 163 guests