Hang during stat of APP cpu

pg_esp32
Posts: 3
Joined: Tue Nov 15, 2022 12:44 pm

Hang during stat of APP cpu

Postby pg_esp32 » Sun Nov 20, 2022 3:11 pm

I use a modified bootloader which allows me to select (using RTC memory) whether the image from the factory or the OTA0 partition should be loaded. On Power-On the factory APP is started. When the factory APP verified, that everything is ok and up-to-date, it boot the OTA App.

The problem is, that the OTA App, that is built to use both CPUs hangs while starting the APP CPU. The factory APP is built to use only the PRO CPU.
Interestingly, this only occurs the first time after power-up. The hang is caught by a watchdog, the factory-image is started again and when the OTA-image is booted the second time, it works.

What is causing this behavior and how can it be fixed?

Side-question: why does the phy-initialization (calibration data not saved) takes about twice as long with the dual-CPU build as with the unicore-build?

ESP-IDF 4.4.3, Chip is ESP32-D0WDQ6 (revision 0)

Excerpt from boot-log (first OTA start):

Code: Select all

************** FACTORY APP STARTED ***************
booting OTA app in 15s
restarting...
ets Jun  8 2016 00:22:57

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:2
load:0x3fff0030,len:5916
ho 0 tail 12 room 4
load:0x40078000,len:15136
load:0x40080400,len:4384
0x40080400: _init at ??:?

entry 0x40080694
I (29) boot: ESP-IDF v4.4.1 2nd stage bootloader
I (29) boot: compile time 18:23:35
I (29) boot: chip revision: 0
I (29) qio_mode: Enabling default flash chip QIO
I (33) boot.esp32: SPI Speed      : 40MHz
I (37) boot.esp32: SPI Mode       : QIO
I (40) boot.esp32: SPI Flash Size : 4MB
I (44) boot: Enabling RNG early entropy source...
I (49) boot: Partition Table:
I (51) boot: ## Label            Usage          Type ST Offset   Length
I (57) boot:  0 nvs              WiFi data        01 02 00009000 00007000
I (64) boot:  1 factory          factory app      00 00 00010000 000f0000
I (70) boot:  2 coredump         Unknown data     01 03 00170000 00010000
I (77) boot:  3 ota_0            OTA app          00 10 00180000 00180000
I (84) boot: End of partition table
I (87) boot: boot_tag set to OTA0
I (90) esp_image: segment 0: paddr=00180020 vaddr=3f400020 size=0769ch ( 30364) map
I (107) esp_image: segment 1: paddr=001876c4 vaddr=3ffb0000 size=022bch (  8892) load
I (110) esp_image: segment 2: paddr=00189988 vaddr=40080000 size=06690h ( 26256) load
I (122) esp_image: segment 3: paddr=00190020 vaddr=400d0020 size=1494ch ( 84300) map
I (148) esp_image: segment 4: paddr=001a4974 vaddr=40086690 size=04dech ( 19948) load
I (155) esp_image: segment 5: paddr=001a9768 vaddr=50000000 size=00010h (    16) load
I (161) boot: Loaded app from partition at offset 0x180000
I (161) boot: Disabling RNG early entropy source...
I (173) cpu_start: Pro cpu up.
I (173) cpu_start: Starting app cpu, entry point is 0x40081004
0x40081004: xt_highint4 at C:/Applications/Develop/SDK/esp-idf-4.4.3/frameworks/esp-idf-v4.4.3/components/esp_system/port/soc/esp32/highint_hdl.S:230

ets Jun  8 2016 00:22:57

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:5916
ho 0 tail 12 room 4
load:0x40078000,len:15136
load:0x40080400,len:4384
0x40080400: _init at ??:?
Excerpt from boot-log (second OTA start):

Code: Select all

I (161) boot: Loaded app from partition at offset 0x180000
I (161) boot: Disabling RNG early entropy source...
I (173) cpu_start: Pro cpu up.
I (173) cpu_start: Starting app cpu, entry point is 0x40081004
0x40081004: xt_highint4 at C:/Applications/Develop/SDK/esp-idf-4.4.3/frameworks/esp-idf-v4.4.3/components/esp_system/port/soc/esp32/highint_hdl.S:230

I (0) cpu_start: App cpu up.
I (184) cpu_start: Pro cpu start user code
I (184) cpu_start: cpu freq: 160000000
Attachments
boot_single_dual_core.zip
(10.81 KiB) Downloaded 202 times

Who is online

Users browsing this forum: jimmy98035@gmail.com, Orange_Murker and 71 guests