<?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>App Timer not run with PWM driver simultaneously</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79625/app-timer-not-run-with-pwm-driver-simultaneously</link><description>Hello, 
 I use NRF52832 with SDK 17.0.2. 
 I run app timer and pwm driver independently ok. 
 I merged App timer with PWM Driver. But only PWM run, I can&amp;#39;t make app timer app run. If I comment PWM driver so app timer run. 
 This my code 
 
 and my PWM</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Sep 2021 14:59:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79625/app-timer-not-run-with-pwm-driver-simultaneously" /><item><title>RE: App Timer not run with PWM driver simultaneously</title><link>https://devzone.nordicsemi.com/thread/330328?ContentTypeID=1</link><pubDate>Mon, 20 Sep 2021 14:59:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31b8c798-80de-49a6-8e20-4b1fae04b8d0</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Just to clarify:&lt;/p&gt;
&lt;p&gt;If you call pwm_init() after app_timer_init() and app_timer_start, then both PWM and app timer works fine. But when it is called before then only PWM works. Is this correct? What kinda error do you get when program hang?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App Timer not run with PWM driver simultaneously</title><link>https://devzone.nordicsemi.com/thread/330064?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 13:32:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0541be2-ebe8-425a-8175-fd6bb8899dd9</guid><dc:creator>Giang</dc:creator><description>&lt;p&gt;This my code:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://drive.google.com/file/d/1BxcqIrGU3BeNwUAX4HwJ1Kd8w30MyKIr/view?usp=sharing"&gt;PROJECT&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App Timer not run with PWM driver simultaneously</title><link>https://devzone.nordicsemi.com/thread/330060?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 13:19:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f49cc2a5-05f0-43c9-afab-bd8e1a435a4f</guid><dc:creator>Giang</dc:creator><description>&lt;p&gt;yes, it success, if it error, program will hang. But it run PWM normal, it only not run timer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App Timer not run with PWM driver simultaneously</title><link>https://devzone.nordicsemi.com/thread/329972?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 09:50:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:610ca8eb-5ac4-4fa4-b4a0-f2d6540d9276</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Seems like you worked it out?&lt;/p&gt;
&lt;p&gt;Not too sure why the order would be an issue. When you get initiate the PWM first, what do you get as return code on app_timer_init() and app_timer_start()? Are they called successfully?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App Timer not run with PWM driver simultaneously</title><link>https://devzone.nordicsemi.com/thread/329700?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2021 04:07:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:769cd9a1-27b0-4f7b-9dc0-b2a36d95ccd8</guid><dc:creator>Giang</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If I change&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;APP_ERROR_CHECK(app_timer_init());
create_timers();
int err_code = app_timer_start(m_repeated_timer_id, APP_TIMER_TICKS(200), NULL);
APP_ERROR_CHECK(err_code);
pwm_init(LED_1, LED_3);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It run PWM and Timer but&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;pwm_init(LED_1, LED_3);
APP_ERROR_CHECK(app_timer_init());
create_timers();
int err_code = app_timer_start(m_repeated_timer_id, APP_TIMER_TICKS(200), NULL);
APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;It only run PWM.&lt;/p&gt;
&lt;p&gt;And I don&amp;#39;t understand why.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App Timer not run with PWM driver simultaneously</title><link>https://devzone.nordicsemi.com/thread/329641?ContentTypeID=1</link><pubDate>Wed, 15 Sep 2021 13:29:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:147014cb-3c5d-4063-9d9f-de0a933cbac6</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you try debug the code and see if you are getting any error codes when running both at the same time? Do you have any logs?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>