Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix T-Deck trackball crashes #2714

Merged
merged 7 commits into from
Aug 13, 2023
Merged

fix T-Deck trackball crashes #2714

merged 7 commits into from
Aug 13, 2023

Conversation

mverch67
Copy link
Collaborator

@mverch67 mverch67 commented Aug 12, 2023

The T-Deck trackball generates a lot of interrupts in a short time which are handled by inputbroker and event observers. Unfortunately, the event mechanism does not decouple the interrupt handler from the processing logic and thus the event is not handled by an own task but by the interrupt handler itself which leads to crashes (especially during print/log statements).

PR changes:

  • derive TrackballInterruptBase from OSThread
  • comment out the log statements in the code that lead to the crashes.

The stack traces show crashes in CannedMessageModule.cpp, PowerFSM.cpp and Screen.cpp :-

Guru Meditation Error: Core  1 panic'ed (Interrupt wdt timeout on CPU1). 

Core  1 register dump:
PC      : 0x40384342  PS      : 0x00060d34  A0      : 0x80382982  A1      : 0x3fc9c140  
A2      : 0x3fced1bc  A3      : 0x3fcebf90  A4      : 0x00000004  A5      : 0x00060d23  
A6      : 0x00060d23  A7      : 0x00000001  A8      : 0x3fcebf90  A9      : 0x00000018  
A10     : 0x3fcebf90  A11     : 0x00000018  A12     : 0x3fcab168  A13     : 0x00060d23  
A14     : 0x02c9c540  A15     : 0x00ffffff  SAR     : 0x00000004  EXCCAUSE: 0x00000006  
EXCVADDR: 0x00000000  LBEG    : 0x400556d5  LEND    : 0x400556e5  LCOUNT  : 0xfffffffe  
Core  1 was running in ISR context:
EPC1    : 0x421513ff  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x40384342


