widapro / pixel_led_mqtt_panel

Pixel dot screen with mqtt
MIT License
40 stars 14 forks source link

Soft WDT reset #7

Open jasondreher opened 4 years ago

jasondreher commented 4 years ago

Getting "Soft WDT reset" and cant get around this, I added a few "yield();"s in the mqtt file but that did not help. Any idea what I can do to fix this?

13:52:19.471 -> IP address: 192.168.0.26
13:52:19.506 -> subscribe objects
13:52:19.506 -> New message arrived
13:52:19.506 -> wled/zone0_text
13:52:19.506 -> hi
13:52:19.506 -> zone0 set new Text
13:52:22.484 -> 
13:52:22.484 -> Soft WDT reset
13:52:22.484 -> 
13:52:22.484 -> >>>stack>>>
13:52:22.484 -> 
13:52:22.484 -> ctx: cont
13:52:22.484 -> sp: 3ffffd80 end: 3fffffc0 offset: 01b0
13:52:22.484 -> 3fffff30:  0000000f 00184623 3fff00f4 3ffee934  
widapro commented 4 years ago

Try to add 'yield();' here:

void loop() {
  yield();
  ArduinoOTA.handle();

and here:

  client.loop();               // MQTT work
  yield();
  delay(1);

If it does not help try to replace 'yield();' to 'delay(1);'

valbuz commented 4 years ago

wether yield nor delay does help. any other ideas?

thanks pat

valbuz commented 4 years ago

Hi widapro

Please can you help with:

client.loop();

I can't get running my wemos. Still Soft Reset. Greater Delay doesn't help. Is there a workaround to get this working?

thanks for help pat

lemiks commented 4 years ago

Try to add 'yield();' here:

void loop() {
  yield();
  ArduinoOTA.handle();

and here:

  client.loop();               // MQTT work
  yield();
  delay(1);

If it does not help try to replace 'yield();' to 'delay(1);'

tryed any of thease still soft reset

valbuz commented 4 years ago

Hi

Thanks for reply. If you see my first post, i try this already without success

Any other hint?

htvekov commented 4 years ago

Hi' @valbuz, @jasondreher

Just found this nice piece of mqtt max7219 display sw 👍😎

Have just played with it for a few hours, but initially experienced some WDT soft resets as well. When I doubled number af matrixes attached from 4 to 8, I couldn't run sketch at all with custom scroll effects. WDT soft resets everytime, some 10 sec. after startup.

I also tried to add yield and delay in the code without success.

What has worked for me so far, Is to ensure no new MQTT command is send, before custom scroll effect has ended. Alternatively shift from custom to 'standard' scroll effects also solved the issue here.

Probably a timing issue, when scroll effects takes to long (still running) when new MQTT command is recieved ?

Anyway, great software, @widapro 👍👍😎

valbuz commented 4 years ago

Hi @htvekov

Thanks for your answer. But for me, i doesn't send any commands by MQTT. The Sketch reboot's himself after it started. And i'm also defined only 4 matrixes pat

htvekov commented 4 years ago

Hmm... Can't assist much then I'm afraid, @valbuz

I just changed wifi/MQTT credentials, number of MAX_DEVICES and the data pins. Then it worked straight away with 4 matrixes. Only got the WDT timer soft reset problems, when I added a second 4 matrix module to double the display size. How far do you get, before WDT reset kicks in (serial log) ?

widapro commented 3 years ago

The problem happens when 2 scroll effects conflict with each other. I didn't investigate it deeply, but I found a solution. Before sending new information to the second zone I had to send this message:

topic: wled/scrolleffect_without_exit
message: "PA_MESH"

Then I can safely send a message to zone1_text without any WDT crashes.

topic: wled/zone1_text
message: "Hello"