Board resets and doesn't run uploaded sketch

Sourav
Posts: 1
Joined: Thu Jun 10, 2021 9:00 pm

Board resets and doesn't run uploaded sketch

Postby Sourav » Thu Jun 10, 2021 9:06 pm

I have a ESP32 board purchases 3 months ago. I flashed the board successfully 2 months ago, and had a blinking onboard LED. Since then, I packed the board into the anti-static bag it came. Today I took it out to do one project on that. And when I plugged it in, the LED isn't blinking, and then I uploaded the wifi scanning sketch, and saw I am getting:

Code: Select all

rst:0x3 (SW_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:1044
load:0x40078000,len:10124
load:0x40080400,len:5856
entry 0x400806a8
ets Jun  8 2016 00:22:57
Same thing for a hello world serial write program. Same goes for the blinking LED program.

I tried running this:

Code: Select all

$ python esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset erase_flash
esptool.py v3.2-dev
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 24:0a:c4:ec:37:d4
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 1.6s
Hard resetting via RTS pin...
It erases the board right. And then I attempt to flash the storage with the blinking onboard LED example:

Code: Select all

Sketch uses 198834 bytes (15%) of program storage space. Maximum is 1310720 bytes.
Global variables use 13248 bytes (4%) of dynamic memory, leaving 314432 bytes for local variables. Maximum is 327680 bytes.
python /home/sourav/.arduino15/packages/esp32/tools/esptool_py/3.0.0/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 /home/sourav/.arduino15/packages/esp32/hardware/esp32/1.0.6/tools/partitions/boot_app0.bin 0x1000 /home/sourav/.arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/bin/bootloader_dio_80m.bin 0x10000 /tmp/arduino_build_979172/Blink.ino.bin 0x8000 /tmp/arduino_build_979172/Blink.ino.partitions.bin 
esptool.py v3.0-dev
Serial port /dev/ttyUSB0
Connecting.....
Chip is ESP32-D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 24:0a:c4:ec:37:d4
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 32801.7 kbit/s)...
Hash of data verified.
Compressed 17120 bytes to 11164...
Writing at 0x00001000... (100 %)
Wrote 17120 bytes (11164 compressed) at 0x00001000 in 0.1 seconds (effective 1070.0 kbit/s)...
Hash of data verified.
Compressed 198944 bytes to 102964...
Writing at 0x00010000... (14 %)
Writing at 0x00014000... (28 %)
Writing at 0x00018000... (42 %)
Writing at 0x0001c000... (57 %)
Writing at 0x00020000... (71 %)
Writing at 0x00024000... (85 %)
Writing at 0x00028000... (100 %)
Wrote 198944 bytes (102964 compressed) at 0x00010000 in 1.3 seconds (effective 1240.4 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 128...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 8298.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
It works, but in the Serial Monitor, I see:

Code: Select all

rst:0x3 (SW_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:1044
load:0x40078000,len:10124
load:0x40080400,len:5856
entry 0x400806a8
ets Jun  8 2016 00:22:57
...
...
...
I do know this problem is faced by a lot of people. Most of them are solved by the flash erase, and power cable replacement. But so far, nothing worked for me.

Since I'm using AVR GCC 11.1.0 on Archlinux x64, and the previous flash was done by AVR GCC 10, I tested my sketch with another new esp32 board, it worked just fine.

But how come the board that lied for 2 months died in a moisture proof safety box? Is there a way to revive the board?

Who is online

Users browsing this forum: janet chung and 17 guests