<?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>Power Management and SystemON Idle</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58639/power-management-and-systemon-idle</link><description>Hi, 
 I have some doubts on how the &amp;quot;nrf_pwr_mgmt_run&amp;quot; function works. As far as I know this function enters in SystemOn Idle mode, so the CPU is in sleep. 
 I tested this using the &amp;quot;pwr_mgmt&amp;quot; example and placing some code. I created an app timer instance</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Mar 2020 13:57:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58639/power-management-and-systemon-idle" /><item><title>RE: Power Management and SystemON Idle</title><link>https://devzone.nordicsemi.com/thread/238320?ContentTypeID=1</link><pubDate>Thu, 05 Mar 2020 13:57:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef5a8fb7-e638-4d42-8538-cd29971b143a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;When you use NRF_LOG_DEFERRED&amp;nbsp;the log printing will not be blocking function (CPU have to stay at log module when printing out log). Instead it will be executed in the background and when it&amp;#39;s finished there will be an interrupt. This lead to the issue you saw :)&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power Management and SystemON Idle</title><link>https://devzone.nordicsemi.com/thread/238307?ContentTypeID=1</link><pubDate>Thu, 05 Mar 2020 13:20:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8343c160-c3d8-468f-aea5-4a8c767f6d52</guid><dc:creator>Jose Forno</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;Thanks very much. I disabled the&amp;nbsp;&lt;span&gt;NRF_LOG_DEFERRED in the sdk_config and it worked.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A last question, what does the NRF_LOG_DEFERRED do?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jos&amp;eacute; Forno&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power Management and SystemON Idle</title><link>https://devzone.nordicsemi.com/thread/238207?ContentTypeID=1</link><pubDate>Thu, 05 Mar 2020 09:36:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:843489e0-70c5-413d-8b5f-262d7247af4f</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jose,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;A quick test here showed that it was the UART logging module that caused some interrupt and woke the CPU up. This in turn will cause a UART log printing, and then will trigger another interrupt (most likely TX done) and so on.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;If you change UART logging to RTT logging (which doesn&amp;#39;t have an interrupt) or remove NRF_LOG_DEFERRED in sdk_config.h it would work as it should.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power Management and SystemON Idle</title><link>https://devzone.nordicsemi.com/thread/238101?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2020 15:49:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:874dba9a-1910-4a55-8b57-919c92e27511</guid><dc:creator>Jose Forno</dc:creator><description>&lt;p&gt;Hi Hung,&lt;/p&gt;
&lt;p&gt;Thanks for your answer.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not using softdevice, and only one app timer is used.&lt;/p&gt;
&lt;p&gt;I use the &amp;quot;pwm_mgmt&amp;quot; example&amp;nbsp;of the SDK v16.0.0 as a starting point. I only add one app timer and commented the buttons assignations code , because my board only have one button. The application doesn&amp;#39;t init the leds in the BSP, only the buttons.&lt;/p&gt;
&lt;p&gt;As far as I know the BSP library use the app timer, but I tested the code removing all the bsp code and the problems persist. Also, with the &amp;quot;nrf_pwr_mgmt_run&amp;quot; commented and the &amp;quot;&lt;span&gt;SEV, WFE&amp;quot; uncommented the problem disappear, even with BSP library running (without pressing the button off course).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The full code (it&amp;#39;s only one file):&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/64816.main.c"&gt;devzone.nordicsemi.com/.../64816.main.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And the sdk_config.h:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/13646.sdk_5F00_config.h"&gt;devzone.nordicsemi.com/.../13646.sdk_5F00_config.h&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Jos&amp;eacute; Forno&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Power Management and SystemON Idle</title><link>https://devzone.nordicsemi.com/thread/238061?ContentTypeID=1</link><pubDate>Wed, 04 Mar 2020 14:08:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7d3aa16-5732-4fa1-9c4f-a7bafd270bea</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Jose,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One easy way to track the timing of the CPU sleep mode is to toggle a GPIO in the main loop before and after the &amp;quot;enter sleep mode&amp;quot; command. Doing that you can monitor the active time before entering to sleep. You can also use the &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Kits/Power-Profiler-Kit"&gt;power profiler kit&lt;/a&gt; to measure the current to investigate.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Do you have anything else running in your code ? Any other app timer, there is a chance that other modules also have app timer ? was the softdevice active ?&amp;nbsp;&lt;br /&gt;Please post your full code.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>