<?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>Issues with PWM and S210</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14337/issues-with-pwm-and-s210</link><description>Hi everyone, 
 When I run 4 instances (i.e., x2 PWM channels) of PWM with S210 (same example as the ant_background_scanning from SDK 10), after few seconds of constantly changing PWM duty cycle of 2 out of 4 PWM instances, the chip restarts by itself</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Jun 2016 11:23:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14337/issues-with-pwm-and-s210" /><item><title>RE: Issues with PWM and S210</title><link>https://devzone.nordicsemi.com/thread/54757?ContentTypeID=1</link><pubDate>Thu, 16 Jun 2016 11:23:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fa418f2-e704-44b3-a4ed-9c926be6a46b</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Which SDK are you using? You should find out why it returns NRF_ERROR_INVALID_STATE, not change the return value to NRF_SUCCESS, then you will get undefined behaviour. The state is set in the init, uninit, enable and disable functions. The state is set to NRF_DRV_STATE_POWERED_ON in the enable function. You are probably calling init, uninit or disable after you called the enable functions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with PWM and S210</title><link>https://devzone.nordicsemi.com/thread/54756?ContentTypeID=1</link><pubDate>Wed, 08 Jun 2016 16:43:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b8585cf-21b9-403c-a4e2-672bb97205ca</guid><dc:creator>Jay</dc:creator><description>&lt;p&gt;The issue is coming from here in app_pwm.c&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if (p_cb-&amp;gt;state != NRF_DRV_STATE_POWERED_ON)
{
    return NRF_ERROR_INVALID_STATE;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;where it returns the NRF_ERROR_INVALID_STATE after few seconds of running the above code. I changed NRF_ERROR_INVALID_STATE to NRF_SUCCESS and after, instead of getting stuck at 16% PWM and restarting after few seconds, the PWM continues at 16% and never restarts. So, as your link suggests, it seems like an error condition is returned from the PWM duty cycle set function and system restarts. However, I commented out the following in the app_error.c but the nRF51422 still restarts:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;...
NVIC_SystemReset();
...
m_error_code = error_code;
m_line_num = line_num;
m_p_file_name = p_file_name;
UNUSED_VARIABLE(m_error_code);
UNUSED_VARIABLE(m_line_num);
UNUSED_VARIABLE(m_p_file_name);
__disable_irq();
while(loop);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issues with PWM and S210</title><link>https://devzone.nordicsemi.com/thread/54755?ContentTypeID=1</link><pubDate>Tue, 07 Jun 2016 11:50:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dee6d40b-a565-425b-a98c-af2b5a2e9ef5</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Which SDK are you using? Can you find out why the code resets? Probably it is because you are running into an error condition, see &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>