Can debug for a while then ESP32 board is semi-bricked

Hi,
I have not characterized this to a fully repeatable procedure yet but here is what has been happening. I clean, compile, start debugging hit a breakpoint, step thru some code, step into and over some functions. I am using Teraterm to access my ESP32 over the USB serial port.

I fix a bug. Stop the debugger. Rebuild. When I try to restart debugging my ESP32 panics and enters a reboot loop. I can get it out of the boot loop by randomly trying some of these:
Power cycle the debugger
Power cycle the ESP32 board
Restart my PC
Upload my program over serial instead of letting the debugger do it
Start up the Arduino IDE and load a small sketch.

I have always been able to get back to debugging on PlatformIO but that does not last too long. I am attaching my platform.ini and several other files.

Sorry about the big cut/paste, is there a preferred way to do this?

Thanks,
Tony

PlatformIO

[env:esp32dev]
debug_build_flags = -Og -ggdb -g3 -D ESP32_Board
platform = espressif32
board = nodemcu-32s
build_type = debug
debug_tool = esp-prog
debug_init_break = tbreak setup
framework = arduino
monitor_speed = 115200
upload_port = COM5

Debug Console

Reading symbols from d:\AllDev\DevSW\Trains-Aurduino\platformIO\DCCLogicAnalyzerWorkspace\Projects\DCC_LogicAnalyzer\.pio\build\esp32dev\firmware.elf...
done.
PlatformIO Unified Debugger -> https://bit.ly/pio-debug
PlatformIO: debug_tool = esp-prog
PlatformIO: Initializing remote target...
Open On-Chip Debugger  v0.10.0-esp32-20210721 (2021-07-21-13:35)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
adapter speed: 20000 kHz

WARNING: boards/esp-wroom-32.cfg is deprecated, and may be removed in a future release.
adapter speed: 5000 kHz

Info : tcl server disabled
Info : telnet server disabled
Info : clock speed 5000 kHz
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : accepting 'gdb' connection from pipe
Warn : No symbols for FreeRTOS!
Info : esp32.cpu0: Target halted, PC=0x4000854A, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 64 KB
Info : Flash mapping 1: 0x30018 -> 0x400d0018, 132 KB
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu0.flash' size 4096 KB
Info : Using flash bank 'esp32.cpu0.flash' size 4096 KB
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 64 KB
Info : Flash mapping 1: 0x30018 -> 0x400d0018, 132 KB
Info : Using flash bank 'esp32.cpu0.irom' size 136 KB
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 64 KB
Info : Flash mapping 1: 0x30018 -> 0x400d0018, 132 KB
Info : Using flash bank 'esp32.cpu0.drom' size 68 KB
Info : New GDB Connection: 1, Target esp32.cpu0, state: halted
0x4000854a in ?? ()
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Flash mapping 0: 0x10020 -> 0x3f400020, 64 KB
Info : Flash mapping 1: 0x30018 -> 0x400d0018, 132 KB
Flash mapping 0: 0x10020 -> 0x3f400020, 64 KB
Flash mapping 1: 0x30018 -> 0x400d0018, 132 KB
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : Auto-detected flash bank 'esp32.cpu1.flash' size 4096 KB
Info : Using flash bank 'esp32.cpu1.flash' size 4096 KB
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Auto-detected flash bank 'esp32.cpu1.flash' size 4096 KB
Using flash bank 'esp32.cpu1.flash' size 4096 KB
** Programming Started **
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : PROF: Data transferred in 156.246 ms @ 128.003 KB/s
PROF: Data transferred in 156.246 ms @ 128.003 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Programming Finished **
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Programming Finished **
** Verify Started **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Verified OK **
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : PROF: Data transferred in 31.262 ms @ 127.951 KB/s
PROF: Data transferred in 31.262 ms @ 127.951 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Programming Finished **
** Verify Started **
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Programming Finished **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Verified OK **
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : PROF: Data transferred in 62.499 ms @ 128.002 KB/s
PROF: Data transferred in 62.499 ms @ 128.002 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Programming Finished **
** Verify Started **
** Programming Finished **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Verified OK **
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
** Programming Started **
** Programming Started **
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : PROF: Data transferred in 1625.46 ms @ 162.416 KB/s
PROF: Data transferred in 1625.46 ms @ 162.416 KB/s
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Programming Finished **
** Verify Started **
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Programming Finished **
** Verify Started **
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Verified OK **
esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
** Verified OK **
Info : JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu0 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
JTAG tap: esp32.cpu1 tap/device found: 0x120034e5 (mfg: 0x272 (Tensilica), part: 0x2003, ver: 0x1)
Info : esp32.cpu0: Debug controller was reset.
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Debug controller was reset.
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
Info : esp32.cpu0: Core was reset.
esp32.cpu0: Target halted, PC=0x500000CF, debug_reason=00000000
esp32.cpu0: Core was reset.
Info : esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
Info : esp32.cpu1: Debug controller was reset.
Info : esp32.cpu1: Core was reset.
esp32.cpu0: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Debug controller was reset.
esp32.cpu1: Core was reset.
Info : esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
esp32.cpu1: Target halted, PC=0x40000400, debug_reason=00000000
Temporary breakpoint 1 at 0x400d2e84: file src\DCCAnalyzer-LA.cpp, line 1979.
PlatformIO: Initialization completed
PlatformIO: Resume the execution to `debug_init_break = tbreak setup`
PlatformIO: More configuration options -> https://bit.ly/pio-debug
Note: automatically using hardware breakpoints for read-only addresses.
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x40086F9F, debug_reason=00000000
Info : esp32.cpu0: Detected debug stubs @ 3ffc1c90
Info : Set GDB target to 'esp32.cpu0'
esp32.cpu0: Target halted, PC=0x40086F9F, debug_reason=00000000
esp32.cpu0: Detected debug stubs @ 3ffc1c90
Set GDB target to 'esp32.cpu0'
Info : esp32.cpu1: Target halted, PC=0x400D2E84, debug_reason=00000001
Warn : Not full dbg stub table 1 of 2
esp32.cpu1: Target halted, PC=0x400D2E84, debug_reason=00000001
Not full dbg stub table 1 of 2
Warn : Not full dbg stub table 1 of 2
[New Thread 1073465364]
[New Thread 1073463952]
[New Thread 1073468060]
[New Thread 1073456088]
[New Thread 1073445228]
[New Thread 1073454676]
[New Thread 1073462540]
[Switching to Thread 1073447000]
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001

