I have esp32 ai thinker cam. There is a code, which runs a qr scanner on camera and outputs the decoded qr value.. I modified it and it was writting into eeprom. Then I created a function to clear the whole (EEPROM.length()) memory and after it if I reset the chip I see this:
assert failed: insert_free_block heap_tlsf.c:233 (current && "free list cannot have a null entry")
The meaning:
- The chip ups
- Is there a wifi auth string in eeprom?
- if yes - connect to wifi
- if not - scan qr
- if decoded qr - write into eeprom and next time provide this auth string instead of scanning again
- if clicked on button(digital write) - clear the eeprom memory and scan qr again(lets say user went to restourant and wants to scan its qr)
The code is really big, let me know which part would you need to be able to help me
What I've tried:
- Burn bootloader
- Erase everything with ESP Tool
- erase and burn
- burn and erase
- Played with partitioning
I knew, that EEPROM is only for me, like the soft will use a dynamic data and eeprom is just a storage for me, but when I wrote 0 to all addresses, my qr scanner stopped to work and the chip reboots endless
This is the whole error
01:10:27.693 -> ets Jul 29 2019 12:21:46
01:10:27.693 ->
01:10:27.693 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
01:10:27.726 -> configsip: 0, SPIWP:0xee
01:10:27.726 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
01:10:27.726 -> mode:DIO, clock div:2
01:10:27.726 -> load:0x3fff0030,len:1184
01:10:27.726 -> load:0x40078000,len:13232
01:10:27.726 -> load:0x40080400,len:3028
01:10:27.726 -> entry 0x400805e4
01:10:27.918 -> [ 18][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
01:10:28.368 -> [ 461][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
01:10:28.368 ->
01:10:28.368 -> auth not found
01:10:28.496 ->
01:10:28.496 -> assert failed: insert_free_block heap_tlsf.c:233 (current && "free list cannot have a null entry")
01:10:28.496 ->
01:10:28.496 ->
01:10:28.496 -> Backtrace: 0x40083755:0x3ffc82d0 0x4008a035:0x3ffc82f0 0x4008f7bd:0x3ffc8310 0x4008e928:0x3ffc8440 0x4008f1d1:0x3ffc8470 0x4008f37c:0x3ffc8490 0x40083dba:0x3ffc84b0 0x400e1d89:0x3ffc84d0 0x400e1861:0x3ffc8510 0x400d2282:0x3ffc8560 0x400d2332:0x3ffc8580 0x400d405e:0x3ffc85d0
01:10:28.528 ->
01:10:28.528 ->
01:10:28.528 ->
01:10:28.528 ->
01:10:28.528 -> ELF file SHA256: 9ce610d535ced5b8
01:10:28.528 ->
01:10:28.560 -> Rebooting...
(if auth not found, it'll try to scan QR via camera, and the error is when trying to scan)
UPDATE
During debugging I found that:
- there is a call of built-in func esp_camera_init
- Serial output before is showing
- After it I have this error
So the error in this function