You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for the great lib and examples! I'll try to contribute starting with this issue, and maybe a fix if that's at my level!
So, I noticed this strange issue of the SPI having different behaviour when changing the LED count.
Here are the scope captures with NR_LEDS set from 1 to 11:
For NR_LEDs between 6 and 9 the SPI behaviour is different, which causes issues with the WS2812B I'm using.
I noticed this in ws2812b_dma_spi_led_driver.h:
// Note first n LEDs of DMA Buffer are 0's as a "break"
// Need one extra LED at end to leave line high.
// This must be greater than WS2812B_RESET_PERIOD.
#define WS2812B_RESET_PERIOD 2
What is the reason for keeping the line high? The 2812B's datasheet specifies that the line should be low for at least 50us after the last bit is sent.
The text was updated successfully, but these errors were encountered:
I was also running into this issue with 8 LEDS in the demo. If NR_LEDS is 7-9, LEDs 7 and 8 did not light up. Interestingly, it started working when NR_LEDS was >9, so I could just ignore the nonexistent LEDs. However, the better solution was to change DMALEDS in the driver code to literally any other valid value, since there's a buffer of 2, I chose 12. Somehow that worked.
Following the last guy's comment about putting the line low, I can keep everything as it was before but set the WS2812B_RESET_PERIOD to 0 and have the LEDS work fine as long as I set the SPI line low in the beginning of DMA start. If I don't set it low then the brightness is incorrect.
This is my first experience with this chip and this kind of C code so IDK what exactly is wrong, but there's clearly a bug in the DMA driver somewhere. Setting the SPI line low seems to fix it, IDK if that's the real solution but it works for me.
First of all, thanks for the great lib and examples! I'll try to contribute starting with this issue, and maybe a fix if that's at my level!
So, I noticed this strange issue of the SPI having different behaviour when changing the LED count.
Here are the scope captures with NR_LEDS set from 1 to 11:
For NR_LEDs between 6 and 9 the SPI behaviour is different, which causes issues with the WS2812B I'm using.
I noticed this in ws2812b_dma_spi_led_driver.h:
What is the reason for keeping the line high? The 2812B's datasheet specifies that the line should be low for at least 50us after the last bit is sent.
The text was updated successfully, but these errors were encountered: