-->
Page 1 of 3

Issues with interrupts and rebooting. (WS2812B)

PostPosted: Sat Oct 04, 2014 6:54 pm
by cnlohr
I am trying to make a WS2812 driver for the ESP8266 and I'm having unusual rebooting issues. If I try to disable interrupts for too long with os_intr_lock();/os_intr_unlock(); it simply goes off into la la land and reboots. No idea why, though. Also, it's not always the same timing. Sometimes I can send to 40 WS2812's for a while, other times to 100 for a little bit before a crash. It seems to have to do with if some other interrupts come in. Any ideas?

P.S.
https://github.com/cnlohr/ws2812esp8266

Re: Issues with interrupts and rebooting. (WS2812B)

PostPosted: Sat Oct 04, 2014 7:59 pm
by jonsmirl
There may be a watchdog timer in the system. It the watchdog interrupt doesn't get acked after XXX seconds the system reboots. It is a safety precaution against the system getting locked up. Quite common on embedded chips.

Added -- the way the interrupt doesn't get acked is if your code goes off into the weeds and gets locked up somehow.

Re: Issues with interrupts and rebooting. (WS2812B)

PostPosted: Sun Oct 05, 2014 2:18 am
by hackrid
Cnlohr, thanks for working on this ;)

Could the crash also be induced by some not cleared memory buffers?

Re: Issues with interrupts and rebooting. (WS2812B)

PostPosted: Sun Oct 05, 2014 2:31 am
by cnlohr
That is very possible. Since longer waits only increase the probability of a crash, there is no hard cut off... It would seem to me that's a reasonable possibility. I am starting to think this processor may still be best if paired up with an AVR as a dedicated IO processor. Probably still too early to know for sure. People are likely to find a lot of hacks to get around limitations.