WS2812 with LED CAF

Hi There, 

I would like to extend the NRF9160 LED CAF by using the WS2812 LED instead of 3x discrete LEDs. 

1. Where in the CAF or Zephyr or wherever, are the function calls to actually control the LEDs. - its so opaque as to be unusable. 

2. Is there a way to write and interface layer to drive the WS2812 instead of the LEDs. 

3. I have WS2812 with SPI working fine, I have the LED breathing, blinking changing colour etc, is there way in the overlay for the SPI to only use a single pin, rather than needing the 3 pins for SPI, two of which are then redundant, and I have them assigned for other stuff. 

Thanks and Regards 

Marshall

Parents
  • Hello Marshall,

    I have at least an answer for the question 3., the rest will require some further research.

    Unfortunately it is a hardware limitation that the SPI hardware block locks the pins. On the other hand Nordic's PWM driver allows for sending a bit sequence, so that may be something to consider trying instead, if the number of used pins is critical.

    The only issue is that you will have to use the nrfx driver and not the zephyr one.

    Best regards,

    Michal

Reply
  • Hello Marshall,

    I have at least an answer for the question 3., the rest will require some further research.

    Unfortunately it is a hardware limitation that the SPI hardware block locks the pins. On the other hand Nordic's PWM driver allows for sending a bit sequence, so that may be something to consider trying instead, if the number of used pins is critical.

    The only issue is that you will have to use the nrfx driver and not the zephyr one.

    Best regards,

    Michal

Children
No Data
Related