0

I want to flash the ESP32-D0WDQ6 chip, but the code will not run. In the monitor I can see that the app actually never loads. The partition phy_init does not seem to have any size and the chip gets stuck after that line.

Monitor output:

rst:0x1 (POWERON_RESET),boot:0x33 (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:6744
load:0x40078000,len:14236
ho 0 tail 12 room 4
load:0x40080400,len:3716
entry 0x40080680
I (28) boot: ESP-IDF v4.4-dev-1404-gc13afea63 2nd stage bootloader
I (28) boot: compile time 23:43:03
I (28) boot: chip revision: 1
I (32) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (40) boot.esp32: SPI Speed      : 40MHz
I (44) boot.esp32: SPI Mode       : DIO
I (49) boot.esp32: SPI Flash Size : 2MB
I (53) boot: Enabling RNG early entropy source...
I (59) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (70) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (77) boot:  1 phy_init         RF data          01 01 0000f000 0000

My partition table:

nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,1M

Flash command:

esptool.py esp32 -p /dev/ttyACM0 -b 115200 --before=no_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x1000 bootloader/bootloader.bin 0x8000 partition_table/partition-table.bin 0x10000 my_project.bin

Alex98776
  • 11
  • 3
  • This looks like it's just not printing the whole line (if it were zero size, it would be 00000000, and notice that your factory partition isn't printing). It's probably hanging while trying to print the log statement, possibly for an unrelated reason. You can check the actual size with parttool: `parttool.py --port /dev/ttyACM0 get_partition_info -n phy_init --info size` – Rob Napier May 27 '21 at 22:52
  • I dont really think that that is just not printing, as it it exactly like that 15+ times in a row and the code does not execute – Alex98776 May 28 '21 at 05:43
  • 1
    Espressif modules don't have 2MiB Flash. Are you running on custom HW? Kind of looks like the boot loader crashes while loading the partition table. You are using the bleeding edge version of ESP IDF (4.4), try downgrading to the current stable v4.2.1. Also I recommend fully erasing the flash once. – Tarmo May 28 '21 at 07:55
  • I have similar problem. Can you help me to solve it please. https://stackoverflow.com/questions/75341808/bootloop-problem-of-my-own-brand-new-board-w-esp32-s3-chip – Canik01 Feb 03 '23 at 23:03

1 Answers1

1

I actually found a solution to the problem:

This is the WiFi NINA W102 module, which has only 2MB of storage. The problem to it crashing was just another one: To keep the NINA running, the RESET pin has to be pulled high all time. The Arduino script pulls it low after some time by itself so keeping it pulled high when the code should be executed did the trick. There is still crashed but downgrading to a stable IDF version resolved every issue.

Alex98776
  • 11
  • 3