ESP32-CAM error (compile/run)

Hey,

Yesterday the ESP32-Eye support was released. This is great and I would like to test it, but unfortunately only have the ESP32-Cam available. So i tried to follow the github page in order to compile my own firmware.

Steps:

  1. clone the github repository to a new folder in ‘examples’ of the ESP-IDF
  2. exported my trained model from Edge Impulse as C++
  3. Replaced the ‘tensorflow lite’ & ‘model parameter’ files with the ones of my trained model
  4. Changed #define CAMERA_MODEL_ESP_EYE to #define CAMERA_MODEL_AI_THINKER
  5. Compiled (turned into a 771kb bin file (ram usage is supposed to be 400kb according to the edge impulse UI).
  6. Compilation result: ESP32-CAM-EDGEIMPULSE/compilelog.log at main · s1819681/ESP32-CAM-EDGEIMPULSE · GitHub (there are some cautionary errors?)
  7. Flashed to the ESP32-CAM:
    17:36:02.214 → rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    17:36:02.266 → configsip: 0, SPIWP:0xee
    17:36:02.266 → clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
    17:36:02.266 → mode:DIO, clock div:1
    17:36:02.266 → load:0x3fff0030,len:6604
    17:36:02.266 → ho 0 tail 12 room 4
    17:36:02.266 → load:0x40078000,len:14808
    17:36:02.266 → ho 0 tail 12 room 4
    17:36:02.266 → load:0x40080400,len:3792
    17:36:02.266 → entry 0x40080694
    17:36:02.266 → e[0;32mI (30) boot: ESP-IDF v4.4 2nd stage bootloadere[0m
    17:36:02.266 → e[0;32mI (30) boot: compile time 17:27:47e[0m
    17:36:02.266 → e[0;32mI (30) boot: chip revision: 1e[0m
    17:36:02.266 → e[0;32mI (33) boot_comm: chip revision: 1, min. bootloader chip revision: 0e[0m
    17:36:02.266 → e[0;32mI (40) boot.esp32: SPI Speed : 80MHze[0m
    17:36:02.266 → e[0;32mI (45) boot.esp32: SPI Mode : DIOe[0m
    17:36:02.296 → e[0;32mI (49) boot.esp32: SPI Flash Size : 4MBe[0m
    17:36:02.296 → e[0;32mI (54) boot: Enabling RNG early entropy source…e[0m
    17:36:02.296 → e[0;32mI (59) boot: Partition Table:e[0m
    17:36:02.296 → e[0;32mI (63) boot: ## Label Usage Type ST Offset Lengthe[0m
    17:36:02.296 → e[0;32mI (70) boot: 0 nvs WiFi data 01 02 00009000 00006000e[0m
    17:36:02.326 → e[0;32mI (77) boot: 1 phy_init RF data 01 01 0000f000 00001000e[0m
    17:36:02.326 → e[0;32mI (85) boot: 2 factory factory app 00 00 00010000 00300000e[0m
    17:36:02.326 → e[0;32mI (92) boot: 3 storage Unknown data 01 82 00310000 000f0000e[0m
    17:36:02.326 → e[0;32mI (100) boot: End of partition tablee[0m
    17:36:02.326 → e[0;32mI (104) boot_comm: chip revision: 1, min. application chip revision: 0e[0m
    17:36:02.365 → e[0;32mI (111) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=2fdc8h (196040) mape[0m
    17:36:02.401 → e[0;32mI (179) esp_image: segment 1: paddr=0003fdf0 vaddr=3ffb0000 size=00228h ( 552) loade[0m
    17:36:02.401 → e[0;32mI (180) esp_image: segment 2: paddr=00040020 vaddr=400d0020 size=76054h (483412) mape[0m
    17:36:02.544 → e[0;32mI (331) esp_image: segment 3: paddr=000b607c vaddr=3ffb0228 size=04090h ( 16528) loade[0m
    17:36:02.579 → e[0;32mI (337) esp_image: segment 4: paddr=000ba114 vaddr=40080000 size=12380h ( 74624) loade[0m
    17:36:02.579 → e[0;32mI (363) esp_image: segment 5: paddr=000cc49c vaddr=50000000 size=00010h ( 16) loade[0m
    17:36:02.613 → e[0;32mI (373) boot: Loaded app from partition at offset 0x10000e[0m
    17:36:02.613 → e[0;32mI (373) boot: Disabling RNG early entropy source…e[0m
    17:36:02.613 → e[0;31mE (386) psram: PSRAM ID read error: 0xffffffffe[0m
    17:36:02.613 → e[0;31mE (386) spiram: SPI RAM enabled but initialization failed. Bailing out.e[0m
    17:36:02.648 → Hello from Edge Impulse Device SDK.
    17:36:02.648 → Compiled on Apr 28 2022 17:28:04
    17:36:02.648 → ERR: failed to connect to inertial sensor!
    17:36:02.648 → Inertial sensor initialization failed
  8. stops with the error: inertial sensor initialization failed.

Can somebody point me in the right direction? Apologies for the noob question, but i’m new to building firmware from scratch and used to simple programming in the arduino IDE.
Thanks in advance!

@NielsNr Your device failed to initialise PSRAM.
From menuconfig, enable PSRAM with change PSRAM type to Auto.

If this passes, camera init should proceed fine.

1 Like

Thank you for your reply!
I tried finding more information and exploring my setup in menuconfig, but I think it is already in auto mode if i understand correctly?


(type of spi ram in usage: auto-detect)