Temporary breakpoint
1, setup () at src\DCCAnalyzer-LA.cpp:1979
1979	{
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x400855FC, debug_reason=00000000
Info : Set GDB target to 'esp32.cpu0'
Info : esp32.cpu1: Target halted, PC=0x400E8E24, debug_reason=00000001
esp32.cpu0: Target halted, PC=0x400855FC, debug_reason=00000000
Set GDB target to 'esp32.cpu0'
esp32.cpu1: Target halted, PC=0x400E8E24, debug_reason=00000001

Program received signal
SIGTRAP, Trace/breakpoint trap.
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
Info : esp32.cpu0: Target halted, PC=0x400928DA, debug_reason=00000001
mcpwm_capture_signal_get_value (mcpwm_num=(unknown: 1073078272), cap_sig=(unknown: 1073422032)) at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/driver/mcpwm.c:683
683	/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/driver/mcpwm.c: No such file or directory.

Terminal Console after build

> Executing task in folder DCC_LogicAnalyzer: C:\Users\tbvin\.platformio\penv\Scripts\platformio.exe debug <

Processing esp32dev (platform: espressif32; board: nodemcu-32s; framework: arduino)
--------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/nodemcu-32s.html
PLATFORM: Espressif 32 (3.5.0) > NodeMCU-32S
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 3.10006.210326 (1.0.6)
 - tool-esptoolpy 1.30100.210531 (3.1.0)
 - toolchain-xtensa32 2.50200.97 (5.2.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 28 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <EEPROM> 1.0.3
Building in debug mode
Retrieving maximum program size .pio\build\esp32dev\firmware.elf
Checking size .pio\build\esp32dev\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]   5.6% (used 18328 bytes from 327680 bytes)     
Flash: [==        ]  19.6% (used 257338 bytes from 1310720 bytes)   
=================== [SUCCESS] Took 1.44 seconds ===================

Terminal will be reused by tasks, press any key to close it.

> Executing task in folder DCC_LogicAnalyzer: C:\Users\tbvin\.platformio\penv\Scripts\platformio.exe debug <

Processing esp32dev (platform: espressif32; board: nodemcu-32s; framework: arduino)
--------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/nodemcu-32s.html
PLATFORM: Espressif 32 (3.5.0) > NodeMCU-32S
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
 - framework-arduinoespressif32 3.10006.210326 (1.0.6)
 - tool-esptoolpy 1.30100.210531 (3.1.0)
 - toolchain-xtensa32 2.50200.97 (5.2.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 28 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <EEPROM> 1.0.3
Building in debug mode
Retrieving maximum program size .pio\build\esp32dev\firmware.elf
Checking size .pio\build\esp32dev\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [=         ]   5.6% (used 18328 bytes from 327680 bytes)     
Flash: [==        ]  19.7% (used 257726 bytes from 1310720 bytes)   
=================== [SUCCESS] Took 1.47 seconds ===================

Terminal will be reused by tasks, press any key to close it.



ESP32 Panic, the first lines are from a working project, then after
Starting the debugger panic lines
------------------------------------
1111111111111 0 11111111 0 00000000 0 11111111 1    
Idle Pkt

1111111111111 0 11111111 0 00000000 0 11111111 1    
Idle Pkt

1111111111111 0 11111111 0 00000000 0 11111111 1    
Idle Pkt

1111111111111 0 11111111 0 00000000 0 11111111 1    
Idle Pkt

1111111111111 0 11111111 0 00000000 0 11111111 1    
Idle Pkt

1111111111111 0 11111111 0 00000000 0 11111111 1    
Idle Pkt

1111111111111 0 11111111 0 00000000 0 11111111 1    
Idle Pkt

1111111111111 0 11111111 0 00000000 0 11111111 1    
Idle Pkt

1111111111111 0 11111111 0 00000000 0 11111111 1    
Idle Pkt

1111111111111 0 11111111 0 00000000 0 11111111 1    
Idle Pkt

1111111111111 0 11111111 0 00000000 0 11111111 1    
Idle Pkt

1111111111111 0 11111111 0 00000000 0 11111111 1    
Idle Pkt

1111111111111 0 11111111 0 00000000 0 11111111 1    
Idle Pkt

ets Jun  8 2016 00:22:57

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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
Guru Meditation Error: Core  1 panic'ed (Cache disabled but cached memory region accessed)
Core 1 register dump:
PC      : 0x400e8cec  PS      : 0x00060034  A0      : 0x40083c6c  A1      : 0x3ffbeb40  
A2      : 0x10000000  A3      : 0x00000200  A4      : 0x00040000  A5      : 0x40088758  
A6      : 0x00000000  A7      : 0xffffffff  A8      : 0x8008125a  A9      : 0x00000000  
A10     : 0x00000000  A11     : 0x00000001  A12     : 0x8008aad1  A13     : 0x3ffb1c00  
A14     : 0x00000000  A15     : 0x3ffb1c3c  SAR     : 0x00000015  EXCCAUSE: 0x00000007  
EXCVADDR: 0x00000000  LBEG    : 0x40001609  LEND    : 0x4000160d  LCOUNT  : 0x00000000  
Core 1 was running in ISR context:
EPC1    : 0x4008ac37  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x400e8cec

ELF file SHA256: 0000000000000000

Backtrace: 0x400e8cec:0x3ffbeb40 0x40083c69:0x3ffbeb60 0x4008ac34:0x3ffb1c60 0x4008b36d:0x3ffb1c80 0x4008462c:0x3ffb1ca0 0x400ecc51:0x3ffb1d10 0x400eb521:0x3ffb1d30 0x400eb953:0x3ffb1d50 0x400ea337:0x3ffb1dc0 0x400ea719:0x3ffb1e10 0x400ea847:0x3ffb1e90 0x400e99c1:0x3ffb1ef0 0x400e9e69:0x3ffb1f30 0x400d6375:0x3ffb1f50 0x400d2f64:0x3ffb1f80 0x400d7bb2:0x3ffb1fb0 0x40086595:0x3ffb1fd0

Rebooting...
ets Jun  8 2016 00:22:57

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:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:10124
load:0x40080400,len:5828
entry 0x400806a8
Guru Meditation Error: Core  1 panic'ed (Cache disabled but cached memory region accessed)
Core 1 register dump:
PC      : 0x400e8cec  PS      : 0x00060034  A0      : 0x40083c6c  A1      : 0x3ffbeb40  
A2      : 0x10000000  A3      : 0x3ffb1ed0  A4      : 0x3ff42000  A5      : 0x40088758  
A6      : 0x00000000  A7      : 0xffffffff  A8      : 0x8008125a  A9      : 0x00000000  
A10     : 0x00000000  A11     : 0x00000001  A12     : 0x8008aad1  A13     : 0x3ffb1c80  
A14     : 0x00000000  A15     : 0x3ffb1cbc  SAR     : 0x00000017  EXCCAUSE: 0x00000007  
EXCVADDR: 0x00000000  LBEG    : 0x40001609  LEND    : 0x4000160d  LCOUNT  : 0x00000000  
Core 1 was running in ISR context:
EPC1    : 0x4008ac3d  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x400e8cec

Looks to me as if an interrupt function (such as ones passed to attachInterrupt) is not in IRAM or one of the function it calls is not in IRAM. Add monitor_filters = esp32_exception_decoding and build_type = debug to the platformio.ini, reupload and open the PlatformIO serial monitor again. Do you get a backtrace now?

Thanks maxgerhardt,

I do have the IRAM modifier on my handler function. But I had the eventhandler.begin in my setup() routine and I was not properly shutting down the event handler.

I put the begin in a more appropriate place and when I stop using the eventHandler, I stop it, disable the capture interrupts, and clear pending ones. So I think that will fix it. Works so far but will test further.

Thanks for putting me on the right track. I wish the other tech support I deal with were as good as you guys!

Tony