Support for multiple apa102 strips stopped working correctly in v0.15.x+
What happened?
Cannot add a 3rd strip of apa102 LEDs (option is disabled). Only the first apa102 strip works.
4-apa102 strips w/ 140 LEDs each
data/clock pins strip 0 - 15 4 strip 1 - 16 17 strip 2 - 5 18 strip 3 - 19 21
Each above line buffered through a 74HCT245 with series 100ohm resistor.
To Reproduce Bug
Attach 3+ apa102 strips to ESP32 with separate clock/data pins for each strip. Each strip contains 140 LEDs In LED settings page, you can add at most 2 apa102 strips and set the clock/data pins. Only the first strip works and lights up. Trying to add a 3rd apa102 strip fails because the apa102 option is disabled.
Expected Behavior
Up to v0.14.4, able to add 4 apa102 strips each containing 140 LEDs.
Install Method
Self-Compiled
What version of WLED?
v0.15.1+
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
Anything else?
No response
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
APA102 use SPI driver. Only one HW SPI is avaiable and SW SPI has issues with recent versions (i.e. not enough CPU resources to drive glitch-free output).
In version v0.14.x, it would (I presume) simulate spi on any set of pins. As stated in the bug, I was running 4 separate strips successfully. Where is this stated that only one apa102 strip is now supported? Why not leave the previous mechanisms in place and explain that it may be glitchy or run at lower frame-rates?
I am merely stating facts. You are welcome to debug and provide hints on what to search for. APA102 code has not been modified in quite a while.
In version v0.14.x, it would (I presume) simulate spi on any set of pins.
A lot has changed since then. There is always the option to keep running that version. We rather provide something stable than a somewhat stable version with glitches and having many reported issues to deal with.
Given apa102 has much greater speed, why so few LEDs per pin?
Given apa102 has much greater speed, why so few LEDs per pin?
It made running the wires a little simpler by breaking them up into separate channels. In hindsight, had I known this was the direction things were going, I might have done it a little differently. I've also looked over the changes and re-enabling the multiple bit-banged two-wire channels might be possible with a local patch.
If someone will confirm that WLED with several APA102 strips works without issues when under heavy load (multiple web requests while having overlapping 2D segments and running computationally demanding effect like Soap), this is the line in settings_leds.htm that needs a change:
if (twopinB >= 2) disable(sel,'option[data-type="2P"]');
There are no restrictions in underlying code so upgrade from previous version should be unhindered until configuration is changed.
If someone will confirm that WLED with several APA102 strips works without issues when under heavy load (multiple web requests while having overlapping 2D segments and running computationally demanding effect like Soap)
I wonder if the protocol is amenable to the same interrupt management logic that the WS2812 bit-banging code uses -- keep interrupts off while sending the data for one pixel, check for pending ISRs, repeat. If so, a small driver patch would clear it right up.
Same problem for me.. I installed two strips on one esp32 and thought the hardware has broken. It is not easy for me to run a cable between the two strips.
@sam9032 there is nothing in the code that would prevent 2 APA102 outputs. You will need to help us debug the issue by installing debug build and monitoring serial output.
@blazoncek i can try that.
I'm happy to hear I'm in good company. I had APA102s on multiple channels for cabinet lighting.
Home assistant automatically updated my device firmware. Sadly, something that has worked flawlessly for 4+ years broke with the 15.0 update.
I'd love a patch that would get me back in action.
@blazoncek i can try that.
@sam9032 did you do any debugging on using more than one APA102 strips on multiple pins?