arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.12k stars 4.79k forks source link

ESP32 Core 2.x Configuring GPIO_DSB fails with exception. #13666

Closed mikep1998 closed 2 years ago

mikep1998 commented 2 years ago

PROBLEM DESCRIPTION

A clear and concise description of what the problem is. When configuring GPIO_DSB on GPIO21 (and other GPIOs) boot fails with

Core  1 register dump:
PC      : 0x400818ec  PS      : 0x00060f33  A0      : 0x8013aca2  A1      : 0x3ffb26e0  
A2      : 0x00000498  A3      : 0x00000015  A4      : 0x00000054  A5      : 0xbaad5678  
A6      : 0xb33fffff  A7      : 0x0000abab  A8      : 0x3f423a18  A9      : 0x06050304  
A10     : 0x00000507  A11     : 0x0000007c  A12     : 0x3ffc949c  A13     : 0x00060f23  
A14     : 0xb33fffff  A15     : 0x0000abab  SAR     : 0x0000000b  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x06050304  LBEG    : 0x4008142c  LEND    : 0x40081439  LCOUNT  : 0x00000012  

Backtrace:0x400818e9:0x3ffb26e00x4013ac9f:0x3ffb2710 0x400f266b:0x3ffb2740 0x400f2744:0x3ffb2760 0x40113844:0x3ffb2780 0x400f90cb:0x3ffb27a0 0x400ff5a1:0x3ffb27c0 0x40140baa:0x3ffb2820 

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:
```lua
  Rules output here:
- [x] Set `weblog` to 4 and then, when you experience your issue, provide the output of the Console log:
```lua
  Console output here:

