<?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>PWM SEQ0 interrupt</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46799/pwm-seq0-interrupt</link><description>I am trying to do a ramping PWM. I want to update PWM every 25ms by increasing the duty cycle by 10%. I tried to setup a timer, by calling app_start_timer() on repeat mod and then within the timer callback i use the update_duty_cycle() found in the pwm</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 May 2019 08:33:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46799/pwm-seq0-interrupt" /><item><title>RE: PWM SEQ0 interrupt</title><link>https://devzone.nordicsemi.com/thread/185858?ContentTypeID=1</link><pubDate>Wed, 08 May 2019 08:33:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef446ecf-1486-40f3-ba1d-073af79f13f7</guid><dc:creator>Sigurd</dc:creator><description>[quote userid="72699" url="~/f/nordic-q-a/46799/pwm-seq0-interrupt/184633"]I was able to get a ramping using a complex pwm call.[/quote]
&lt;p&gt;Good.&lt;/p&gt;
[quote userid="72699" url="~/f/nordic-q-a/46799/pwm-seq0-interrupt/184633"]but i am still curious to know the answers to my questions on why the timer and the pwm seq0 callback was not working[/quote]
&lt;p&gt;I don&amp;#39;t see any bugs in the code you posted, and I was not able to reproduce the issue. But it could be that s_initialized= false, so that&amp;nbsp;app_timer_start() was never called.&amp;nbsp;Another&amp;nbsp;theory could be that the LFCLK was not running,&amp;nbsp;if the SoftDevice is not running,&amp;nbsp;&lt;span&gt;the LFCLK must be requested explicitly. See the &lt;a href="https://devzone.nordicsemi.com/tutorials/b/software-development-kit/posts/application-timer-tutorial"&gt;app timer tutorial&lt;/a&gt;&amp;nbsp;chapter called &amp;quot;initialization&amp;quot;.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: PWM SEQ0 interrupt</title><link>https://devzone.nordicsemi.com/thread/184633?ContentTypeID=1</link><pubDate>Tue, 30 Apr 2019 18:40:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd346c5b-5bc9-45c8-937a-348095538387</guid><dc:creator>dmleone</dc:creator><description>&lt;p&gt;I was able to get a ramping using a complex pwm call. per below. but i am still curious to know the answers to my questions on why the timer and the pwm seq0 callback was not working&lt;pre class="ui-code" data-mode="text"&gt;uint16_t value = PWM_RAMP_TOP;
uint8_t  i;
for (i = 0; i &amp;lt; 10; i++){
pwm_ramp_values[i] = value;
value              -= PWM_RAMP_TOP / 10;
}

static nrf_pwm_sequence_t const ramp_seq0 =
{
.values.p_common      = pwm_ramp_values,
.length               = NRF_PWM_VALUES_LENGTH(pwm_ramp_values),
.repeats              = 200,
.end_delay            = 0
};

static nrf_pwm_sequence_t const ramp_seq1 =
{
.values.p_common      = pwm_ramp_full_on,
.length               = NRF_PWM_VALUES_LENGTH(pwm_ramp_full_on),
.repeats              = 20000,
.end_delay            = 0
};
nrf_drv_pwm_complex_playback(&amp;amp;m_pwm0, &amp;amp;ramp_seq0, &amp;amp;ramp_seq1, 1, NRF_DRV_PWM_FLAG_LOOP);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>