Flashing and erasing both successful but ESP32 won't load code

zliudr
Posts: 360
Joined: Thu Oct 03, 2019 5:15 am

Flashing and erasing both successful but ESP32 won't load code

Postby zliudr » Sat Nov 25, 2023 5:04 pm

I am pretty experienced with ESP-IDF at least between 2019 and 2022 and then moved on to micropython development on ESP32. I know what I'm doing but not with this symptom:

It's a board I designed and personally populated and tested previously to success. After sending it to a user and getting it back with issues, here is what it is doing:
I can flash code or erase my ESP32.
After erasing, I get the typical invalid header FFFF repeated printouts so I know the code erases successfully.
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
But after a successful flashing of a micropython image (4MB of flash), the process is stuck on this message for a few seconds, then reboots and repeats this message, stuck for a few seconds, then reboot and repeat:
ets Jul 29 2019 12:21:46

rst:0x10 (RTCWDT_RTC_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:2
load:0x3fff0030,len:4344
load:0x40078000,len:13816
load:0x40080400,len:3340
entry 0x40080618
I wonder what may have caused it. It's not like the flash doesn't work or something but it just won't load the code. This same firmware image works on all other devices (lots of them) so it's not the firmware.

For some reason, I see that IO32 turns to LOW during this "stuck for a few seconds" time and turn off once it reboots. I've made maybe a thousand ESP32 devices but this is a first. I wonder if this indicates that the flash has some issues or maybe some of strapping pins were having issues? The board was tested previously after SMD reflow was done without any issues.

I also used the "install micropython firmware" feature under thonny with success but again upon reboot there is issues. From the garbled printouts I saw external ram failure with lots of guru meditation errors:
E (1504) cpu_start: External RAM failed memory test!
ets Jul 29 2019 12:21:46
So ESP32 is bad? I'm a bit disappointed. In the past (prior to 2022) I've had this happen with earlier revision ESP32 more often. Now it's a lot less common. But on a single reel of 650 ESP32, I've now got 1 EXT ram failure and 2 with no WiFi connectivity. Where is quality control?

Who is online

Users browsing this forum: Majestic-12 [Bot] and 81 guests