Backtrace: 0x4038433f:0x3fc9c140 0x4038297f:0x3fc9c160 0x40381cd2:0x3fc9c180 0x420731c8:0x3fc9c1c0 0x420739a5:0x3fc9c210 0x4206adc9:0x3fc9c240 0x4206652d:0x3fc9c270 0x4200a119:0x3fc9c290 0x4200a4fa:0x3fc9c2b0 0x4200a50f:0x3fc9c2d0 0x42150849:0x3fc9c2f0 0x4200a199:0x3fc9c310 0x4200a2c1:0x3fc9c350 0x42024621:0x3fc9c3c0 0x4214e08d:0x3fc9c3e0 0x420133f7:0x3fc9c400 0x4214da65:0x3fc9c420 0x4214daa9:0x3fc9c440 0x42013c7d:0x3fc9c460 0x42013ce0:0x3fc9c490 0x4215098d:0x3fc9c4b0 0x40375985:0x3fc9c4d0 0x403759aa:0x3fc9c4f0 0x40379d2d:0x3fc9c510 0x4209bad1:0x3fcebd20 0x42066246:0x3fcebd40 0x420158a2:0x3fcebd60 0x4200ae55:0x3fcebd80 0x420346e1:0x3fcebdb0 0x420149ea:0x3fcebde0 0x4206b1b5:0x3fcebe00

  #0  0x4038433f:0x3fc9c140 in vListInsert at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/list.c:182
  #1  0x4038297f:0x3fc9c160 in vTaskPlaceOnEventList at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/tasks.c:3566
  #2  0x40381cd2:0x3fc9c180 in xQueueSemaphoreTake at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/queue.c:1679
  #3  0x420731c8:0x3fc9c1c0 in uart_tx_all at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/uart.c:1220
  #4  0x420739a5:0x3fc9c210 in uart_tx_all at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/uart.c:1190
      (inlined by) uart_write_bytes at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/uart.c:1249
  #5  0x4206adc9:0x3fc9c240 in uartWrite at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:425
  #6  0x4206652d:0x3fc9c270 in HardwareSerial::write(unsigned char) at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.cpp:528
  #7  0x4200a119:0x3fc9c290 in RedirectablePrint::write(unsigned char) at src/RedirectablePrint.cpp:36
  #8  0x4200a4fa:0x3fc9c2b0 in SerialConsole::write(unsigned char) at src/SerialConsole.h:24
  #9  0x4200a50f:0x3fc9c2d0 in non-virtual thunk to SerialConsole::write(unsigned char) at ??:?
  #10 0x42150849:0x3fc9c2f0 in Print::write(unsigned char const*, unsigned int) at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/Print.cpp:42
  #11 0x4200a199:0x3fc9c310 in Print::write(char const*, unsigned int) at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/Print.h:72
      (inlined by) RedirectablePrint::vprintf(char const*, __va_list_tag) at src/RedirectablePrint.cpp:59
  #12 0x4200a2c1:0x3fc9c350 in RedirectablePrint::log(char const*, char const*, ...) at src/RedirectablePrint.cpp:107
  #13 0x42024621:0x3fc9c3c0 in CannedMessageModule::handleInputEvent(_InputEvent const*) at src/modules/CannedMessageModule.cpp:149
  #14 0x4214e08d:0x3fc9c3e0 in CallbackObserver<CannedMessageModule, _InputEvent const*>::onNotify(_InputEvent const*) at src/Observer.h:49 (discriminator 4)
  #15 0x420133f7:0x3fc9c400 in Observable<_InputEvent const*>::notifyObservers(_InputEvent const*) at src/Observer.h:70
      (inlined by) InputBroker::handleInputEvent(_InputEvent const*) at src/input/InputBroker.cpp:16
  #16 0x4214da65:0x3fc9c420 in CallbackObserver<InputBroker, _InputEvent const*>::onNotify(_InputEvent const*) at src/Observer.h:49 (discriminator 4)
  #17 0x4214daa9:0x3fc9c440 in Observable<_InputEvent const*>::notifyObservers(_InputEvent const*) at src/Observer.h:70
  #18 0x42013c7d:0x3fc9c460 in TrackballInterruptBase::intDownHandler() at src/input/TrackballInterruptBase.cpp:53
  #19 0x42013ce0:0x3fc9c490 in TrackballInterruptImpl1::handleIntDown() at src/input/TrackballInterruptImpl1.cpp:37
  #20 0x4215098d:0x3fc9c4b0 in __onPinInterrupt at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.c:159
  #21 0x40375985:0x3fc9c4d0 in gpio_isr_loop at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/gpio.c:416
  #22 0x403759aa:0x3fc9c4f0 in gpio_intr_service at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/gpio.c:433
  #23 0x40379d2d:0x3fc9c510 in _xt_lowint1 at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/port/xtensa/xtensa_vectors.S:1114
  #24 0x4209bad1:0x3fcebd20 in heap_caps_get_free_size at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c:500
  #25 0x42066246:0x3fcebd40 in EspClass::getFreeHeap() at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/Esp.cpp:141
  #26 0x420158a2:0x3fcebd60 in MemGet::getFreeHeap() at src/memGet.cpp:22
  #27 0x4200ae55:0x3fcebd80 in concurrency::OSThread::run() at src/concurrency/OSThread.cpp:82
  #28 0x420346e1:0x3fcebdb0 in ThreadController::runOrDelay() at .pio/libdeps/t-deck/Thread/ThreadController.cpp:59
  #29 0x420149ea:0x3fcebde0 in loop() at src/main.cpp:813
  #30 0x4206b1b5:0x3fcebe00 in loopTask(void*) at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:50


  
  
Guru Meditation Error: Core  1 panic'ed (Interrupt wdt timeout on CPU1). 

