StefanBruens / ESP8266_new_pwm

This is a drop-in replacement for the ESP8266 SDK PWM
GNU General Public License v2.0
196 stars 46 forks source link

wdt reset with `PWM_USE_NMI 1` #25

Open ge0rg opened 6 years ago

ge0rg commented 6 years ago

I'm not using the timer directly, but I have some libraries that probably depend on it (ESP8266HTTPUpdateServer, WifiManager, ...). Therefore I had to enable this in pwm.c for the library to work:

#define PWM_USE_NMI 1

The PWM works very well, but if I enable color cycling in my loop(), where I change the PWM settings according to a HSV color table in each cycle, I get a wdt reset after some time (tens of seconds to some minutes):

 ets Jan  8 2013,rst cause:4, boot mode:(3,0)

wdt reset
load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
va3a36545
~ld

<new boot here>
rvt commented 4 years ago

Same here. Just for reference. I am using WifiManager and SPI. It seems to happen with changing the PWM when the duty is set higher + high frequency.

taseraul commented 4 years ago

I use 3 channels on an esp-01 pins GPIO0 ,2 and 3 for a RGB strip, set-up with a 255 step period (~19kHz) it crashes consistently with the duty cicle 0,17,255 (of max 255,255,255) when using NMI1.