@mdauria, if you still care:
This was discussed in the past a bit, and since I needed that, I did some quick tests:
teensy 3.6 with FASTLED_ALLOW_INTERRUPTS 1
FastLED takes the interrupt, updates 6 to 11 pixels before it’s time for SmartMatrix to do an update. SmartMatrix takes over in the middle of 2 LED updates, takes too long to finish its work, and FastLED detects this and doesn’t try to update more LEDs on the strip since they would be corrupted.
teensy 3.6 with FASTLED_ALLOW_INTERRUPTS 0
This time FastLED does not let interrupts run until it’s done updating the LED strip. That works, but in turn the SmartMatrix interrupt doesn’t fire in time and I see lines of 40 stuck pixels that flash
Both the above are expected. Given that both SmartMatrix and FastLED are interrupt sensitive, there is no good way around this I think. Things could be made to work if both worked together though and FastLED would disable SmartMatrix interrupt while it runs and only fire a strip update after SmartMatrix is done updating an entire frame. This would however break down eventually as the FastLED strip takes longer to update.
A better fix around this is to use DMA on teensy to update neopixel strips, but FastLED does not support this.
- ESP32 with ESP32 git master
For some reason, it crashes after a few frames for me:
Guru Meditation Error: Core 1 panic’ed (Interrupt wdt timeout on CPU1)
PC: 0x400d0f84: SMLayerBackground ::swapBuffers(bool) at /home/merlin/Arduino/libraries/SmartMatrix_ESP32/src/Layer_Background_Impl.h line 921
Decoding stack results
0x400d0f84: SMLayerBackground ::swapBuffers(bool) at /home/merlin/Arduino/libraries/SmartMatrix_ESP32/src/Layer_Background_Impl.h line 921
0x400d1c3c: loop() at /home/merlin/arduino/libraries/SmartMatrix_ESP32/examples/DemoFastLED/DemoFastLED.ino line 163
0x400e7806: loopTask(void*) at /home/merlin/Arduino/hardware/espressif/esp32/cores/esp32/main.cpp line 17it crashes
- ESP32 with https://github.com/samguyer/FastLED
This one works. FastLED uses RMT while SmartMatrix does not and uses some other DMA, so they don’t step on one another.
FastLED git also uses RMT, I’m not sure how it’s different from that branch and why the SamGuyer original RMT code for ESP32 works while the TOT git version of FastLED does not.