<?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>Sleep and wake up using timer interrupt</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38047/sleep-and-wake-up-using-timer-interrupt</link><description>Dear All, 
 
 I am working with SDK version 15 and softdevice 132. 
 I want the device to advertise for 1 minute. Then go to low power mode. Again wake up after 5 minutes. Advertise again for 1 minutes...go on... like this. 
 
 I am using app_timer which</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 04 Sep 2018 09:03:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38047/sleep-and-wake-up-using-timer-interrupt" /><item><title>RE: Sleep and wake up using timer interrupt</title><link>https://devzone.nordicsemi.com/thread/147127?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2018 09:03:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c7d080b-d3d6-4380-91af-7d1fa52210f3</guid><dc:creator>GK</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you very much for the reply. It was because the system was calling the a function ( sd_power_system_off() called from&amp;nbsp; sleep_mode_enter())&amp;nbsp; to go to low power mode. I think this stops the timer also. I commented this and now the code is working fine.&amp;nbsp; And advertising is happening periodically.Please share your ideas. And in the main function i am calling the function &amp;#39;sd_app_evt_wait()&amp;#39;&amp;nbsp; to go to low power mode.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sleep and wake up using timer interrupt</title><link>https://devzone.nordicsemi.com/thread/147123?ContentTypeID=1</link><pubDate>Tue, 04 Sep 2018 08:57:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:baea7d98-4fa6-4bdf-9b50-a6f821af06bd</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I am not sure why this happens, but I was able to make it work with an app timer and the following timeout_handler:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void awesome_timeout_handler(void * p_context)
{
   if(!advertising_on)
   {
      NRF_LOG_INFO(&amp;quot;Start advertising&amp;quot;);
      advertising_start();
   }
   else
   {
      NRF_LOG_INFO(&amp;quot;Stop advertising!!&amp;quot;);
      (void) sd_ble_gap_adv_stop(m_advertising.adv_handle);
   }
      advertising_on = !advertising_on;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Check out the code yourself:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-d6a3f5a546af46d1bfd5c9af43611f81/ble_5F00_app_5F00_uart.zip"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_uart.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards, Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>