19:24:22.641 > configsip: 0, SPIWP:0xee
19:24:22.641 > clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
19:24:22.643 > mode:DIO, clock div:2
19:24:22.645 > load:0x3fff0030,len:184
19:24:22.647 > load:0x40078000,len:12352
19:24:22.649 > load:0x40080400,len:2912
19:24:22.651 > entry 0x400805c4
19:24:23.059 >
19:24:23.061 > 00:00:00.002 HDW: ESP32-D0WD
19:24:23.088 > 00:00:00.030 UFS: FlashFS mounted with 1448 kB free
19:24:23.122 > 00:00:00.064 CFG: Loaded from File, Count 2
19:24:23.126 > 00:00:00.066 FRC: Some settings have been reset (3)
19:24:23.131 > 00:00:00.072 Project tasmota - jacuzzi_Tub_Auto Version 10.0.0.2(Jac)-2_0_1(2021-11-12T19:14:18)
19:24:23.139 > Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
19:24:23.146 >
19:24:23.147 > Core  1 register dump:
19:24:23.149 > PC      : 0x40081334  PS      : 0x00060133  A0      : 0x800ff086  A1      : 0x3ffb26e0
19:24:23.157 > A2      : 0x00000498  A3      : 0x00000015  A4      : 0x00000054  A5      : 0x00000000
19:24:23.164 > A6      : 0x3ffc5820  A7      : 0x0000abab  A8      : 0x3f40e9a4  A9      : 0x06050304
19:24:23.172 > A10     : 0x00000507  A11     : 0x0000007c  A12     : 0x3ffc6d64  A13     : 0x00060123
19:24:23.180 > A14     : 0xb33fffff  A15     : 0x0000abab  SAR     : 0x0000000b  EXCCAUSE: 0x0000001c
19:24:23.188 > EXCVADDR: 0x06050304  LBEG    : 0x40080f50  LEND    : 0x40080f5d  LCOUNT  : 0x00000012
19:24:23.196 >
19:24:23.196 >
19:24:23.196 > Backtrace:0x40081331:0x3ffb26e00x400ff083:0x3ffb2710 0x400e2f67:0x3ffb2740 0x400e3040:0x3ffb2760 0x400e3400:0x3ffb2780 0x400e45db:0x3ffb27a0 0x400e9c55:0x3ffb27c0 0x40103666:0x3ffb2820
19:24:23.232 >   #0  0x40081331:0x3ffb26e00 in OneWire::reset() at lib/lib_basic/OneWire-Stickbreaker-20190506-1.1/OneWire.h:218
19:24:23.232 >       (inlined by) OneWire::reset() at lib/lib_basic/OneWire-Stickbreaker-20190506-1.1/OneWire.cpp:191
19:24:23.232 >
19:24:23.232 >
19:24:23.232 >
19:24:23.232 >
19:24:23.232 > ELF file SHA256: 0000000000000000
19:24:23.232 >
19:24:23.232 > Rebooting...
19:24:23.232 > ets Jun  8 2016 00:22:57
19:24:23.232 >
19:24:23.232 > rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
19:24:23.232 > configsip: 0, SPIWP:0xee
19:24:23.232 > clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
19:24:23.235 > mode:DIO, clock div:2
19:24:23.236 > load:0x3fff0030,len:184
19:24:23.238 > load:0x40078000,len:12352
19:24:23.240 > load:0x40080400,len:2912
19:24:23.242 > entry 0x400805c4
19:24:23.642 >
19:24:23.642 > 00:00:00.002 HDW: ESP32-D0WD
19:24:23.679 > 00:00:00.030 UFS: FlashFS mounted with 1448 kB free
19:24:23.713 > 00:00:00.064 CFG: Loaded from File, Count 2
19:24:23.717 > 00:00:00.066 FRC: Some settings have been reset (4)
19:24:23.722 > 00:00:00.072 Project tasmota - jacuzzi_Tub_Auto Version 10.0.0.2(Jac)-2_0_1(2021-11-12T19:14:18)
19:24:23.730 > Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
19:24:23.737 >
19:24:23.738 > Core  1 register dump:
19:24:23.740 > PC      : 0x40081334  PS      : 0x00060333  A0      : 0x800ff086  A1      : 0x3ffb26e0
19:24:23.747 > A2      : 0x00000498  A3      : 0x00000015  A4      : 0x00000054  A5      : 0x00000000
19:24:23.756 > A6      : 0x3ffc5820  A7      : 0x0000abab  A8      : 0x3f40e9a4  A9      : 0x06050304
19:24:23.763 > A10     : 0x00000507  A11     : 0x0000007c  A12     : 0x3ffc6d64  A13     : 0x00060323
19:24:23.771 > A14     : 0xb33fffff  A15     : 0x0000abab  SAR     : 0x0000000b  EXCCAUSE: 0x0000001c
19:24:23.779 > EXCVADDR: 0x06050304  LBEG    : 0x40080f50  LEND    : 0x40080f5d  LCOUNT  : 0x00000012
19:24:23.788 >
19:24:23.788 >
19:24:23.788 > Backtrace:0x40081331:0x3ffb26e00x400ff083:0x3ffb2710 0x400e2f67:0x3ffb2740 0x400e3040:0x3ffb2760 0x400e3400:0x3ffb2780 0x400e45db:0x3ffb27a0 0x400e9c55:0x3ffb27c0 0x40103666:0x3ffb2820
19:24:23.823 >   #0  0x40081331:0x3ffb26e00 in OneWire::reset() at lib/lib_basic/OneWire-Stickbreaker-20190506-1.1/OneWire.h:218
19:24:23.823 >       (inlined by) OneWire::reset() at lib/lib_basic/OneWire-Stickbreaker-20190506-1.1/OneWire.cpp:191
19:24:23.823 >
19:24:23.823 >
19:24:23.823 >
19:24:23.823 >
19:24:23.823 > ELF file SHA256: 0000000000000000
19:24:23.823 >
19:24:23.823 > Rebooting...
19:24:23.823 > ets Jun  8 2016 00:22:57
19:24:23.823 >
19:24:23.823 > rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
19:24:23.823 > configsip: 0, SPIWP:0xee
19:24:23.823 > clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
19:24:23.825 > mode:DIO, clock div:2
19:24:23.827 > load:0x3fff0030,len:184
19:24:23.829 > load:0x40078000,len:12352
19:24:23.831 > load:0x40080400,len:2912
19:24:23.833 > entry 0x400805c4
19:24:24.236 >
19:24:24.236 > 00:00:00.002 HDW: ESP32-D0WD
19:24:24.267 > 00:00:00.030 UFS: FlashFS mounted with 1448 kB free
19:24:24.304 > 00:00:00.064 CFG: Loaded from File, Count 2
19:24:24.308 > 00:00:00.066 FRC: Some settings have been reset (5)
19:24:24.313 > 00:00:00.072 Project tasmota - jacuzzi_Tub_Auto Version 10.0.0.2(Jac)-2_0_1(2021-11-12T19:14:18)
19:24:24.321 > Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
19:24:24.328 >
19:24:24.329 > Core  1 register dump:
19:24:24.331 > PC      : 0x40081334  PS      : 0x00060333  A0      : 0x800ff086  A1      : 0x3ffb26e0
19:24:24.338 > A2      : 0x00000498  A3      : 0x00000015  A4      : 0x00000054  A5      : 0x00000000
19:24:24.346 > A6      : 0x3ffc5820  A7      : 0x0000abab  A8      : 0x3f40e9a4  A9      : 0x06050304
19:24:24.354 > A10     : 0x00000507  A11     : 0x0000007c  A12     : 0x3ffc6d64  A13     : 0x00060323
19:24:24.362 > A14     : 0xb33fffff  A15     : 0x0000abab  SAR     : 0x0000000b  EXCCAUSE: 0x0000001c
19:24:24.370 > EXCVADDR: 0x06050304  LBEG    : 0x40080f50  LEND    : 0x40080f5d  LCOUNT  : 0x00000012
19:24:24.378 >
19:24:24.378 >
19:24:24.378 > Backtrace:0x40081331:0x3ffb26e00x400ff083:0x3ffb2710 0x400e2f67:0x3ffb2740 0x400e3040:0x3ffb2760 0x400e3400:0x3ffb2780 0x400e45db:0x3ffb27a0 0x400e9c55:0x3ffb27c0 0x40103666:0x3ffb2820
19:24:24.414 >   #0  0x40081331:0x3ffb26e00 in OneWire::reset() at lib/lib_basic/OneWire-Stickbreaker-20190506-1.1/OneWire.h:218
19:24:24.414 >       (inlined by) OneWire::reset() at lib/lib_basic/OneWire-Stickbreaker-20190506-1.1/OneWire.cpp:191
19:24:24.414 >
19:24:24.414 >
19:24:24.414 >
19:24:24.414 >
19:24:24.414 > ELF file SHA256: 0000000000000000
19:24:24.414 >
19:24:24.414 > Rebooting...
19:24:24.414 > ets Jun  8 2016 00:22:57
19:24:24.414 >
19:24:24.414 > rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
19:24:24.414 > configsip: 0, SPIWP:0xee
19:24:24.414 > clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
19:24:24.416 > mode:DIO, clock div:2
19:24:24.418 > load:0x3fff0030,len:184
19:24:24.420 > load:0x40078000,len:12352
19:24:24.422 > load:0x40080400,len:2912
19:24:24.424 > entry 0x400805c4
19:24:24.826 >
19:24:24.826 > 00:00:00.002 HDW: ESP32-D0WD
19:24:24.861 > 00:00:00.030 UFS: FlashFS mounted with 1448 kB free
19:24:24.894 > 00:00:00.064 CFG: Loaded from File, Count 2
19:24:24.899 > 00:00:00.066 FRC: Some settings have been reset (6)
19:24:24.904 > 00:00:00.069 Project tasmota - jacuzzi_Tub_Auto Version 10.0.0.2(Jac)-2_0_1(2021-11-12T19:14:18)
19:24:29.676 > 00:00:04.778 WIF: Connecting to AP2 mike1.1.3 Channel 3 BSSId 44:94:FC:35:CC:8B in mode 11n as jacuzzi-Tub-Auto...
19:24:31.826 > 00:00:06.928 QPC: Reset
19:24:33.570 > 00:00:08.673 WIF: Connected
19:24:33.824 > 00:00:08.926 HTP: Web server active on jacuzzi-Tub-Auto with IP address 192.168.1.228
19:24:34.850 > 04:24:33.708 MQT: Attempting connection...
19:24:34.876 > 04:24:33.734 MQT: Connected
19:24:34.881 > 04:24:33.738 MQT: tele/jacuzzi_Tub_Auto/LWT = Online (retained)
19:24:34.888 > 04:24:33.746 MQT: cmnd/jacuzzi_Tub_Auto/POWER =
19:24:34.895 > 04:24:33.753 MQT: tele/jacuzzi_Tub_Auto/INFO1 = {"Info1":{"Module":"ESP32-DevKit","Version":"10.0.0.2(Jac)","FallbackTopic":"cmnd/DVES_980FC4_fb/","GroupTopic":"cmnd/tasmotas/"}}

