2004 LCD crashing ESP32 while running DMX receive code with DMX/ESP32 thing.

Hey y’all,

I’m using the DMX ESP32 thing with an ESP32 thing from Sparkfun. The DMX receive code works great, but when I try to write the data to an LCD over I2C, I get core panics. I know the DMX library uses Timer0 as an interrupt to look for the start code, is this timer shared with an I2C timer? I tried changing timers, but had no better luck. I thought a part of it would be due to the incredibly slow write time to the LCD, but if I take out the write code and replace it with a 100ms delay, the processor seems to run fine. So, I don’t think it’s due to not reading the buffer within a certain time frame. A workaround I have is to stop the timer/interrupt, write to LCD, then restart the timer/interrupt. It stops crashing, but I know I’m missing frames. Any ideas? Thanks!

Decoding stack results:

0x4008c3d4: invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 155

0x4008c601: abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c line 170

0x400888ab: xQueueGenericReceive at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c line 1446

0x400d3222: removeApbChangeCallback at C:\Users\Home\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\esp32-hal-cpu.c line 96

0x400d36f3: uartEnd at C:\Users\Home\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\esp32-hal-uart.c line 230

0x400d2969: HardwareSerial::end() at C:\Users\Home\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\HardwareSerial.cpp line 87

0x400d2991: HardwareSerial::begin(unsigned long, unsigned int, signed char, signed char, bool, unsigned long) at C:\Users\Home\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\HardwareSerial.cpp line 40

0x40080f4a: onTimer() at C:\Users\Home\Documents\Arduino\libraries\SparkFunDMX-master\src\SparkFunDMX.cpp line 66

0x40081b5d: __timerISR at C:\Users\Home\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\esp32-hal-timer.c line 88

0x40089a9f: vTaskEnterCritical at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c line 4190

0x40089130: xEventGroupWaitBits at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/event_groups.c line 360

0x400d2158: i2cProcQueue at C:\Users\Home\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\esp32-hal-i2c.c line 1279

0x400d24e3: i2cWrite at C:\Users\Home\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\esp32-hal-i2c.c line 1621

0x400d1789: TwoWire::writeTransmission(unsigned short, unsigned char*, unsigned short, bool) at C:\Users\Home\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\Wire\src\Wire.cpp line 133

0x400d17bd: TwoWire::endTransmission(bool) at C:\Users\Home\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\Wire\src\Wire.cpp line 158

0x400d1819: TwoWire::endTransmission() at C:\Users\Home\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\Wire\src\Wire.cpp line 316

0x400d18bf: LiquidCrystal_I2C::expanderWrite(unsigned char) at C:\Users\Home\Documents\Arduino\libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp line 255

0x400d18e6: LiquidCrystal_I2C::pulseEnable(unsigned char) at C:\Users\Home\Documents\Arduino\libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp line 259

0x400d1913: LiquidCrystal_I2C::write4bits(unsigned char) at C:\Users\Home\Documents\Arduino\libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp line 249

0x400d193b: LiquidCrystal_I2C::send(unsigned char, unsigned char) at C:\Users\Home\Documents\Arduino\libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp line 244

0x400d194c: LiquidCrystal_I2C::command(unsigned char) at C:\Users\Home\Documents\Arduino\libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp line 233

0x400d19ba: LiquidCrystal_I2C::setCursor(unsigned char, unsigned char) at C:\Users\Home\Documents\Arduino\libraries\LiquidCrystal_I2C\LiquidCrystal_I2C.cpp line 142

0x400d103a: input_set_type() at C:\Users\Home\Documents\Arduino\LCD_DMX/LCD_DMX.ino line 124

0x400d11ef: loop() at C:\Users\Home\Documents\Arduino\LCD_DMX/LCD_DMX.ino line 83

0x400d30e9: loopTask(void*) at C:\Users\Home\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\main.cpp line 19

0x40088b85: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143