-
Notifications
You must be signed in to change notification settings - Fork 13.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loop in loop() causing Soft WDT reset #2866
Comments
Ok, it seems that it's caused by watchdog timer. I didn't know about this before. |
could you try changing your code to use delay instead of delayMicroseconds? using delay allows some of the background tasks to happen during the delay which may prevent the watchdog reset (not tested this) where delayMicroseconds does not. |
Hi James, sorry for late reply. I tried to use delay but with same results. The second problem was that I needed delayMicroseconds because of simulating PWM. But I solved it without delay/delayMicrosends with getTickCount measurement. |
glad you solved your problem, can i suggest that you post a stripped down example of your fixed code (in case someone else has a similar issue) and then close this issue? |
Sure, it's something like this
|
can you paste the whole code please?? I want to see where exactly the code goes and how to use it. |
Same problem with HX711 library on esp8266. delay(0); in loop fix problem :) Library use yield(); but it not work :( |
@regimantas did you manage to fix your problem with the hx711? I am having the same problem with my hx711 and node mcu on arduino ide |
I found this was necessary even in a particularly long running |
But delay() has some issues like blocking other connected devices for specified time and non-accurate delays as code takes its own time to run. |
I made this mistake. Sorry can anyone help me? Soft WDT reset
ctx: cont --------------- CUT HERE FOR EXCEPTION DECODER --------------- ets Jan 8 2013,rst cause:2, boot mode:(3,6) load 0x4010f000, len 3460, room 16 My code /---------KẾT NỐI---------/ #define BLYNKLED 2 //D4 - Led debug //----- Kết nối wifi void setup() { pinMode(TouchSensor, INPUT); pinMode(BLYNKLED, OUTPUT); digitalWrite(BLYNKLED, LOW); //Kết nối wifi void loop() { bool touchRead(){ while(touch != 0){ |
Basic Infos
Hardware
Hardware: WemosD1 mini v 2.1.0
Description
I'm getting "Soft WDT reset" in simple loop.
Stack (I'm not able to decode it. i don't have such option in my arduino app)
This is sample code, It's very simplifed version of my app only to present the bug. App crash always when counter is 824.
Settings in IDE
Module: Generic ESP8266 Module
Flash Size: 4MB
CPU Frequency: 80Mhz
The text was updated successfully, but these errors were encountered: