<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>WS2812 with LED CAF</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92537/ws2812-with-led-caf</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 10 Oct 2022 19:05:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92537/ws2812-with-led-caf" /><item><title>RE: WS2812 with LED CAF</title><link>https://devzone.nordicsemi.com/thread/390101?ContentTypeID=1</link><pubDate>Mon, 10 Oct 2022 19:05:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c07e2587-f003-45cb-b4f9-27f8f2d53433</guid><dc:creator>Marshall</dc:creator><description>&lt;p&gt;That&amp;#39;s correct, I no longer need help with this ticket.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Marshall&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WS2812 with LED CAF</title><link>https://devzone.nordicsemi.com/thread/390074?ContentTypeID=1</link><pubDate>Mon, 10 Oct 2022 14:34:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b909e17-3b53-47d0-bce6-ae2947a4caa7</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello Marshall,&lt;/p&gt;
&lt;p&gt;Just to confirm, do you need any more help with this ticket?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WS2812 with LED CAF</title><link>https://devzone.nordicsemi.com/thread/389104?ContentTypeID=1</link><pubDate>Tue, 04 Oct 2022 05:24:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:635ed3aa-b276-412c-8aa2-d5628486a178</guid><dc:creator>Marshall</dc:creator><description>&lt;p&gt;Thanks Michal&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t worry about points 1 and 2, I figured it out, its a bit ugly at the moment, so I can&amp;#39;t post it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;in the ui_module.c of the asset tracker app. I just added an extra call to my own functions so the original LEDs are still doing whatever..&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="c_cpp"&gt;/* Static module functions. */
static void update_led_pattern(enum led_state pattern)
{
#if defined(CONFIG_LED_CONTROL)
&amp;#160; &amp;#160; struct led_state_event *event = new_led_state_event();

&amp;#160; &amp;#160; event-&amp;gt;state = pattern;
&amp;#160; &amp;#160; APP_EVENT_SUBMIT(event);
#endif
&amp;#160; &amp;#160; LOG_INF(&amp;quot;LED Pattern is now %d&amp;quot;,pattern);
&amp;#160; &amp;#160; ws2812_update(pattern);

}&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;Regards Marshall&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: WS2812 with LED CAF</title><link>https://devzone.nordicsemi.com/thread/389002?ContentTypeID=1</link><pubDate>Mon, 03 Oct 2022 13:12:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bec8a952-ff3b-4d90-bd8d-3a3a60cc42f9</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello Marshall,&lt;/p&gt;
&lt;p&gt;I have at least an answer for the question 3., the rest will require some further research.&lt;/p&gt;
&lt;p&gt;Unfortunately it is a hardware limitation that the SPI hardware block locks the pins. On the other hand Nordic&amp;#39;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.&lt;/p&gt;
&lt;p&gt;The only issue is that you will have to use the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/nrfx/drivers/pwm/driver.html"&gt;nrfx driver&lt;/a&gt; and not the zephyr one.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>