MajicDesigns / MD_Parola

Library for modular scrolling LED matrix text displays
GNU Lesser General Public License v2.1
438 stars 135 forks source link

Crash on ESP8266 using parola_zone_mesg example #39

Closed delhoume closed 5 years ago

delhoume commented 5 years ago

Crash on ESP8266 (wemos d1 mini) using parola_zone_mesg example

I have a crash on the example for effects // PA_RANDOM, // PA_SLICE,

all I changed is

define HARDWARE_TYPE MD_MAX72XX::ICSTATION_HW

define CLK_PIN D8 // or SCK

define DATA_PIN D7 // or MOSI

define CS_PIN D5 // or SS

MD_Parola P = MD_Parola(HARDWARE_TYPE, DATA_PIN, CLK_PIN, CS_PIN, MAX_DEVICES);

I am using 8 devices.

Your Environment

Library Version:MD_Parola and MD_MAX72XX at version 3.0.2 Arduino IDE version: 1.8.5 Hardware model/type: OS and Version:MacOS

Steps to Reproduce

Using example provided crashes for two values of effect. Commenting the two effect gives no crash.

Expected Behaviour

no crash

Actual Behaviour

Explain what happens instead. Provide log messages if relevant.

Code Demonstrating the Issue

Insert your code here.
delhoume commented 5 years ago

Here is a stack when MD_RANDOM is not commented and trace for effect is added

PRINT(" inFX ", inFX); PRINT(" outFX ", outFX);

Z3 from 6 to 7 inFX 1 outFX 2 New Z0: M1 @ 56 inFX 3 outFX 4 New Z1: M2 @ 1566 Soft WDT reset

stack>>>

ctx: cont sp: 3ffffcd0 end: 3fffffc0 offset: 01b0 3ffffe80: 00000000 00000001 0000000f 4010018d
3ffffe90: 00000000 0000000d 0000000f 40201532
3ffffea0: 00000001 00000032 3ffee528 402027bc
3ffffeb0: 00000001 00000000 0000000e 00000007
3ffffec0: 00000001 00000002 3ffee494 40204eb5

MajicDesigns commented 5 years ago

The WDT is being reset with long animations. The reason is that inside the loop() function that example has the following construct:

   while (!P.getZoneStatus(curZone))
    P.displayAnimate();

which will not exit loop() until the the animation is completed. You can either restructure loop() to be more like most of the other examples (ie, not waiting but executed once only through each loop()) or you can disable the WDT somewhere in setup() function.

delhoume commented 5 years ago

Thank you for your answer, disabling the software watchdog does not suffice, so I might rewrite the loop. Here is some info on WDs for ESP8266, in case you are not aware of it...

https://techtutorialsx.com/2017/01/21/esp8266-watchdog-functions/

MajicDesigns commented 5 years ago

Closed due to inactivity from OP.

thisismyusername123445 commented 5 years ago

i ran into the same problem, solved it by feeding the WDT:

  while (!P.getZoneStatus(2) || !P.getZoneStatus(1) || !P.getZoneStatus(0)){
   P.displayAnimate();
   ESP.wdtFeed();
  }

This solved the problem for me.