<?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>watchdog reset after PWM</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23487/watchdog-reset-after-pwm</link><description>Hello, 
 I&amp;#39;m playing beep sound using pwm1 (timer1). 
 The onSound() starts beep sound. 
 The disableBuzzer() terminates pwm1. 
 The handler_buzzer() selects continuous sound playback or pwm1 termination. 
 
 Abnormal condition with log message</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Jul 2017 10:45:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23487/watchdog-reset-after-pwm" /><item><title>RE: watchdog reset after PWM</title><link>https://devzone.nordicsemi.com/thread/92257?ContentTypeID=1</link><pubDate>Mon, 17 Jul 2017 10:45:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:989b2cbd-c501-46ba-a38a-ee10b1f2283b</guid><dc:creator>air</dc:creator><description>&lt;p&gt;It&amp;#39;s system on sleep.
I use GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS : 12.
I checked to use more than 4 channels from your co-worker.
And I think this problem is related with the app_timer.
I asked this today.&lt;/p&gt;
&lt;p&gt;Hellow,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m using app_timer to play the buzzer.&lt;/p&gt;
&lt;p&gt;The default behavior is 1. key in 2. timer start: 8Sec for key action stop check 3. Buzzer on (pwm1) 3. buzzer timer start 4. Buzzer timer stop. 5. buzzer off&lt;/p&gt;
&lt;p&gt;The odd thing is 1. Abnormal termination of the timer occurs. - The 8 second timer in process 2 is terminated as soon as it starts. - Due to this phenomenon, abnormal operation of the buzzer makes the overall wrong operation.   Below is a log message. The current issue is being debugged for a few days now. Help is urgently needed.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;
&lt;p&gt;// * normal message 0&amp;gt; key in : touch 1 0&amp;gt; key action : touch 1 0&amp;gt; timer - normal start 0&amp;gt; buzzer start 0&amp;gt; buzzer timer start : 0 0&amp;gt; pwm-buzzer uninit error : 0 0&amp;gt; pwm-buzzer init error : 0 0&amp;gt; pwm-buzzer enable 0&amp;gt; pwm-buzzer duty set 0&amp;gt; sleep 0&amp;gt; buzzer timer stop : 0 0&amp;gt; timer handler 0&amp;gt; buzzer timer start : 0 0&amp;gt; pwm-buzzer uninit error : 0 0&amp;gt; pwm-buzzer init error : 0 0&amp;gt; pwm-buzzer enable 0&amp;gt; pwm-buzzer duty set 0&amp;gt; sleep 0&amp;gt; buzzer timer stop : 0 0&amp;gt; timer handler 0&amp;gt; buzzer stop 0&amp;gt; sleep *&lt;/p&gt;
&lt;p&gt;// * abnormal message 0&amp;gt; key in : touch 1 0&amp;gt; key action : touch 1 0&amp;gt; timer : normal start 0&amp;gt; buzzer start 0&amp;gt; timer : normal end ---&amp;gt;&amp;gt;&amp;gt; abnormal timer stop !!!!!!! 0&amp;gt; buzzer start ---&amp;gt;&amp;gt;&amp;gt; another buzzer start when time stopped : not acceptable !!! 0&amp;gt; buzzer timer start : 0 0&amp;gt; pwm-buzzer uninit error : 0 0&amp;gt; pwm-buzzer init error : 0 0&amp;gt; pwm-buzzer enable 0&amp;gt; pwm-buzzer duty set 0&amp;gt; buzzer timer stop : 0 0&amp;gt; buzzer timer stop : 0 0&amp;gt; timer handler 0&amp;gt; buzzer timer start : 0 0&amp;gt; pwm-buzzer uninit error : 0 0&amp;gt; pwm-buzzer init error : 0 0&amp;gt; pwm-buzzer enable 0&amp;gt; pwm-buzzer duty set 0&amp;gt; buzzer timer stop : 0 0&amp;gt; timer handler 0&amp;gt; buzzer stop 0&amp;gt; buzzer timer start : 0 0&amp;gt; pwm-buzzer uninit error : 0 0&amp;gt; pwm-buzzer init error : 0 0&amp;gt; pwm-buzzer enable 0&amp;gt; pwm-buzzer duty set 0&amp;gt; sleep 0&amp;gt; sleep *&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: watchdog reset after PWM</title><link>https://devzone.nordicsemi.com/thread/92256?ContentTypeID=1</link><pubDate>Fri, 14 Jul 2017 11:45:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:167b175a-1405-4d6b-a853-9d23e1f60fd8</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Is this System OFF or System ON sleep ? I assume that you are using GPIOTE for the button? The nRF51 has only 4 GPIOTE channels and the PWM library uses one per PWM channel. So if you run out of GPIOTE channels you will get the &lt;code&gt;NRF_ERROR_NO_MEM&lt;/code&gt; error.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: watchdog reset after PWM</title><link>https://devzone.nordicsemi.com/thread/92258?ContentTypeID=1</link><pubDate>Fri, 14 Jul 2017 02:22:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be13af81-594e-48a2-95cb-cd6597f6de42</guid><dc:creator>air</dc:creator><description>&lt;p&gt;I received an &amp;quot;NRF_ERROR_NO_MEM&amp;quot; error message when calling app_pwm_init ().
It occurs mainly when the MCU sleeps for a long time and receives a button input and generates a buzzer sound after the button process.
I don&amp;#39;t use any PPI except PWM1/2.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: watchdog reset after PWM</title><link>https://devzone.nordicsemi.com/thread/92255?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2017 10:47:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:126f9b3c-e83f-4bc2-9d6e-6850f8754b47</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Ok, but according to the error message, the PWM instance is not initialized. So it’s seems that you are trying to uninitialize the PWM instance, but it’s &lt;strong&gt;already uninitialized&lt;/strong&gt;, and you get the error-code NRF_ERROR_INVALID_STATE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: watchdog reset after PWM</title><link>https://devzone.nordicsemi.com/thread/92254?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2017 10:27:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb158664-a5cb-4e03-be6b-55f0fee41217</guid><dc:creator>air</dc:creator><description>&lt;p&gt;I used app_pwm_uninit() to play another sound during playback.
I remember that I used to do that on other MCUs.
If I continue to modify / check with a debug message, it seems to be almost happening in makeSound () function.
If I&amp;#39;m wrong, I&amp;#39;d like some help on how to fix it.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: watchdog reset after PWM</title><link>https://devzone.nordicsemi.com/thread/92252?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2017 09:23:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9245adf1-ddb5-4d22-8850-7d0c5cdb8750</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;If you take a look at the documentation &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.2.0/group__app__pwm.html?cp=4_0_3_6_8_27_18#ga7a3abe8d544cceffd9eb6e39f3e221ca"&gt;here&lt;/a&gt;, you will get &lt;code&gt;NRF_ERROR_INVALID_STATE&lt;/code&gt; returned from &lt;code&gt;app_pwm_uninit(...)&lt;/code&gt; if the given instance was not initialized.&lt;/p&gt;
&lt;p&gt;Also, why do you do uninitializing when you call makeSound()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: watchdog reset after PWM</title><link>https://devzone.nordicsemi.com/thread/92253?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2017 08:22:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdb490f2-3277-4196-82ed-14511f4c68e4</guid><dc:creator>air</dc:creator><description>&lt;p&gt;I saw NRF_ERROR_INVALID_STATE (NRF_ERROR_BASE_NUM + 8) when app_pwm_uninit(&amp;amp;PWM_BUZZER); called. But PWM works.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>