Core  1 register dump:
PC      : 0x40384342  PS      : 0x00060934  A0      : 0x80382982  A1      : 0x3fc9c130  
A2      : 0x3fced1bc  A3      : 0x3fcebf90  A4      : 0x00000004  A5      : 0x00060923  
A6      : 0x00060923  A7      : 0x00000001  A8      : 0x3fcebf90  A9      : 0x00000018  
A10     : 0x3fcebf90  A11     : 0x00000018  A12     : 0x3fcab168  A13     : 0x00060923  
A14     : 0x02c9c540  A15     : 0x00ffffff  SAR     : 0x00000004  EXCCAUSE: 0x00000006  
EXCVADDR: 0x00000000  LBEG    : 0x400556d5  LEND    : 0x400556e5  LCOUNT  : 0xfffffffd  
Core  1 was running in ISR context:
EPC1    : 0x421513b3  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x40384342


Backtrace: 0x4038433f:0x3fc9c130 0x4038297f:0x3fc9c150 0x40381cd2:0x3fc9c170 0x4207317c:0x3fc9c1b0 0x42073959:0x3fc9c200 0x4206ad7d:0x3fc9c230 0x420664e1:0x3fc9c260 0x4200a10d:0x3fc9c280 0x4200a4ee:0x3fc9c2a0 0x4200a503:0x3fc9c2c0 0x421507fd:0x3fc9c2e0 0x4200a18d:0x3fc9c300 0x4200a2b5:0x3fc9c340 0x4200fda0:0x3fc9c3b0 0x4214d961:0x3fc9c3e0 0x420133eb:0x3fc9c400 0x4214da19:0x3fc9c420 0x4214da5d:0x3fc9c440 0x42013cc5:0x3fc9c460 0x42013d04:0x3fc9c490 0x42150941:0x3fc9c4b0 0x40375985:0x3fc9c4d0 0x403759aa:0x3fc9c4f0 0x40379d2d:0x3fc9c510 0x40380d00:0x3fcebb40 0x42069182:0x3fcebb60 0x420336d3:0x3fcebb80 0x42033821:0x3fcebbe0 0x4200fb7a:0x3fcebc20 0x42033f0e:0x3fcebce0 0x4203419a:0x3fcebd00 0x4203428e:0x3fcebd20 0x42010414:0x3fcebd50 0x4200ae5b:0x3fcebd80 0x42034695:0x3fcebdb0 0x420149de:0x3fcebde0 0x4206b169:0x3fcebe00

  #0  0x4038433f:0x3fc9c130 in vListInsert at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/list.c:182
  #1  0x4038297f:0x3fc9c150 in vTaskPlaceOnEventList at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/tasks.c:3566
  #2  0x40381cd2:0x3fc9c170 in xQueueSemaphoreTake at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/queue.c:1679
  #3  0x4207317c:0x3fc9c1b0 in uart_tx_all at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/uart.c:1220
  #4  0x42073959:0x3fc9c200 in uart_tx_all at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/uart.c:1190
      (inlined by) uart_write_bytes at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/uart.c:1249
  #5  0x4206ad7d:0x3fc9c230 in uartWrite at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:425
  #6  0x420664e1:0x3fc9c260 in HardwareSerial::write(unsigned char) at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.cpp:528
  #7  0x4200a10d:0x3fc9c280 in RedirectablePrint::write(unsigned char) at src/RedirectablePrint.cpp:36
  #8  0x4200a4ee:0x3fc9c2a0 in SerialConsole::write(unsigned char) at src/SerialConsole.h:24
  #9  0x4200a503:0x3fc9c2c0 in non-virtual thunk to SerialConsole::write(unsigned char) at ??:?
  #10 0x421507fd:0x3fc9c2e0 in Print::write(unsigned char const*, unsigned int) at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/Print.cpp:42
  #11 0x4200a18d:0x3fc9c300 in Print::write(char const*, unsigned int) at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/Print.h:72
      (inlined by) RedirectablePrint::vprintf(char const*, __va_list_tag) at src/RedirectablePrint.cpp:59
  #12 0x4200a2b5:0x3fc9c340 in RedirectablePrint::log(char const*, char const*, ...) at src/RedirectablePrint.cpp:107
  #13 0x4200fda0:0x3fc9c3b0 in graphics::Screen::handleInputEvent(_InputEvent const*) at src/graphics/Screen.cpp:1906
      (inlined by) graphics::Screen::handleInputEvent(_InputEvent const*) at src/graphics/Screen.cpp:1903
  #14 0x4214d961:0x3fc9c3e0 in CallbackObserver<graphics::Screen, _InputEvent const*>::onNotify(_InputEvent const*) at src/Observer.h:49 (discriminator 4)
  #15 0x420133eb:0x3fc9c400 in Observable<_InputEvent const*>::notifyObservers(_InputEvent const*) at src/Observer.h:70
      (inlined by) InputBroker::handleInputEvent(_InputEvent const*) at src/input/InputBroker.cpp:16
  #16 0x4214da19:0x3fc9c420 in CallbackObserver<InputBroker, _InputEvent const*>::onNotify(_InputEvent const*) at src/Observer.h:49 (discriminator 4)
  #17 0x4214da5d:0x3fc9c440 in Observable<_InputEvent const*>::notifyObservers(_InputEvent const*) at src/Observer.h:70
  #18 0x42013cc5:0x3fc9c460 in TrackballInterruptBase::intRightHandler() at src/input/TrackballInterruptBase.cpp:77
  #19 0x42013d04:0x3fc9c490 in TrackballInterruptImpl1::handleIntRight() at src/input/TrackballInterruptImpl1.cpp:49
  #20 0x42150941:0x3fc9c4b0 in __onPinInterrupt at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.c:159
  #21 0x40375985:0x3fc9c4d0 in gpio_isr_loop at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/gpio.c:416
  #22 0x403759aa:0x3fc9c4f0 in gpio_intr_service at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/gpio.c:433
  #23 0x40379d2d:0x3fc9c510 in _xt_lowint1 at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/port/xtensa/xtensa_vectors.S:1114
  #24 0x40380d00:0x3fcebb40 in _frxt_dispatch at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/port/xtensa/portasm.S:469
  #25 0x42069182:0x3fcebb60 in __yield at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-misc.c:81
  #26 0x420336d3:0x3fcebb80 in OLEDDisplay::drawInternal(short, short, short, short, unsigned char const*, unsigned short, unsigned short) at .pio/libdeps/t-deck/ESP8266 and ESP32 OLED driver for SSD1306 displays/src/OLEDDisplay.cpp:1105
      (inlined by) OLEDDisplay::drawStringInternal(short, short, char const*, unsigned short, unsigned short, bool) at .pio/libdeps/t-deck/ESP8266 and ESP32 OLED driver for SSD1306 displays/src/OLEDDisplay.cpp:610
  #27 0x42033821:0x3fcebbe0 in OLEDDisplay::drawString(short, short, String const&) at .pio/libdeps/t-deck/ESP8266 and ESP32 OLED driver for SSD1306 displays/src/OLEDDisplay.cpp:648
  #28 0x4200fb7a:0x3fcebc20 in graphics::drawNodeInfo(OLEDDisplay*, OLEDDisplayUiState*, short, short) at src/graphics/Screen.cpp:456
      (inlined by) drawNodeInfo at src/graphics/Screen.cpp:906
  #29 0x42033f0e:0x3fcebce0 in OLEDDisplayUi::drawFrame() at .pio/libdeps/t-deck/ESP8266 and ESP32 OLED driver for SSD1306 displays/src/OLEDDisplayUi.cpp:438
  #30 0x4203419a:0x3fcebd00 in OLEDDisplayUi::tick() at .pio/libdeps/t-deck/ESP8266 and ESP32 OLED driver for SSD1306 displays/src/OLEDDisplayUi.cpp:338
  #31 0x4203428e:0x3fcebd20 in OLEDDisplayUi::update() at .pio/libdeps/t-deck/ESP8266 and ESP32 OLED driver for SSD1306 displays/src/OLEDDisplayUi.cpp:296
  #32 0x42010414:0x3fcebd50 in graphics::Screen::runOnce() at src/graphics/Screen.cpp:1179
  #33 0x4200ae5b:0x3fcebd80 in concurrency::OSThread::run() at src/concurrency/OSThread.cpp:85
  #34 0x42034695:0x3fcebdb0 in ThreadController::runOrDelay() at .pio/libdeps/t-deck/Thread/ThreadController.cpp:59
  #35 0x420149de:0x3fcebde0 in loop() at src/main.cpp:813
  #36 0x4206b169:0x3fcebe00 in loopTask(void*) at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:50