TO REPRODUCE

Steps to reproduce the behavior: Configure GPIO_DSB on GPIO21

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen.

SCREENSHOTS

If applicable, add screenshots to help explain your problem.

ADDITIONAL CONTEXT

Add any other context about the problem here.

(Please, remember to close the issue when the problem has been addressed)

arendst commented 2 years ago

Nice error. It fails on all GPIOs

Another Core 2.x with Tasmota used libraries issue.

Jason2866 commented 2 years ago

Used provided Template {"NAME":"ESP32-DevKit","GPIO":[1,1,1,1,0,1,1,1,0,1,1,1,1,1,0,1,0,1312,1,1,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1],"FLAG":0,"BASE":1} and get correct sensor readings now. Bug fix confirmed.

mikep1998 commented 2 years ago

nice recovery!

arendst commented 2 years ago

@mikep1998 for my understanding how did you get the backtrace decodes? I know the map file but this info is way more useful!

mikep1998 commented 2 years ago

yes it is very useful. I'm using visual code and platformio. These have a ESP32 exception decoder. You can find all the information here. https://community.platformio.org/t/espressif-32-dev-platform-1-12-0/12610 You just install the filter and then run 'platformio.exe device monitor' in terminal. When it sees a backtrace it automatically decodes it.

barbudor commented 2 years ago

Problem is that you need to have the ESP connected full time on a PC running vscode, waiting for the crash It would be great if we can have this from a serial capture or from the details in the INFO message

mikep1998 commented 2 years ago

@barbudor How do you get a serial capture? Can this be done remotely? Or is this just from the web console?

barbudor commented 2 years ago

No from the web, from the serial. Sometime I have up to 2 or 3 ESP connected to my Linux box and running a serial terminal with logging to file. You can use an old raspi Or even another ESP such as tasmota using tcpbridge to get the serial log over network

mikep1998 commented 2 years ago

Wow, I looked at tcpbridge but did not understand how to view the data on the side of the network. So I just wrote my own to read the serial port and log it using tasmota. then I just viewed it on tasmota web console. It work pretty good.

mikep1998 commented 2 years ago

Are you running Platformio on linus? or something else?