Closed nathalizator closed 3 years ago
please decode the backtrace with ESPExceptionDecoder so that we can see where the issue happens.
please decode the backtrace with ESPExceptionDecoder so that we can see where the issue happens.
you can see it in my original message above but here it is again:
PC: 0x401584a3: esp_intr_get_cpu at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/intr_alloc.c line 780
EXCVADDR: 0x00000000
Decoding stack results
0x401584a3: esp_intr_get_cpu at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/intr_alloc.c line 780
0x401362bc: gpio_isr_handler_add at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/driver/gpio.c line 389
0x40138020: camera_init at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/components/esp32-camera/driver/camera.c line 1205
0x4013819f: esp_camera_init at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/components/esp32-camera/driver/camera.c line 1268
0x400d2482: setup() at /Users/admin/Downloads/Code_Security_Camera_ESP32CAM_Blynk_02/Code_Security_Camera_ESP32CAM_Blynk_02.ino line 116
0x400d585b: loopTask(void*) at /Users/admin/Library/Arduino15/packages/esp32/hardware/esp32/1.0.4/cores/esp32/main.cpp line 14
0x4008bc19: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143
If RCSwitch
is using GPIO Interrupts, then it's having a conflict with the camera driver. There is currently no workaround for this situation, but one is planned for near future.
Hello ! it means that we can't have 2 interrupt on the esp cam ? Also, can you be more specific on "near future", does it means 1 week, 1 month, 1 year ? Just to see if i should look for another solution or wait for the fix. Thanks! @me-no-dev
@me-no-dev Hello again, any update on this ?
@me-no-dev Hello, any news ?
I've encountered this well over 100 times. It always comes down to the same thing. The ESP32-CAM is a duel core module. There is Core 0 and Core 1. When the module appears to constantly reboot after about 1 second it, in my case, has always been due to the following either in my code, or a library that I am using that has been written with single core in mind.
I consider it an issue with the Arduino IDE compiler. Here is a tiny code fragment showing the issue....
Explaination of code: I have some data stored in the EEPROM, and at is shown in a webpage.
If 'char * wchtml=' is used, then memcpy will fail in setup with this Core 1 panic issue. If 'char wchtml[366]=' is used, then memcpy will be fine in setup.
` // With the following the EEPROM.get is done in Core 0. The memcpy in the setup function is on Core 1. // wchtml is not initialised prior to the memcpy ergo CRASH.
struct uEepromData { uint8_t Ver; uint8_t Mode; char MID[5]; char OtherData[500]; };
char host[14] = "ABCDABC_xxxxx"; uEepromData EPData;
// the following line is the difference. This causes an issue for Core 1 when altering in setup char * wchtml="<!DOCTYPE html>
...";void setup(){
EEPROM.begin(sizeof(uEepromData));
EEPROM.get(0, EPData);
memcpy(&wchtml[59],EPData.MID,5); // The line crash happens
memcpy(&host[8],EPData.MID,5);
host[13]=0;
}
void loop(){
}
// With the following Core 0 does the EEPROM.get. Core 1 does the initialisation of wchtml and the memcpy.
struct uEepromData { uint8_t Ver; uint8_t Mode; char MID[5]; char OtherData[500]; };
char host[14] = "ABCDABC_xxxxx"; uEepromData EPData;
// the following line is the difference. This works char wchtml[366]="<!DOCTYPE html>
...365 characters in total";void setup(){ EEPROM.begin(sizeof(uEepromData)); EEPROM.get(0, EPData);
memcpy(&wchtml[59],EPData.MID,5);
memcpy(&host[8],EPData.MID,5);
host[13]=0;
}
void loop(){
}`
char * wchtml="<script>var ABSerial='xxxxx';var FwVer='yyy';</script>...";
must be const
! This is a pointer to where const char wchtml_data[] = "<script>var ABSerial='xxxxx';var FwVer='yyy';</script>...365 characters in total";
is located.
that is why declaring it as array works. There is nothing wrong with the compiler.
I'm succesfully using rcswich with a RF receiver and ESP32-cam but when i just try to merge the receiver demo with an esp cam server code it cause a endless reboot of my esp with an error message. The esp cam server code is working well before merging and it starts rebooting with a error message as soon as i add this part :
I've seen someone with a similar problem but not sure how to implement the solution with my code. Any help would be appreciated if you think this case is related : https://github.com/espressif/esp-who/issues/90#issuecomment-518010560
The error message
Interpretation of the error with Exception Decoder :
Here is the complete code: