Page 1 of 1

[ESP32-S2] Out of control rebotting issue

Posted: Sat Sep 25, 2021 10:44 am
by nonagon
Please read this serial output:

Code: Select all

ELF file SHA256: a760eaa80003108b

Rebooting...
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0xc (RTC_SW_CPU_RST),boot:0xa (SPI_FAST_FLASH_BOOT)
Saved PC:0x40028f28
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1900
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
entry 0x4004c1ec
␛[0;32mI (24) boot: ESP-IDF 4.3.0 2nd stage bootloader␛[0m
␛[0;32mI (24) boot: compile time 22:38:02␛[0m
␛[0;32mI (24) boot: chip revision: 0␛[0m
␛[0;32mI (26) boot.esp32s2: SPI Speed      : 80MHz␛[0m
␛[0;32mI (31) boot.esp32s2: SPI Mode       : DIO␛[0m
␛[0;32mI (35) boot.esp32s2: SPI Flash Size : 4MB␛[0m
␛[0;32mI (40) boot: Enabling RNG early entropy source...␛[0m
␛[0;32mI (46) boot: Partition Table:␛[0m
␛[0;32mI (49) boot: ## Label            Usage          Type ST Offset   Length␛[0m
␛[0;32mI (57) boot:  0 nvs              WiFi data        01 02 00009000 00008000␛[0m
␛[0;32mI (64) boot:  1 otadata          OTA data         01 00 00011000 00002000␛[0m
␛[0;32mI (71) boot:  2 phy_init         RF data          01 01 00013000 00000800␛[0m
␛[0;32mI (79) boot:  3 factory          factory app      00 00 00020000 00100000␛[0m
␛[0;32mI (86) boot:  4 ota_0            OTA app          00 10 00120000 00100000␛[0m
␛[0;32mI (94) boot:  5 ota_1            OTA app          00 11 00220000 00100000␛[0m
␛[0;32mI (101) boot:  6 octagon          Unknown data     01 87 00320000 000c0000␛[0m
␛[0;32mI (109) boot: End of partition table␛[0m
␛[0;32mI (113) boot: Defaulting to factory image␛[0m
␛[0;32mI (118) esp_image: segment 0: paddr=00020020 vaddr=3f000020 size=29568h (169320) map␛[0m
␛[0;32mI (163) esp_image: segment 1: paddr=00049590 vaddr=3ffc7df0 size=061b0h ( 25008) load␛[0m
␛[0;32mI (169) esp_image: segment 2: paddr=0004f748 vaddr=40022000 size=008d0h (  2256) load␛[0m
␛[0;32mI (170) esp_image: segment 3: paddr=00050020 vaddr=40080020 size=b669ch (747164) map␛[0m
␛[0;32mI (338) esp_image: segment 4: paddr=001066c4 vaddr=400228d0 size=15520h ( 87328) load␛[0m
␛[0;32mI (361) esp_image: segment 5: paddr=0011bbec vaddr=50000000 size=00010h (    16) load␛[0m
␛[0;32mI (374) boot: Loaded app from partition at offset 0x20000␛[0m
␛[0;32mI (374) boot: Disabling RNG early entropy source...␛[0m
␛[0;32mI (386) cache: Instruction cache         : size 8KB, 4Ways, cache line size 32Byte␛[0m
␛[0;32mI (386) cpu_start: Pro cpu up.␛[0m
Guru Meditation Error: Core  0 panic'ed (Cache error). 

Core  0 register dump:
PC      : 0x40037dbd  PS      : 0x00060d34  A0      : 0x8009f3ad  A1      : 0x3fffe280
A2      : 0x02000000  A3      : 0x00000000  A4      : 0x02000000  A5      : 0x00000004  
A6      : 0x000000c0  A7      : 0x00000000  A8      : 0x3ffffd70  A9      : 0x3fffe240
A10     : 0x00fdffff  A11     : 0x00000030  A12     : 0x00000000  A13     : 0x50000008  
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000007  EXCCAUSE: 0x00000007
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x50000008  LCOUNT  : 0x40023f78  

Backtrace:0x40037dba:0x3fffe280 0x4009f3aa:0x3fffe290 0x4012f883:0x3fffe2b0 0x4013001e:0x3fffe2d0 0x40023f41:0x3fffe310 0x40050df1:0x3fffe330 0x4005124d:0x3fffe370 0x4004c23d:0x3fffe4a0 0x40011371:0x3fffe560 0x4000f788:0x3fffe6f0 0x400072a5:0x3fffe710


ELF file SHA256: a760eaa80003108b

Rebooting...
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0xc (RTC_SW_CPU_RST),boot:0xa (SPI_FAST_FLASH_BOOT)
Saved PC:0x40028f28
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1900
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
entry 0x4004c1ec
␛[0;32mI (24) boot: ESP-IDF 4.3.0 2nd stage bootloader␛[0m
␛[0;32mI (24) boot: compile time 22:38:02␛[0m
␛[0;32mI (24) boot: chip revision: 0␛[0m
␛[0;32mI (26) boot.esp32s2: SPI Speed      : 80MHz␛[0m
␛[0;32mI (31) boot.esp32s2: SPI Mode       : DIO␛[0m
␛[0;32mI (35) boot.esp32s2: SPI Flash Size : 4MB␛[0m
␛[0;32mI (40) boot: Enabling RNG early entropy source...␛[0m
␛[0;32mI (46) boot: Partition Table:␛[0m
␛[0;32mI (49) boot: ## Label            Usage          Type ST Offset   Length␛[0m
␛[0;32mI (57) boot:  0 nvs              WiFi data        01 02 00009000 00008000␛[0m
␛[0;32mI (64) boot:  1 otadata          OTA data         01 00 00011000 00002000␛[0m
␛[0;32mI (71) boot:  2 phy_init         RF data          01 01 00013000 00000800␛[0m
␛[0;32mI (79) boot:  3 factory          factory app      00 00 00020000 00100000␛[0m
␛[0;32mI (86) boot:  4 ota_0            OTA app          00 10 00120000 00100000␛[0m
␛[0;32mI (94) boot:  5 ota_1            OTA app          00 11 00220000 00100000␛[0m
␛[0;32mI (101) boot:  6 octagon          Unknown data     01 87 00320000 000c0000␛[0m
␛[0;32mI (109) boot: End of partition table␛[0m
␛[0;32mI (113) boot: Defaulting to factory image␛[0m
␛[0;32mI (118) esp_image: segment 0: paddr=00020020 vaddr=3f000020 size=29568h (169320) map␛[0m
␛[0;32mI (163) esp_image: segment 1: paddr=00049590 vaddr=3ffc7df0 size=061b0h ( 25008) load␛[0m
␛[0;32mI (169) esp_image: segment 2: paddr=0004f748 vaddr=40022000 size=008d0h (  2256) load␛[0m
␛[0;32mI (170) esp_image: segment 3: paddr=00050020 vaddr=40080020 size=b669ch (747164) map␛[0m
␛[0;32mI (338) esp_image: segment 4: paddr=001066c4 vaddr=400228d0 size=15520h ( 87328) load␛[0m
␛[0;32mI (361) esp_image: segment 5: paddr=0011bbec vaddr=50000000 size=00010h (    16) load␛[0m
␛[0;32mI (374) boot: Loaded app from partition at offset 0x20000␛[0m
␛[0;32mI (374) boot: Disabling RNG early entropy source...␛[0m
␛[0;32mI (386) cache: Instruction cache         : size 8KB, 4Ways, cache line size 32Byte␛[0m
␛[0;32mI (386) cpu_start: Pro cpu up.␛[0m
Guru Meditation Error: Core  0 panic'ed (Cache error).

Core  0 register dump:
PC      : 0x40037dbd  PS      : 0x00060d34  A0      : 0x8009f3ad  A1      : 0x3fffe280  
A2      : 0x02000000  A3      : 0x00000000  A4      : 0x02000000  A5      : 0x00000004
A6      : 0x000000c0  A7      : 0x00000000  A8      : 0x3ffffd70  A9      : 0x3fffe240  
A10     : 0x00fdffff  A11     : 0x00000030  A12     : 0x00000000  A13     : 0x50000008
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000007  EXCCAUSE: 0x00000007  
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x50000008  LCOUNT  : 0x40023f78

Backtrace:0x40037dba:0x3fffe280 0x4009f3aa:0x3fffe290 0x4012f883:0x3fffe2b0 0x4013001e:0x3fffe2d0 0x40023f41:0x3fffe310 0x40050df1:0x3fffe330 0x4005124d:0x3fffe370 0x4004c23d:0x3fffe4a0 0x40011371:0x3fffe560 0x4000f788:0x3fffe6f0 0x400072a5:0x3fffe710


ELF file SHA256: a760eaa80003108b

Rebooting...
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0xc (RTC_SW_CPU_RST),boot:0xa (SPI_FAST_FLASH_BOOT)
Saved PC:0x40028f28
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1900
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
entry 0x4004c1ec
␛[0;32mI (24) boot: ESP-IDF 4.3.0 2nd stage bootloader␛[0m
␛[0;32mI (24) boot: compile time 22:38:02␛[0m
␛[0;32mI (24) boot: chip revision: 0␛[0m
␛[0;32mI (26) boot.esp32s2: SPI Speed      : 80MHz␛[0m
␛[0;32mI (31) boot.esp32s2: SPI Mode       : DIO␛[0m
␛[0;32mI (35) boot.esp32s2: SPI Flash Size : 4MB␛[0m
␛[0;32mI (40) boot: Enabling RNG early entropy source...␛[0m
␛[0;32mI (46) boot: Partition Table:␛[0m
␛[0;32mI (49) boot: ## Label            Usage          Type ST Offset   Length␛[0m
␛[0;32mI (57) boot:  0 nvs              WiFi data        01 02 00009000 00008000␛[0m
␛[0;32mI (64) boot:  1 otadata          OTA data         01 00 00011000 00002000␛[0m
␛[0;32mI (71) boot:  2 phy_init         RF data          01 01 00013000 00000800␛[0m
␛[0;32mI (79) boot:  3 factory          factory app      00 00 00020000 00100000␛[0m
␛[0;32mI (86) boot:  4 ota_0            OTA app          00 10 00120000 00100000␛[0m
␛[0;32mI (94) boot:  5 ota_1            OTA app          00 11 00220000 00100000␛[0m
␛[0;32mI (101) boot:  6 octagon          Unknown data     01 87 00320000 000c0000␛[0m
␛[0;32mI (109) boot: End of partition table␛[0m
␛[0;32mI (113) boot: Defaulting to factory image␛[0m
␛[0;32mI (118) esp_image: segment 0: paddr=00020020 vaddr=3f000020 size=29568h (169320) map␛[0m
␛[0;32mI (163) esp_image: segment 1: paddr=00049590 vaddr=3ffc7df0 size=061b0h ( 25008) load␛[0m
␛[0;32mI (169) esp_image: segment 2: paddr=0004f748 vaddr=40022000 size=008d0h (  2256) load␛[0m
␛[0;32mI (170) esp_image: segment 3: paddr=00050020 vaddr=40080020 size=b669ch (747164) map␛[0m
␛[0;32mI (338) esp_image: segment 4: paddr=001066c4 vaddr=400228d0 size=15520h ( 87328) load␛[0m
␛[0;32mI (361) esp_image: segment 5: paddr=0011bbec vaddr=50000000 size=00010h (    16) load␛[0m
␛[0;32mI (374) boot: Loaded app from partition at offset 0x20000␛[0m
␛[0;32mI (374) boot: Disabling RNG early entropy source...␛[0m
␛[0;32mI (386) cache: Instruction cache         : size 8KB, 4Ways, cache line size 32Byte␛[0m
␛[0;32mI (386) cpu_start: Pro cpu up.␛[0m
Guru Meditation Error: Core  0 panic'ed (Cache error).

Core  0 register dump:
PC      : 0x40037dbd  PS      : 0x00060d34  A0      : 0x8009f3ad  A1      : 0x3fffe280  
A2      : 0x02000000  A3      : 0x00000000  A4      : 0x02000000  A5      : 0x00000004
A6      : 0x000000c0  A7      : 0x00000000  A8      : 0x3ffffd70  A9      : 0x3fffe240  
A10     : 0x00fdffff  A11     : 0x00000030  A12     : 0x00000000  A13     : 0x50000008
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000007  EXCCAUSE: 0x00000007  
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x50000008  LCOUNT  : 0x40023f78

Backtrace:0x40037dba:0x3fffe280 0x4009f3aa:0x3fffe290 0x4012f883:0x3fffe2b0 0x4013001e:0x3fffe2d0 0x40023f41:0x3fffe310 0x40050df1:0x3fffe330 0x4005124d:0x3fffe370 0x4004c23d:0x3fffe4a0 0x40011371:0x3fffe560 0x4000f788:0x3fffe6f0 0x400072a5:0x3fffe710


ELF file SHA256: a760eaa80003108b

Rebooting...
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0xc (RTC_SW_CPU_RST),boot:0xa (SPI_FAST_FLASH_BOOT)
Saved PC:0x40028f28
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1900
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
entry 0x4004c1ec
␛[0;32mI (24) boot: ESP-IDF 4.3.0 2nd stage bootloader␛[0m
␛[0;32mI (24) boot: compile time 22:38:02␛[0m
␛[0;32mI (24) boot: chip revision: 0␛[0m
␛[0;32mI (26) boot.esp32s2: SPI Speed      : 80MHz␛[0m
␛[0;32mI (31) boot.esp32s2: SPI Mode       : DIO␛[0m
␛[0;32mI (35) boot.esp32s2: SPI Flash Size : 4MB␛[0m
␛[0;32mI (40) boot: Enabling RNG early entropy source...␛[0m
␛[0;32mI (46) boot: Partition Table:␛[0m
␛[0;32mI (49) boot: ## Label            Usage          Type ST Offset   Length␛[0m
␛[0;32mI (57) boot:  0 nvs              WiFi data        01 02 00009000 00008000␛[0m
␛[0;32mI (64) boot:  1 otadata          OTA data         01 00 00011000 00002000␛[0m
␛[0;32mI (71) boot:  2 phy_init         RF data          01 01 00013000 00000800␛[0m
␛[0;32mI (79) boot:  3 factory          factory app      00 00 00020000 00100000␛[0m
␛[0;32mI (86) boot:  4 ota_0            OTA app          00 10 00120000 00100000␛[0m
␛[0;32mI (94) boot:  5 ota_1            OTA app          00 11 00220000 00100000␛[0m
␛[0;32mI (101) boot:  6 octagon          Unknown data     01 87 00320000 000c0000␛[0m
␛[0;32mI (109) boot: End of partition table␛[0m
␛[0;32mI (113) boot: Defaulting to factory image␛[0m
␛[0;32mI (118) esp_image: segment 0: paddr=00020020 vaddr=3f000020 size=29568h (169320) map␛[0m
␛[0;32mI (163) esp_image: segment 1: paddr=00049590 vaddr=3ffc7df0 size=061b0h ( 25008) load␛[0m
␛[0;32mI (169) esp_image: segment 2: paddr=0004f748 vaddr=40022000 size=008d0h (  2256) load␛[0m
␛[0;32mI (170) esp_image: segment 3: paddr=00050020 vaddr=40080020 size=b669ch (747164) map␛[0m
␛[0;32mI (338) esp_image: segment 4: paddr=001066c4 vaddr=400228d0 size=15520h ( 87328) load␛[0m
␛[0;32mI (361) esp_image: segment 5: paddr=0011bbec vaddr=50000000 size=00010h (    16) load␛[0m
␛[0;32mI (374) boot: Loaded app from partition at offset 0x20000␛[0m
␛[0;32mI (374) boot: Disabling RNG early entropy source...␛[0m
␛[0;32mI (386) cache: Instruction cache         : size 8KB, 4Ways, cache line size 32Byte␛[0m
␛[0;32mI (386) cpu_start: Pro cpu up.␛[0m
Guru Meditation Error: Core  0 panic'ed (Cache error).

Core  0 register dump:
PC      : 0x40037dbd  PS      : 0x00060d34  A0      : 0x8009f3ad  A1      : 0x3fffe280  
A2      : 0x02000000  A3      : 0x00000000  A4      : 0x02000000  A5      : 0x00000004
A6      : 0x000000c0  A7      : 0x00000000  A8      : 0x3ffffd70  A9      : 0x3fffe240  
A10     : 0x00fdffff  A11     : 0x00000030  A12     : 0x00000000  A13     : 0x50000008
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000007  EXCCAUSE: 0x00000007  
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x50000008  LCOUNT  : 0x40023f78

Backtrace:0x40037dba:0x3fffe280 0x4009f3aa:0x3fffe290 0x4012f883:0x3fffe2b0 0x4013001e:0x3fffe2d0 0x40023f41:0x3fffe310 0x40050df1:0x3fffe330 0x4005124d:0x3fffe370 0x4004c23d:0x3fffe4a0 0x40011371:0x3fffe560 0x4000f788:0x3fffe6f0 0x400072a5:0x3fffe710


ELF file SHA256: a760eaa80003108b

Rebooting...
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0xc (RTC_SW_CPU_RST),boot:0xa (SPI_FAST_FLASH_BOOT)
Saved PC:0x40028f28
SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1900
load:0x4004c000,len:0x9e8
load:0x40050000,len:0x2b70
entry 0x4004c1ec
␛[0;32mI (24) boot: ESP-IDF 4.3.0 2nd stage bootloader␛[0m
␛[0;32mI (24) boot: compile time 22:38:02␛[0m
␛[0;32mI (24) boot: chip revision: 0␛[0m
␛[0;32mI (26) boot.esp32s2: SPI Speed      : 80MHz␛[0m
␛[0;32mI (31) boot.esp32s2: SPI Mode       : DIO␛[0m
␛[0;32mI (35) boot.esp32s2: SPI Flash Size : 4MB␛[0m
␛[0;32mI (40) boot: Enabling RNG early entropy source...␛[0m
␛[0;32mI (46) boot: Partition Table:␛[0m
␛[0;32mI (49) boot: ## Label            Usage          Type ST Offset   Length␛[0m
␛[0;32mI (57) boot:  0 nvs              WiFi data        01 02 00009000 00008000␛[0m
␛[0;32mI (64) boot:  1 otadata          OTA data         01 00 00011000 00002000␛[0m
␛[0;32mI (71) boot:  2 phy_init         RF data          01 01 00013000 00000800␛[0m
␛[0;32mI (79) boot:  3 factory          factory app      00 00 00020000 00100000␛[0m
␛[0;32mI (86) boot:  4 ota_0            OTA app          00 10 00120000 00100000␛[0m
␛[0;32mI (94) boot:  5 ota_1            OTA app          00 11 00220000 00100000␛[0m
␛[0;32mI (101) boot:  6 octagon          Unknown data     01 87 00320000 000c0000␛[0m
␛[0;32mI (109) boot: End of partition table␛[0m
␛[0;32mI (113) boot: Defaulting to factory image␛[0m
␛[0;32mI (118) esp_image: segment 0: paddr=00020020 vaddr=3f000020 size=29568h (169320) map␛[0m
␛[0;32mI (163) esp_image: segment 1: paddr=00049590 vaddr=3ffc7df0 size=061b0h ( 25008) load␛[0m
␛[0;32mI (169) esp_image: segment 2: paddr=0004f748 vaddr=40022000 size=008d0h (  2256) load␛[0m
␛[0;32mI (170) esp_image: segment 3: paddr=00050020 vaddr=40080020 size=b669ch (747164) map␛[0m
␛[0;32mI (338) esp_image: segment 4: paddr=001066c4 vaddr=400228d0 size=15520h ( 87328) load␛[0m
␛[0;32mI (361) esp_image: segment 5: paddr=0011bbec vaddr=50000000 size=00010h (    16) load␛[0m
␛[0;32mI (374) boot: Loaded app from partition at offset 0x20000␛[0m
␛[0;32mI (374) boot: Disabling RNG early entropy source...␛[0m
␛[0;32mI (386) cache: Instruction cache         : size 8KB, 4Ways, cache line size 32Byte␛[0m
␛[0;32mI (386) cpu_start: Pro cpu up.␛[0m
Guru Meditation Error: Core  0 panic'ed (Cache error). 

Core  0 register dump:
PC      : 0x40037dbd  PS      : 0x00060d34  A0      : 0x8009f3ad  A1      : 0x3fffe280
A2      : 0x02000000  A3      : 0x00000000  A4      : 0x02000000  A5      : 0x00000004  
A6      : 0x000000c0  A7      : 0x00000000  A8      : 0x3ffffd70  A9      : 0x3fffe240
A10     : 0x00fdffff  A11     : 0x00000030  A12     : 0x00000000  A13     : 0x50000008  
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x00000007  EXCCAUSE: 0x00000007
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x50000008  LCOUNT  : 0x40023f78  

Backtrace:0x40037dba:0x3fffe280 0x4009f3aa:0x3fffe290 0x4012f883:0x3fffe2b0 0x4013001e:0x3fffe2d0 0x40023f41:0x3fffe310 0x40050df1:0x3fffe330 0x4005124d:0x3fffe370 0x4004c23d:0x3fffe4a0 0x40011371:0x3fffe560 0x4000f788:0x3fffe6f0 0x400072a5:0x3fffe710

This is an infinite loop rebooting with no way to restore the product to a working state.
For sure it can be related to a bug in the firmware, but I worked with other MCUs and I in every cases can restore the product to a working state (like reading reset register at very first time) and at least signaling the problem.
As you can see my code is not loaded but the MCU is crazy rebooting.
How can I handle this to be sure to trhow in the market a good quality and stable product based on ESP32-S2?

Re: [ESP32-S2] Out of control rebotting issue

Posted: Sat Sep 25, 2021 2:55 pm
by felmue
Hello @nonagon

does your board have a boot button? If you press it (and do a reset) it should go into download mode and you can burn firmware again.

If there is no boot button you can also achieve going into download mode by connecting GPIO0 to GND (and do a reset).

Thanks
Felix

Re: [ESP32-S2] Out of control rebotting issue

Posted: Sat Sep 25, 2021 3:11 pm
by boarchuz
There is a config option to hold a button at reset to boot from the factory partition (or you could customise the bootloader if you want some custom logic). Putting a rock solid app in that partition will ensure you can always recover from a soft-bricked state due to a buggy OTA update by falling back to the factory firmware.

Rollback might be interesting too: https://docs.espressif.com/projects/esp ... ck-process

Re: [ESP32-S2] Out of control rebotting issue

Posted: Sat Sep 25, 2021 5:47 pm
by nonagon
Hello,
thank you for the replies,
this not happen when the product starts, but sometimes, maybe after a bug, the firmware reboot and go in that state.
If I press the reset button it will start normally.
I have a custom pcb programmer based on FT2232 chip with reset button and an automatic download mode circuit based on Espressif schematics. I have implemented OTA, firmware validation, rollback and other things.
If I push the reset button the firmware restart to work, and in any time I can upload a new firmware.
The problem is different:
Why as the attached log, after maybe some bug, the framework reboot the chip and it never reach the application code?
If a reboot happen for some reason I expecting the firmware to restart.

Re: [ESP32-S2] Out of control rebotting issue

Posted: Sat Sep 25, 2021 6:35 pm
by boarchuz
That is odd. It's only a CPU reset (see 6.1.1 of TRM) so I suppose it would be possible to screw with some registers in such a way that you get into this loop.

Also check if this is relevant: https://docs.espressif.com/projects/esp ... he-err-msg (that section doesn't exist for S2 but it matches this error exactly)

Are you doing anything 'non-standard' in this firmware that might cause that? Does the decoded backtrace give any hints?

As far as simple solutions, you could identify this boot loop in the bootloader and force a full RTC reset (functionally equivalent to pressing the reset button).

Re: [ESP32-S2] Wifi APSTA/STA switch rebotting issue

Posted: Mon Sep 27, 2021 9:09 am
by nonagon
I found the problem.
I implemented a Init\DeInit procedures for wifi to switch from AP mode to Station mode.
The problem was with creating the standard wifi AP and then destroy it.

Code: Select all

static esp_netif_t* ap_ntptr = NULL;
in the init:

Code: Select all

ap_ntptr = esp_netif_create_default_wifi_ap();
in the deinit:

Code: Select all

esp_netif_destroy(ap_ntptr);
I dont' know why but after some cycles of init\deinit the firmware go to that infinite loop reboot without loading the firmware.
Now I calll esp_netif_create_default_wifi_ap once at init and never destroy it, and works.

If the user set the product to connect to a Wifi Net and this is not available for some reason, the product needs to create an AP to offer a link to connect to it in every case, in the meanwhile the product needs to scan for the net to become available and the switch another time if the net is revealed.

Is there an example of correct INIT\DEINIT or correct switching from APSTA to STA only Mode?
I followed ESP-IDF wiki but maybe is not enough to implement a correct switch procedure.

In any case, a reboot never has to become an infinite reboot without firmare code start. I want to understand also this issue.

Re: [ESP32-S2] Out of control rebotting issue

Posted: Sat Jan 01, 2022 5:24 am
by hspuneet
Faced a similar issue .. out of control reboot loop !


Rebooting...
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x400267e0
0x400267e0: esp_restart_noos at C:/esp-idf/esp-idfv43/esp-idf-v4.3/components/esp32s2/system_api_esp32s2.c:109 (discriminator 1)

SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1254
load:0x4004c000,len:0xab4
load:0x40050000,len:0x2a60
entry 0x4004c1b4
I (244) cache: Instruction cache : size 8KB, 4Ways, cache line size 32Byte
I (244) cache: Data cache : size 8KB, 4Ways, cache line size 32Byte
I (247) spiram: Found 16MBit SPI RAM device
I (252) spiram: SPI RAM mode: sram 40m
I (257) spiram: PSRAM initialized, cache is in normal (1-core) mode.
I (264) cpu_start: Pro cpu up.
Guru Meditation Error: Core 0 panic'ed (Cache error).

Core 0 register dump:
PC : 0x4003b259 PS : 0x00060d34 A0 : 0x8009c17d A1 : 0x3fffe280
0x4003b259: xt_ints_on at C:/esp-idf/esp-idfv43/esp-idf-v4.3/components/xtensa/xtensa_intr_asm.S:164

A2 : 0x02000000 A3 : 0x00000000 A4 : 0x02000000 A5 : 0x00000004
A6 : 0x000000c0 A7 : 0x00000000 A8 : 0x3ffffd70 A9 : 0x3fffe240
A10 : 0x007dff2d A11 : 0x00000030 A12 : 0x00000000 A13 : 0x50000008
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x00000007 EXCCAUSE: 0x00000007
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x50000008 LCOUNT : 0x400255b4
0x400255b4: xt_highint4 at C:/esp-idf/esp-idfv43/esp-idf-v4.3/components/esp_system/port/soc/esp32s2/dport_panic_highint_hdl.S:58


Backtrace:0x4003b256:0x3fffe280 0x4009c17a:0x3fffe290 0x400883bf:0x3fffe2b0 0x40088b2a:0x3fffe2d0 0x4002557a:0x3fffe310 0x40050e99:0x3fffe330 0x40051209:0x3fffe370 0x4004c205:0x3fffe4a0 0x40011371:0x3fffe560 0x4000f788:0x3fffe6f0 0x400072a5:0x3fffe710
0x4003b256: xt_ints_on at C:/esp-idf/esp-idfv43/esp-idf-v4.3/components/xtensa/xtensa_intr_asm.S:163

0x4009c17a: intr_cntrl_ll_enable_interrupts at C:/esp-idf/esp-idfv43/esp-idf-v4.3/components/hal/esp32s2/include/hal/interrupt_controller_ll.h:33
(inlined by) interrupt_controller_hal_enable_interrupts at C:/esp-idf/esp-idfv43/esp-idf-v4.3/components/hal/include/hal/interrupt_controller_hal.h:125
(inlined by) esp_intr_enable_source at C:/esp-idf/esp-idfv43/esp-idf-v4.3/components/esp_system/intr_alloc.c:833

0x400883bf: esp_memprot_intr_init at C:/esp-idf/esp-idfv43/esp-idf-v4.3/components/esp32s2/memprot.c:147

0x40088b2a: esp_memprot_set_prot at C:/esp-idf/esp-idfv43/esp-idf-v4.3/components/esp32s2/memprot.c:691

0x4002557a: call_start_cpu0 at C:/esp-idf/esp-idfv43/esp-idf-v4.3/components/esp_system/port/cpu_start.c:471 (discriminator 1)



ELF file SHA256: 47a5556c01308e9d

Rebooting...
ESP-ROM:esp32s2-rc4-20191025
Build:Oct 25 2019
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x400267e0
0x400267e0: esp_restart_noos at C:/esp-idf/esp-idfv43/esp-idf-v4.3/components/esp32s2/system_api_esp32s2.c:109 (discriminator 1)

SPIWP:0xee
mode:DIO, clock div:1
load:0x3ffe6100,len:0x1254
load:0x4004c000,len:0xab4
load:0x40050000,len:0x2a60
entry 0x4004c1b4
I (244) cache: Instruction cache : size 8KB, 4Ways, cache line size 32Byte
I (244) cache: Data cache : size 8KB, 4Ways, cache line size 32Byte
I (248) spiram: Found 16MBit SPI RAM device
I (252) spiram: SPI RAM mode: sram 40m
I (257) spiram: PSRAM initialized, cache is in normal (1-core) mode.
I (264) cpu_start: Pro cpu up.
Guru Meditation Error: Core 0 panic'ed (Cache error).

Re: [ESP32-S2] Out of control rebotting issue

Posted: Mon Jan 03, 2022 11:55 am
by ESP_igrr
Hi hspuneet,

The issue you have observed was recently fixed in v4.3.2 bugfix release — https://github.com/espressif/esp-idf/re ... tag/v4.3.2. Could you try upgrading to that version?