SmingRTOS icon indicating copy to clipboard operation
SmingRTOS copied to clipboard

Basic_Neopixel not working (interrupt issue)

Open tht opened this issue 9 years ago • 3 comments

The example compiles and uploads just fine. I had to change #define PIN 5 to #define PIN 15. With this value the signal is available on pin D8. The data signal to the LEDs is often interrupted by something else (clearly visible on scope). This adds bad flickering to the LEDs and sometimes wrong colors. I've attached 60 LEDs and a strong lab PSU.

I've also tried some other pins, these are the values I've used:

#define PIN 15 // output on D8
#define PIN 14 // output on D5
#define PIN 13 // output on D7
#define PIN 12 // output on D6
#define PIN 11 // not booting up - WDT resets
#define PIN 10 // not booting up - WDT resets
#define PIN 9 // not booting up - WDT resets
#define PIN 8 // not booting up - WDT resets
#define PIN 7 // not booting up - WDT resets
#define PIN 6 // not booting up - WDT resets
#define PIN 5 // output on D1

I couldn't figure out how these numbers are connected. IMHO this should be documented in the sample application. What I know for sure there is something interrupting the output of the data stream to the LEDs every now and then. Looks like an interrupt issue. It's the same on all the pins listed above.

The ESP8244 (actually a WEMOS D1 mini) and the WS2812B LED strip are good. If I upload a simple NodeMCU program it works flawless.

tht avatar Oct 16 '16 17:10 tht

Updated the Adafruit_NeoPixel library to the current version (1.0.6). This does not solve the issue. It's behaving exactly the same as with the included version (1.0.3).

I've also tried to use cli() in void ICACHE_RAM_ATTR espShow(…) to prevent interrupts but this also does not change the behavior.

tht avatar Oct 16 '16 21:10 tht

I've switched my development environment to SMING (non-RTOS). I can confirm that there is no issue with interrupts on Sming.

tht avatar Oct 19 '16 19:10 tht

Issue may be related to this one: http://www.esp8266.com/viewtopic.php?f=9&t=3979

tht avatar Oct 19 '16 19:10 tht