<?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>low power delay implementation</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/26451/low-power-delay-implementation</link><description>Hi, I built my app on the ble_app_uart peripheral example. I am looking to replace nrf_delay_ms(ms); with a low power alternative, I figured a function with loop on power_manage(); and a one shot timer clearing a flag would do the job, and could just</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 31 Oct 2017 16:44:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/26451/low-power-delay-implementation" /><item><title>RE: low power delay implementation</title><link>https://devzone.nordicsemi.com/thread/104083?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2017 16:44:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8501ccbd-1d20-41a3-908f-6ca799775ac4</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Then I can only say that this construction is perfectly working for me, hard to say what detail broke it in your project. Hopefully the GPIO debug and logical analyzer will hint something...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: low power delay implementation</title><link>https://devzone.nordicsemi.com/thread/104085?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2017 15:29:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:492ca792-68df-4d54-8bc5-f32a2109d634</guid><dc:creator>erltot</dc:creator><description>&lt;p&gt;see comment right under uint32_t err code; in main&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: low power delay implementation</title><link>https://devzone.nordicsemi.com/thread/104084?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2017 15:25:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35b6f4b4-8729-4860-b6a9-707809f92015</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;If your app is based on any BLE example then it seems to be heavily customized because in your &lt;code&gt;main&lt;/code&gt; function there seems to be no Soft Device init. If that is true then it&amp;#39;s logical that &lt;code&gt;sd_app_wait&lt;/code&gt; call in your &lt;code&gt;power_manage&lt;/code&gt; doesn&amp;#39;t do anything (or returns error status which should cause hard fault and reset).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: low power delay implementation</title><link>https://devzone.nordicsemi.com/thread/104082?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2017 13:27:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25e62b9b-1606-47cf-aaae-7af3d38a1af1</guid><dc:creator>erltot</dc:creator><description>&lt;p&gt;I built my app on the ble_app_uart peripheral example, power_manage is unchanged:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/**@brief Function for placing the application in low power state while waiting for events.
 */
static void power_manage(void){
    uint32_t err_code = sd_app_evt_wait();
    APP_ERROR_CHECK(err_code);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I&amp;#39;ll attach a probe to a pin to check the actual delay time and get back to you about that&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: low power delay implementation</title><link>https://devzone.nordicsemi.com/thread/104081?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2017 11:12:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6a628f0-0366-4a8b-9cf3-67b1c55e4653</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;Sorry, your code looks good. What do you mean by it doesn&amp;#39;t work? Can you measure with some precise tool (like logical anayzer) what is actual delay on UART or RTT between start of &amp;quot;waiting&amp;quot; and &amp;quot;timer_ledelay&amp;quot; debug strings? This construction works in many apps I use... If you don&amp;#39;t use SD can you make sure what is actually running in your &lt;code&gt;power_manage&lt;/code&gt; function? It should be something like &lt;code&gt;examples\multiprotocol\ble_app_gzll\main.c&lt;/code&gt; SDK example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>