-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WS2812 SPI LED driver with DMA on nrf52 bad SPI data #33505
Comments
I would defintely say that this is not caused by a bug of zephyr, rather it is a design issue in nRF SOCs I have observed the same thing some time ago independently in the context of mBed OS. Some not obvious change in the processor state must cause this pause. Or maybe, it is a priority issue on the bus? Maybe this should be discussed with engineers at devzone? On the other hand, most WS2812 like LEDs now accept pauses of this dimension so it should not be a problem with modern LEDs. The downside is that reset times are now in the low 100s of us, which may negatively affect the frame rate. So you could still solve the problem by changing to modern LEDs. |
Reset times: Take a look here: https://datasheet.lcsc.com/szlcsc/2006151006_Worldsemi-WS2812B-B_C114586.pdf |
Thank you @peterniebert, Indeed I tried with LEDs bought more recently and it works well. My other strip is too old ... If it's a SOC bug it's a shame but I think we can close this issue. I also use Mbed OS and I will try on it. Thanks for the link to the WS2812 PDF, I had read it too quickly but I had not thought of an evolution of the WS2812 and that the LEDs of my old strip were old ! Thanks for your help |
Closing this since it doesn't seem to be a Zephyr issue. @anangl please reopen if you think this is an actual bug. |
Add a driver implementation that uses the I2S peripheral. Based off this blog post: https://electronut.in/nrf52-i2s-ws2812/ Should help with zephyrproject-rtos#33505, zephyrproject-rtos#29877 and maybe zephyrproject-rtos#47780, as there is no garbage data at the end of transmissions on nRF52832, and no gaps. Signed-off-by: Jonathan Rico <[email protected]>
Add a driver implementation that uses the I2S peripheral. Based off this blog post: https://electronut.in/nrf52-i2s-ws2812/ Should help with zephyrproject-rtos#33505, zephyrproject-rtos#29877 and maybe zephyrproject-rtos#47780, as there is no garbage data at the end of transmissions on nRF52832, and no gaps. Signed-off-by: Jonathan Rico <[email protected]>
Add a driver implementation that uses the I2S peripheral. Based off this blog post: https://electronut.in/nrf52-i2s-ws2812/ Should help with #33505, #29877 and maybe #47780, as there is no garbage data at the end of transmissions on nRF52832, and no gaps. Signed-off-by: Jonathan Rico <[email protected]>
Add a driver implementation that uses the I2S peripheral. Based off this blog post: https://electronut.in/nrf52-i2s-ws2812/ Should help with zephyrproject-rtos#33505, zephyrproject-rtos#29877 and maybe zephyrproject-rtos#47780, as there is no garbage data at the end of transmissions on nRF52832, and no gaps. Signed-off-by: Jonathan Rico <[email protected]>
Describe the bug
I'm trying to make the WS2812 LED example work on nrf52dk_nrf52832.
WS2812 LED driver does not work properly on nrf52. When I use the SPI DMA driver (nordic,nrf-spi), a low level is maintained on the line for a few µS in the middle of the frame (see diagram below) and the LEDs do not support it.
Expected behavior
If I use the standard SPI driver (nrf-spi) the bits are less regular but there is no low level maintained several microseconds in the middle of the frame. And it works 🎉
I think the problem comes from the SPI driver in DMA mode, have you ever had this problem?
To Reproduce
Steps to reproduce the behavior:
Impact
The LEDs don't work and using the spi driver without DMA is not a good solution.
Environment
The text was updated successfully, but these errors were encountered: