<?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>SoftDevice preventing low-power state</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/34410/softdevice-preventing-low-power-state</link><description>I&amp;#39;m working on a BLE design for nRF52832, with SoftDevice S132 v5.0.0. The project uses FreeRTOS with Tickless Idle enabled. When the user powers the device off (from a UI perspective, not actually cutting power to the uP) there should be almost nothing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Jun 2018 15:54:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/34410/softdevice-preventing-low-power-state" /><item><title>RE: SoftDevice preventing low-power state</title><link>https://devzone.nordicsemi.com/thread/137740?ContentTypeID=1</link><pubDate>Tue, 26 Jun 2018 15:54:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2122681a-8d60-42ac-b41a-26530aacc82a</guid><dc:creator>rnelson</dc:creator><description>&lt;p&gt;It turns out our main issue was Anomaly 87 (FPU exception preventing low power), but I also implemented Austin&amp;#39;s suggestion since I was sometimes seeing the SoftDevice bounce out of sd_app_evt_wait() immediately.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice preventing low-power state</title><link>https://devzone.nordicsemi.com/thread/132756?ContentTypeID=1</link><pubDate>Tue, 22 May 2018 12:23:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ad3ab2c-1c51-4712-a6e4-43111626cdf6</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;You are of course correct. I read through the code a bit too fast &amp;amp; did not notice the else block.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice preventing low-power state</title><link>https://devzone.nordicsemi.com/thread/132515?ContentTypeID=1</link><pubDate>Fri, 18 May 2018 13:46:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af184e13-c70c-48c3-87b4-ed07c6c9c8bc</guid><dc:creator>rnelson</dc:creator><description>&lt;p&gt;Thanks Austin! That sounds very likely to be what I&amp;#39;m seeing as well. I&amp;#39;ll give your code a try as soon as I&amp;#39;m able to.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice preventing low-power state</title><link>https://devzone.nordicsemi.com/thread/132450?ContentTypeID=1</link><pubDate>Thu, 17 May 2018 23:19:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3222fcf6-ad00-4693-b12e-52631a7c0594</guid><dc:creator>Austin</dc:creator><description>&lt;p&gt;I also saw this behaviour with nRF52840 and S140 where&amp;nbsp;&lt;span&gt;sd_app_evt_wait() would return immediately on the first call when entering tickless idle.&amp;nbsp; I proposed a different method for entry/exit to idle in&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/24733/nrf52840-sdk-14-0-0-and-tickless-idle-freertos---some-suggestions/97396#97396"&gt;this&lt;/a&gt;&amp;nbsp;post.&amp;nbsp; The code attached to that post will stay in an inner loop around sd_app_evt_wait() until there is a runnable task or the idle time has expired.&amp;nbsp; From memory, the profiling counters in the inner loop show that sd_app_evt_wait() is almost always executed at least twice when entering idle, showing that the first sd_app_evt_wait() drops through.&amp;nbsp; There are some current consumption numbers listed which show the difference between normal tickless and my proposed changes.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice preventing low-power state</title><link>https://devzone.nordicsemi.com/thread/132354?ContentTypeID=1</link><pubDate>Wed, 16 May 2018 20:28:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b105968c-1b00-4092-a504-4602a49b811c</guid><dc:creator>rnelson</dc:creator><description>&lt;p&gt;Bjorn - thanks for the quick response. I&amp;#39;m looking at nrf_pwr_mgmt.c in SDK 14.2.0, and it does NOT appear that _WFE() is called after sd_app_evt_wait(). Relevant code snippet:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;// Wait for an event.&lt;br /&gt;#ifdef SOFTDEVICE_PRESENT&lt;br /&gt; if (nrf_sdh_is_enabled())&lt;br /&gt; {&lt;br /&gt; ret_code_t ret_code = sd_app_evt_wait();&lt;br /&gt; ASSERT((ret_code == NRF_SUCCESS) || (ret_code == NRF_ERROR_SOFTDEVICE_NOT_ENABLED));&lt;br /&gt; UNUSED_VARIABLE(ret_code);&lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt;#endif // SOFTDEVICE_PRESENT&lt;br /&gt; {&lt;br /&gt; // Wait for an event.&lt;br /&gt; __WFE();&lt;br /&gt; // Clear the internal event register.&lt;br /&gt; __SEV();&lt;br /&gt; __WFE();&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;Note the &amp;quot;else&amp;quot; before the block containing _WFE().&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any other suggestions?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br /&gt;--Russ&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SoftDevice preventing low-power state</title><link>https://devzone.nordicsemi.com/thread/132261?ContentTypeID=1</link><pubDate>Wed, 16 May 2018 11:54:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:37f03de5-5987-402b-83e4-0e568b4780a7</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;In most SDK examples, the call to nrf_pwr_mgmt_run() inside the main for or while loop calls the sd_app_evt_wait() function &amp;amp; then afterwards calls the _WFE() function, which puts the CPU into a low power state. Take a look at the blinky central example inside the sdk/ble_central folder for example. You should not have to disable the softdevice in order to get power savings.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>