Guru Meditation Error: Core  1 panic'ed (Interrupt wdt timeout on CPU1). 

Core  1 register dump:
PC      : 0x40384348  PS      : 0x00060534  A0      : 0x80382982  A1      : 0x3fc9c140  
A2      : 0x3fcecb54  A3      : 0x3fcebf90  A4      : 0x00000004  A5      : 0x00060523  
A6      : 0x00060523  A7      : 0x00000001  A8      : 0x3fcebf90  A9      : 0x00000018  
A10     : 0x3fcebf90  A11     : 0x00000018  A12     : 0x3fcab168  A13     : 0x00060523  
A14     : 0x02c9c540  A15     : 0x00ffffff  SAR     : 0x00000004  EXCCAUSE: 0x00000006  
EXCVADDR: 0x00000000  LBEG    : 0x400556d5  LEND    : 0x400556e5  LCOUNT  : 0xfffffffe  
Core  1 was running in ISR context:
EPC1    : 0x4215139f  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x40384348


Backtrace: 0x40384345:0x3fc9c140 0x4038297f:0x3fc9c160 0x40381cd2:0x3fc9c180 0x4206ad5b:0x3fc9c1c0 0x420664cd:0x3fc9c1f0 0x4200a109:0x3fc9c210 0x4200a4ea:0x3fc9c230 0x4200a4ff:0x3fc9c250 0x421507e9:0x3fc9c270 0x42066c4b:0x3fc9c290 0x4200a335:0x3fc9c330 0x42009ab7:0x3fc9c3a0 0x42034443:0x3fc9c3c0 0x42034495:0x3fc9c3e0 0x420133c5:0x3fc9c400 0x4214da05:0x3fc9c420 0x4214da49:0x3fc9c440 0x42013c95:0x3fc9c460 0x42013ce0:0x3fc9c490 0x4215092d:0x3fc9c4b0 0x40375985:0x3fc9c4d0 0x403759aa:0x3fc9c4f0 0x40379d2d:0x3fc9c510 0x4206abd8:0x3fcebd90 0x42066449:0x3fcebdc0 0x420664f1:0x3fcebde0 0x4206b15e:0x3fcebe00

  #0  0x40384345:0x3fc9c140 in vListInsert at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/list.c:166 (discriminator 1)
  #1  0x4038297f:0x3fc9c160 in vTaskPlaceOnEventList at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/tasks.c:3566
  #2  0x40381cd2:0x3fc9c180 in xQueueSemaphoreTake at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/queue.c:1679
  #3  0x4206ad5b:0x3fc9c1c0 in uartWrite at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:424 (discriminator 1)
  #4  0x420664cd:0x3fc9c1f0 in HardwareSerial::write(unsigned char) at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.cpp:528
  #5  0x4200a109:0x3fc9c210 in RedirectablePrint::write(unsigned char) at src/RedirectablePrint.cpp:36
  #6  0x4200a4ea:0x3fc9c230 in SerialConsole::write(unsigned char) at src/SerialConsole.h:24
  #7  0x4200a4ff:0x3fc9c250 in non-virtual thunk to SerialConsole::write(unsigned char) at ??:?
  #8  0x421507e9:0x3fc9c270 in Print::write(unsigned char const*, unsigned int) at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/Print.cpp:42
  #9  0x42066c4b:0x3fc9c290 in Print::printf(char const*, ...) at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/Print.cpp:70
  #10 0x4200a335:0x3fc9c330 in RedirectablePrint::log(char const*, char const*, ...) at src/RedirectablePrint.cpp:96
  #11 0x42009ab7:0x3fc9c3a0 in powerEnter() at src/PowerFSM.cpp:180
  #12 0x42034443:0x3fc9c3c0 in Fsm::make_transition(Transition*) at .pio/libdeps/t-deck/arduino-fsm/Fsm.cpp:159
  #13 0x42034495:0x3fc9c3e0 in Fsm::trigger(int) at .pio/libdeps/t-deck/arduino-fsm/Fsm.cpp:100
  #14 0x420133c5:0x3fc9c400 in InputBroker::handleInputEvent(_InputEvent const*) at src/input/InputBroker.cpp:15
  #15 0x4214da05:0x3fc9c420 in CallbackObserver<InputBroker, _InputEvent const*>::onNotify(_InputEvent const*) at src/Observer.h:49 (discriminator 4)
  #16 0x4214da49:0x3fc9c440 in Observable<_InputEvent const*>::notifyObservers(_InputEvent const*) at src/Observer.h:70
  #17 0x42013c95:0x3fc9c460 in TrackballInterruptBase::intLeftHandler() at src/input/TrackballInterruptBase.cpp:69
  #18 0x42013ce0:0x3fc9c490 in TrackballInterruptImpl1::handleIntLeft() at src/input/TrackballInterruptImpl1.cpp:45
  #19 0x4215092d:0x3fc9c4b0 in __onPinInterrupt at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.c:159
  #20 0x40375985:0x3fc9c4d0 in gpio_isr_loop at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/gpio.c:416
  #21 0x403759aa:0x3fc9c4f0 in gpio_intr_service at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/driver/gpio.c:433
  #22 0x40379d2d:0x3fc9c510 in _xt_lowint1 at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/freertos/port/xtensa/xtensa_vectors.S:1114
  #23 0x4206abd8:0x3fcebd90 in uartAvailable at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-uart.c:317 (discriminator 1)
  #24 0x42066449:0x3fcebdc0 in HardwareSerial::available() at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.cpp:476
  #25 0x420664f1:0x3fcebde0 in serialEventRun() at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/HardwareSerial.cpp:116
  #26 0x4206b15e:0x3fcebe00 in loopTask(void*) at /home/manuel/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:51 (discriminator 1)

@github-actions
Copy link
Contributor

🤖 Pull request artifacts

file commit
pr2714-firmware-2.2.1.92d8cec.zip 92d8cec

thebentern added a commit to meshtastic/artifacts that referenced this pull request Aug 12, 2023
@mverch67
Copy link
Collaborator Author

Just thinking...
If TrackballInterruptBase would be derived from OSThread then one could just set some volatile flags within the interrupt handlers that are polled periodically by the trackball thread which then generates the notifications to the observers. This would decouple the interrupt handler from the processing logic.

Copy link
Contributor

@thebentern thebentern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Things are pretty chatty anyway. We should probably go back and cull some logging at some point.

@mverch67 mverch67 changed the title fix/workaround for trackball crashes fix trackball crashes Aug 12, 2023
@mverch67 mverch67 changed the title fix trackball crashes fix T-Deck trackball crashes Aug 12, 2023
@thebentern thebentern merged commit fb5f2e4 into master Aug 13, 2023
56 checks passed
@mverch67 mverch67 deleted the trackball-crash branch August 13, 2023 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants