Nurgak / IoT-RGB-LED-Matrix

Firmware for a 32x32 RGB LED Matrix controller based on an ESP32
13 stars 3 forks source link

Continous crashes #4

Open toblum opened 5 years ago

toblum commented 5 years ago

Hi @Nurgak,

I stumbled over your well documented project and tried to make it work with my matrix, but have problems to run it stable.

If I compile it using the latest ESP32 core it just continously reboots with an assertion error. If I'm using an older core it works for a short time, even shows the clock for 3 seconds, but then reboots.

Connecting to xxxxxxxxxxxxxxxxxxxxx
.[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 4 - STA_CONNECTED
[D][WiFiGeneric.cpp:345] _eventCallback(): Event: 7 - STA_GOT_IP
[D][WiFiGeneric.cpp:389] _eventCallback(): STA IP: 192.168.0.84, MASK: 255.255.255.0, GW: 192.168.0.1
.
WiFi connected
IP address: 192.168.0.84
Attempting MQTT connection...
Connected
Guru Meditation Error: Core  1 panic'ed (Interrupt wdt timeout on CPU1)
Core 1 register dump:
PC      : 0x40081264  PS      : 0x00050034  A0      : 0x40081790  A1      : 0x3ffc0bf0
A2      : 0x00000003  A3      : 0x00000001  A4      : 0x000000ff  A5      : 0x3ffc0be0
A6      : 0x00000001  A7      : 0x3ffc5514  A8      : 0x3ff60000  A9      : 0x3ff5f000
A10     : 0x3ffc1124  A11     : 0x20000000  A12     : 0x00000400  A13     : 0x3ffc0bd0
A14     : 0x3ffc0c18  A15     : 0x00000001  SAR     : 0x00000011  EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000  LBEG    : 0x400d1d82  LEND    : 0x400d1e26  LCOUNT  : 0x00000000
Core 1 was running in ISR context:
EPC1    : 0x40121939  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x40081264

Backtrace: 0x40081264:0x3ffc0bf0 0x4008178d:0x3ffc0c10 0x40121936:0x00000000

Core 0 register dump:
PC      : 0x40145b12  PS      : 0x00060434  A0      : 0x8008d692  A1      : 0x3ffcf820
A2      : 0x00000008  A3      : 0x00000000  A4      : 0x00000001  A5      : 0x3ffcfe64
A6      : 0x00000000  A7      : 0x00000001  A8      : 0x3ffc5484  A9      : 0x3ffc5468
A10     : 0x00000000  A11     : 0x00000001  A12     : 0x8008bb14  A13     : 0x3ffb8c30
A14     : 0x00000000  A15     : 0x3ffcf4e0  SAR     : 0x00000000  EXCCAUSE: 0x00000006
EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000

Backtrace: 0x40145b12:0x3ffcf820 0x4008d68f:0x3ffcf840

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

rst:0xc (SW_CPU_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:952
load:0x40078000,len:6084
load:0x40080000,len:7944
entry 0x40080310
[E][WiFiUdp.cpp:52] begin(): could not create socket: 105
[E][ArduinoOTA.cpp:112] begin(): udp bind failed

Did you experience such behaviour too? Do I have to use a defined version of PubSubClient or ESP32 core?

Best regards Tobias

Nurgak commented 5 years ago

Hi @toblum,

I haven't encountered this issue. It looks like the watch dog timer on CPU 1 is not being fed enough. Core 1 is dedicated for the display update, so you can try to lower the refresh rate and see if it improves the behaviour and work out the bug from there. The display update is pushed to its limit it seems.

Cheers Karl

toblum commented 5 years ago

HI Karl,

thank you for your quick answer. I'm not sure were to tweak the refresh rate.

If I set https://github.com/Nurgak/IoT-RGB-LED-Matrix/blob/b54c5e254e10dc6463638fc6ebbb146b841fa295/IoTRGBLEDMatrix.ino#L102 to 2 instead of 1 it seems to run stable (despite some MQTT connection issues, not sure if these are related) but flickers like hell. Is there a better place to finetune the rate?

Best regards Tobias

Nurgak commented 5 years ago

It seems the update rate is really pushing the ESP. Lowering isn't really an option as you start noticing the flicker, as you say.

You could try this line: https://github.com/Nurgak/IoT-RGB-LED-Matrix/blob/b54c5e254e10dc6463638fc6ebbb146b841fa295/config_dummy.h#L27

It's strange that it crashes on your side. I have two matrices working fine. Could you check if you have any debugging output enabled in Arduino IDE? That could add some overhead maybe.

toblum commented 5 years ago

I tried with many combiations of these values but didn't find a working one. Some are flickering, others run instable. I'm not sure what is different in my setup. I ordered another ESP32 just in case that's the cause. I also changed the power supply, no change.

Debug output isn't enabled.

Regards Tobias

abdusalam-naas commented 3 years ago

I faced the same problem I commented out all arduino OTA related lines then it worked