<?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>Flicker LEDs to indicate full brightness</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17525/flicker-leds-to-indicate-full-brightness</link><description>I am working on a project and have successfully implemented single channel PWM to dim leds (using a transistor FET).
The pwm init code is below: 
 uint32_t err_code;
nrf_drv_pwm_config_t const config0 =
{
 .output_pins =
 {
 outputLED, // channel</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 Jan 2017 12:49:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17525/flicker-leds-to-indicate-full-brightness" /><item><title>RE: Flicker LEDs to indicate full brightness</title><link>https://devzone.nordicsemi.com/thread/67388?ContentTypeID=1</link><pubDate>Mon, 30 Jan 2017 12:49:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:180d8620-a96c-49b0-a631-07fc5fd96bde</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Thank you for adding an answer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flicker LEDs to indicate full brightness</title><link>https://devzone.nordicsemi.com/thread/67387?ContentTypeID=1</link><pubDate>Fri, 27 Jan 2017 21:27:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:01dc41a9-d75e-4fbb-a7fc-a04091056c05</guid><dc:creator>Bryan H</dc:creator><description>&lt;p&gt;For completeness, I ended up using a timer to call the flicker code below.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (myData.powerState == 1)
{
	if (flickerNumber &amp;lt;= 11 &amp;amp;&amp;amp; flickerNumber !=0)
		{
		if (pwmValue[myData.pwmIndex] &amp;gt;= 50)
			{
			if (flickerNumber % 2)
				{
				app_pwm_channel_duty_set(&amp;amp;PWM1, 0, pwmValue[(sizeof pwmValue / sizeof *pwmValue - 1)]);
				}
			else
				{
				app_pwm_channel_duty_set(&amp;amp;PWM1, 0, 35);
				}
			++flickerNumber;
			}
		if (pwmValue[myData.pwmIndex] &amp;lt; 50)
			{
			if (flickerNumber % 2)
				{
				app_pwm_channel_duty_set(&amp;amp;PWM1, 0, 0);
				}
			else
				{
				app_pwm_channel_duty_set(&amp;amp;PWM1, 0, pwmValue[myData.pwmIndex]);
				}
			++flickerNumber;
			}

		}
	if (flickerNumber &amp;gt;= 12)
	{
		flickerNumber = 0;
		if (outputLedState == false)
		{
			switchLedsOff();
		}
		else if (outputLedState == true)
		{
			switchLedsOn();
		}
	}
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flicker LEDs to indicate full brightness</title><link>https://devzone.nordicsemi.com/thread/67386?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2016 12:42:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9db1d1ac-11a6-467c-9ca5-510c01d1864c</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Is the problem is that the timer interrupt is not able to interrupt the flicker code? Then one solution is to run the flicker code in a context with lower priority, or increase the priority of the timer interrupt. But if the timer interrupt is able to interrupt the flicker code it could affect the delay between the playbacks. Another solution would be to use a hardware timer instead of nrf_delay_ms(), then the timer interrupt could be handled inbetween.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>