nRF52832 SK6812 LEDs displaying incorrect colors

I have a board with the nRF52832 and a board with 12 SK6812 LEDs on it in the shape of a ring.  I have code that sometimes will display the correct color on the ring but other times the colors are off.  I am using nRF Connect SDK 2.6.1

I have functionality so that I can send UART commands into the device to make the LED ring, solid red, solid green, etc.

I am using the SPI method of interacting with the LEDs.

I hooked up the my Saleae Logic analyzer to monitor the data line used for the LEDs.  First is what I saw with the LED ring being all red (correct).

I would expect that the data communication to update the LED would be one either block but it looks like something might be interrupting the operation. 

In this case, it looks like whatever interrupted the led_strip_update_rgb() was short enough that the gap (approximately 25 micro seconds) was not mistaken as the result timing gap required per the operation of the LEDs. The reset code listed on the SK6812 datasheet is listed as 80 uSecs.

Here is the Saleae capture if it would be of any use.

ring red correct.sal

Here is a picture of the LED ring when it should have been all red but instead the first two LEDs were lit green and rest were all red.

Here is a screenshot of a capture from the Saleae Logic analyzer where there was a much larger gap of 747 uSecs.  The LED ring had the first two LEDs as green and the rest of the ring was red.

Again here is the Saleae data if  useful.

ring red incorrect.sal

Here is the datasheet for the SK6812.

2451.SK6812+LED+datasheet+.pdf

I did see the following post, https://devzone.nordicsemi.com/f/nordic-q-a/78819/ncs-zephyr-ws2812-interrupt-activity----turn-off-bluetooth-radio/326153, which describes a similar issue that LEDs they were using were not working when also utilizing Bluetooth.  I have not attempted to the timeslot method for updating the LED ring yet. 

I can't tell with the LED_STRIP functionality if there is a way to change priorities so that the led_strip_update_rgb() can run without being interrupt by other functionality.

Just looking for any advice if others have experienced similar issues.

Related