<?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>Cannot drive LED using PWM</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55767/cannot-drive-led-using-pwm</link><description>I want to drive LED using NRF_PWM0, but It is not working. 
 
 I want to increase brightness of LED but it is alyway on. 
 
 Please help me.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Dec 2019 14:47:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55767/cannot-drive-led-using-pwm" /><item><title>RE: Cannot drive LED using PWM</title><link>https://devzone.nordicsemi.com/thread/226191?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2019 14:47:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0f326c2-6cdb-4478-ab81-f8e21ab9efb7</guid><dc:creator>jswcomkr</dc:creator><description>&lt;p&gt;Hello.&lt;/p&gt;
&lt;p&gt;Thank you for reply.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve solved problem.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void pwmInit(void)
{
	NRF_PWM0-&amp;gt;PSEL.OUT[0] = 23 ;
	NRF_PWM0-&amp;gt;PSEL.OUT[1] = 24 ; 
	NRF_PWM0-&amp;gt;ENABLE = 0x00000001;
	NRF_PWM0-&amp;gt;MODE = 0x00000000;
	NRF_PWM0-&amp;gt;PRESCALER = 0x00000000;
	NRF_PWM0-&amp;gt;COUNTERTOP = 32000;
	NRF_PWM0-&amp;gt;DECODER = 0x00000002;
	NRF_PWM0-&amp;gt;LOOP = 0x00000000;
	NRF_PWM0-&amp;gt;SEQ[0].REFRESH = 0;
	NRF_PWM0-&amp;gt;SEQ[0].ENDDELAY = 0;
	NRF_PWM0-&amp;gt;SEQ[0].PTR = (uint32_t)(pwmDuty);
	NRF_PWM0-&amp;gt;SEQ[0].CNT = 4;
	NRF_PWM0-&amp;gt;TASKS_SEQSTART[0] = 1;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;it works after remove &amp;lt;nrf_drv_pwm.h&amp;gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot drive LED using PWM</title><link>https://devzone.nordicsemi.com/thread/226114?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2019 11:10:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b73d9b7-219f-4e4d-b368-6804b7fc35a7</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Have you tried to analyze the PWM signal using e.g. a saleae logic analyzer? Is it actually a PWM signal on the LED? Or is it simply ON?&lt;/p&gt;
&lt;p&gt;Note that on the LEDs on the DK it may be difficult to tell the difference between 90% and 100%, while it is easy to tell the difference between 0% and 10%, or 10%&amp;nbsp;and 20%&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>