ESP32 reboots constantly (even with empty sketch)

Hello.

I was finishing a project and started 3d printing already, saved the working sketch as a new version since everything works. In few hours without any changes (or even new firmware) everything stopped working and I got that message on the loop (not sure where it starts since it is on the loop and ESP doesn't reboot on opening the monitor), even date doesn't change

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:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:10944
load:0x40080400,len:6388
entry 0x400806b4
E (25) psram: PSRAM ID read error: 0xffffffff
assertion "state == EntryState::WRITTEN || state == EntryState::EMPTY" failed: file "/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/nvs_flash/src/nvs_page.cpp", line 339, function: esp_err_t nvs::Page::eraseEntryAndSpan(size_t)
abort() was called at PC 0x400d578f on core 0

ELF file SHA256: 0000000000000000

Backtrace: 0x4008c1a4:0x3ffbb890 0x4008c41d:0x3ffbb8b0 0x400d578f:0x3ffbb8d0 0x400e2206:0x3ffbb900 0x400e2af1:0x3ffbb950 0x400e2ea2:0x3ffbb9d0 0x400e3483:0x3ffbba20 0x400e0de5:0x3ffbba90 0x400e0685:0x3ffbbaf0 0x400e0737:0x3ffbbb10 0x400e0782:0x3ffbbb30 0x400d1d2d:0x3ffbbb50 0x400d224d:0x3ffbbb70 0x400e46fa:0x3ffbbba0 0x4008d412:0x3ffbbbc0

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

I reuploaded the working version of the sketch - nothing changed. I flashed blink - same problem. I uploaded an empty sketch - same error.

After ~hour of googling it seems that people were able to solve that issue in software, but I think I have a reasonable case to claim I isolated that to hardware (or at least post-bootloader).

One thing I think I have to mention (but I'm not sure I'm not imagining that) - it was running a very simple sketch with ESPNOW library. But it didn't have any pauses, was constantly machinegunning sensor values to a client (need low latency) and I did notice it was running a little hotter than usual, but nowhere near as hot as voltage regulators on some cheap mega2560 boards. Not especially comfortable to touch but not especially uncomfortable either.

How do I solve that?

It appears to be a power supply problem, can you try a different one? Also double check all the pins to be sure they are at int state in the correct state to allow boot.

Do you have any spare dev board to test out? Please post complete log of blink sketch. What SPIRAM size is your dev board integrated with? 8MB? Have you heard of a 2T mode? I rarely use esp32 under arduino ide. But hopefully it uses 2T mode.

Here is the printout if 2T mode is enabled with an 8MB SPIRAM:

I (743) psram: PSRAM is in 2T mode
I (743) spiram: Found 32MBit SPI RAM device

I have an 8MB SPIRAM. WIth 2T mode, it shows as 4MB or 32MBit, so half is gone in order to make sure the ram does NOT fail.

If you don't have this message, you may be dealing with SPIRAM failure which occurs sometimes.

Are their any other connections to the ESP32 with an empty sketch loaded, besides power and ground?

Idahowalker:
Are their any other connections to the ESP32 with an empty sketch loaded, besides power and ground?

Good call! Why these dev boards bring out the SPI pins for FLASH and SPIRAM is beyond me. I never do that on my own boards.

GPIO_NUM_9,10,11 and GPIO_NUM_6, 7, 8 should never be sued on the development board.

GPIO_NUM_13, 12, 14, 15 require a bit of consideration when connecting devices to those pins.

Idahowalker:
Are their any other connections to the ESP32 with an empty sketch loaded, besides power and ground?

gilshultz:
It appears to be a power supply problem, can you try a different one? Also double check all the pins to be sure they are at int state in the correct state to allow boot.

Just a USB cord, nothing else, no peripherals

liuzengqiang:
Do you have any spare dev board to test out? Please post complete log of blink sketch.

It's up there. Another board is not a dev kit but WEMOS OLED one, and it functions fine.
The firmware was "finalized" and that fail only happened after some time running the working firmware, so I don't think this is anything to do with IDE (I might be wrong)
Unfortunately, I didn't get rest of the reply, sorry(

I'd say the board is dead.

Idahowalker:
I'd say the board is dead.

But why tho? Just dumb luck? Did I do something wrong? What are the usual circumstances of that behavior so I can avoid it?)

I was not there when it was killed. As I am not a witness to the killing, I do not know how or why.

You could try Arduino ide > tools > ESP32 Dev Module > PSRAM : disabled.

Possible reasons board failure: static electricity, short circuiting (you may not notice when it happens). Get at least 2 dev boards if you are serious of developing a project.