ESP32-S3 Face Detection (Edge Impulse FOMO) - Memory Issue/Guru Meditation Error

Hi everyone,

I’m pretty new to edge ML and having trouble with a Face Detection project using Edge Impulse’s FOMO model. Getting consistent memory-related crashes that I can’t resolve.

Project: Face detection - FOMO - Dashboard - Edge Impulse

Board: ESP32-S3 WROOM N16R8 CAM

Problem: After compiling and uploading the example code, the board continuously reboots with a Guru Meditation Error (LoadProhibited exception).

Error Output:

ELF file SHA256: fe03a05a0a477bc6

Rebooting...

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x29 (SPI_FAST_FLASH_BOOT)
Saved PC:0x42037a3e
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
entry 0x403c98d0

Edge Impulse Inferencing Demo

Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x420208b5 PS : 0x00060630 A0 : 0x820197bc A1 : 0x3fcebd70
A2 : 0x3fc9b0f8 A3 : 0x3fc92e88 A4 : 0xffff8fff A5 : 0x3c04dda0
A6 : 0x00000060 A7 : 0xff000000 A8 : 0x00000000 A9 : 0x3fcebd90
A10 : 0x3fc9b0f8 A11 : 0x00000000 A12 : 0x00000060 A13 : 0x3fc9b158
A14 : 0x00000008 A15 : 0x00000006 SAR : 0x00000019 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x400570e8 LEND : 0x400570f3 LCOUNT : 0x00000000

Backtrace: 0x420208b2:0x3fcebd70 0x420197b9:0x3fcebdc0 0x4201930a:0x3fcebdf0 0x42002b0a:0x3fcebe40 0x42002baf:0x3fcebe60 0x4200dd0a:0x3fcebe90

What I’ve tried:

  • Modifying ARENA_SIZE in the Edge Impulse library

From what I’ve read online, this is likely a memory allocation issue with the ML model being too large for available RAM.

Questions:

  1. Has anyone successfully run FOMO face detection on ESP32-S3?
  2. Are there specific memory optimization techniques for Edge Impulse models on ESP32-S3?

Any advice would be greatly appreciated!

Hi, @ansioso !
No, it is not likely to be RAM issue.
Can you please fill the template? It is there for a reason. Mainly we need to know

  • Build Environment Details: [e.g., Arduino IDE 1.8.19 ESP32 Core for Arduino 2.0.4]
    because you didn’t specify how and what are you compiling.

Also, if you use Arduino IDE, there is esp exception decoder. Would be helpful to decode your backtrace.

yes sorry is my first time posting so i missed some steps :sweat_smile:
Arduino IDE → 2.3.4
ESP32 Core → 3.3.0

after decoding the exception i get this:

1 | LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads | 28

PC -> 0x42024b8d: ll_cam_set_pin () at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/managed_components/espressif__esp32-camera/target/esp32s3/ll_cam.c:370

0x42024b8a: ll_cam_set_pin () at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/managed_components/espressif__esp32-camera/target/esp32s3/ll_cam.c:370
0x4201cc67: cam_init () at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/managed_components/espressif__esp32-camera/driver/cam_hal.c:402
0x4201c79d: esp_camera_init () at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/managed_components/espressif__esp32-camera/driver/esp_camera.c:303
0x4200300d: ei_camera_init () at /tmp/.arduinoIDE-unsaved2025712-5008-u91tqa.lf0y8/esp32_camera/esp32_camera.ino:260
0x420030bb: setup () at /tmp/.arduinoIDE-unsaved2025712-5008-u91tqa.lf0y8/esp32_camera/esp32_camera.ino:138
0x4200e57e: loopTask (void*) at /home/fusillo/.arduino15/packages/esp32/hardware/esp32/3.3.0/cores/esp32/main.cpp:59
0x4037c195: vPortTaskWrapper () at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:139

this decoder is really helpful, but with my little/no experience i still can’t find the issue
(at the end i used this decoder due to my Arduino IDE version)

Something is wrong with you camera init.
The Arduino sketch we ship is by default is for ESP-EYE, you’ll need to make some changes to the camera config to make it work with ESP32-S3 WROOM N16R8 CAM. Check the board documentation or examples for the correct pin config and then change them in our example sketch.

Oh, and we don’t test with 3.3.0 core - it may be possible this is an issue as well. As it says in the sketch
// These sketches are tested with 2.0.4 ESP32 Arduino Core