Start a new topic

"wdt reset" of Arduino/WeMos when executing .setText

I encounter a problem I cannot solve.

I have a function that updates a variable.


void setTextRotationSpeed()
    dtostrf(rotationSpeed, 3, 0, sRotationSpeed); 


This function is called from two different other functions for two different input scenarios.

When the user touches a specific button, rotationSpeed is in-/decremented and setTextRotationSpeed() is executed without any issues.

When the variable is updated via mqtt and the function is called my Wemos D1 Mini does a "wdt reset".

If I replace the variable rotationSpeed inside p08speed01.setText(); with a static string like "abc"the result is the same.

So the issue cannot be with the variable, I think.

Any idea where the issue is comming from or how I can further investigate this?

Maybe some kind of "the Object is not in this scope" even the Arduino IDE does not complain and it is working some times.

I don't think this will help you, but anyway:

ctx: sys 
sp: 3ffff9e0 end: 3fffffb0 offset: 01b0

3ffffb90:  3ffffbcf 0000031e 0000031e 3fff5de2  
3ffffba0:  3fff14a0 0000000d 3fff5de1 40222501  
3ffffbb0:  00000010 3fff14a0 3fff14a0 40221051  
3ffffbc0:  3ffe8820 3fff5dd4 00000000 4022108f  
3ffffbd0:  00000001 7fc40000 3ffffc10 3fff13a0  
3ffffbe0:  3ffe8820 00000000 3fff14a0 4020b6c5  
3ffffbf0:  00000000 3fff5dd4 3fff14a0 4020b8b4  
3ffffc00:  3fff13a2 3fff1370 3ffe882c 4020b9f5  
3ffffc10:  3fff5dd4 0000000f 0000000e 3fff13a0  
3ffffc20:  3ffe8820 3fff1760 3fff2204 40208e35  
3ffffc30:  3f000000 3fff21f4 3ffffc6c 4010068c  
3ffffc40:  00000035 00000001 00000000 3fff4fc4  
3ffffc50:  3fff4dc8 3fff21f4 3ffe864c 4020930d  
3ffffc60:  00000000 00000000 00000000 00000000  
3ffffc70:  00000000 00000000 3ffffca0 4010068c  
3ffffc80:  3fff5eac 3ffffce0 3fff2204 40209332  
3ffffc90:  3fff2bc0 0000032e 3fff2204 4020937d  
3ffffca0:  00000000 00000000 00000000 402218d2  
3ffffcb0:  3fff5eac 3fff4dc2 3fff1780 4022352e  
3ffffcc0:  3fff4dc8 3fff4dc2 3fff1780 40213977  
3ffffcd0:  40209340 00000000 40223538 40223520  
3ffffce0:  3fff5e7c 0000000f 00000001 00000000  
3ffffcf0:  00000000 00000000 00000000 00000000  
3ffffd00:  00000000 00000000 4022743b 00000001  
3ffffd10:  ffffffff 00000000 3ffeab91 00000000  
3ffffd20:  3f000000 00000000 3fff5010 00000000  
3ffffd30:  3fff2204 3fff4f10 4010214f 00000000  
3ffffd40:  3ffeb39f 3fff5a04 3ffffda0 00000000  
3ffffd50:  3ffeb39f 3fff59fc 00000000 40223fe8  
3ffffd60:  00000001 4022e628 3ffef5f0 40212697  
3ffffd70:  3f000000 3fff59ec 00000000 40224312  
3ffffd80:  3fff5e0e 40245d4c 3fff5e0e 40217074  
3ffffd90:  00000001 3fff5eb4 00000080 00000006  
3ffffda0:  3fff5ad4 000002af 40212674 40223fc0  
3ffffdb0:  3f000000 00000003 3fff49b4 40246031  
3ffffdc0:  3fff59fc 3fff4dac 00000000 4010020c  
3ffffdd0:  3fff2bc0 0000032e 0000032e 00000000  
3ffffde0:  3ffffe50 00000001 3fff5a84 402241b5  
3ffffdf0:  00000001 00000000 00000001 00000000  
3ffffe00:  3ffeb36e 00000032 3fff24a8 402183a9  
3ffffe10:  00000001 00000000 00000001 00000000  
3ffffe20:  3ffeb36e 00000032 3fff24a8 40216e69  
3ffffe30:  3fff5e8c 3ffffed0 40216130 40224124  
3ffffe40:  3fff5e7c 0000002e 402160e4 4022417c  
3ffffe50:  00000031 00040000 7fffffff 00000000  
3ffffe60:  3fff2615 3fff5a84 00040000 ffffffff  
3ffffe70:  00000000 4010322a 00000000 3fff24fc  
3ffffe80:  00000001 3fff5d54 3fff24a8 40216e9c  
3ffffe90:  3ffffea0 40103080 3fff24a8 40218a14  
3ffffea0:  3fff5eb4 00000030 0000000f ffffffff  
3ffffeb0:  3fff44f4 3fff4500 00000006 3fff4308  
3ffffec0:  3fff5eb4 3fff4310 3fff430c 40218a67  
3ffffed0:  3fff5eb4 3fff4310 3fff430c 40248a6c  
3ffffee0:  00000032 0d01a8c0 00000018 00000032  
3ffffef0:  00000018 00000000 3ffefc58 401077a8  
3fffff00:  00000000 00000000 3ffed37a 3fff44f8  
3fffff10:  3ffeb346 3fff4500 3fff5d54 40246f71  
3fffff20:  3fff421c 3fff49b4 3fff49b4 3ffef5f0  
3fffff30:  00000000 3fff5d54 0000001c 3fff49b4  
3fffff40:  3ffeb338 00000000 3fff5d54 40246369  
3fffff50:  2201a8c0 00000090 00000000 00000031  
3fffff60:  00000002 0000001a 40226d9f 3ffee4a8  
3fffff70:  3ffeb310 3fffdcc0 3ffeab78 3ffeab78  
3fffff80:  40226d12 3ffee4a8 3fffdab0 3fff4a0c  
3fffff90:  3fffdc80 00000000 3fff5d54 4023adfb  
3fffffa0:  40000f49 3fffdab0 3fffdab0 40000f49  

 ets Jan  8 2013,rst cause:2, boot mode:(1,7)

 ets Jan  8 2013,rst cause:4, boot mode:(1,7)

wdt reset


Thank you

Try adding yield() in any parts that take time to run. It has to do with the ESP barfing because there’s not enough time for it to do its IP stuff

Thanks for the tip.

I tried inserting yield() in in some parts that are executed right before the wdt reset.

I read yield would reset a reset-timer so that would make sense to me.

But without success.

Do you think I should add yield() into ANY of my many functions of my code?

Use new forum folks

This one closed Nov 15, 2017