<?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>exit from sleep and advertising time</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58278/exit-from-sleep-and-advertising-time</link><description>Could it possible to reduce INIT and ADVERISE times ? 
 What is normal startup time for nrf52832 init peripheral for advertising? 
 What is the minimum possible advertising time? 
 I want reduce my average current consumption, for now I have external</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Feb 2020 12:55:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58278/exit-from-sleep-and-advertising-time" /><item><title>RE: exit from sleep and advertising time</title><link>https://devzone.nordicsemi.com/thread/236542?ContentTypeID=1</link><pubDate>Wed, 26 Feb 2020 12:55:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:27ef3f11-6198-4913-9bfb-239d2e1c86e7</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thanks for the clarification. System OFF mode is typically used when you want the device to remain &amp;quot;OFF&amp;quot; for more extended periods. But I guess you&amp;nbsp;may be able to lower total average current if the external interrupt source is going to be kept active anyway (or if it consumes significantly less power than the 52 in standby).&lt;/p&gt;
&lt;p&gt;To reduce the startup time&amp;nbsp;you can try to select the internal RC oscillator when you enable the Softdevice instead of the external 32KHz crystal. The code snippet below is from sdk_config.h and shows the clock settings you can use to make the Softdevice select the RC oscillator.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;//==========================================================

// &amp;lt;h&amp;gt; Clock - SoftDevice clock configuration

//==========================================================
// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_SRC  - SoftDevice clock source.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_SRC_RC 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_SRC_XTAL 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_SRC_SYNTH 

#ifndef NRF_SDH_CLOCK_LF_SRC
#define NRF_SDH_CLOCK_LF_SRC 0
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_CTIV - SoftDevice calibration timer interval. 
#ifndef NRF_SDH_CLOCK_LF_RC_CTIV
#define NRF_SDH_CLOCK_LF_RC_CTIV 16
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_RC_TEMP_CTIV - SoftDevice calibration timer interval under constant temperature. 
// &amp;lt;i&amp;gt; How often (in number of calibration intervals) the RC oscillator shall be calibrated
// &amp;lt;i&amp;gt;  if the temperature has not changed.

#ifndef NRF_SDH_CLOCK_LF_RC_TEMP_CTIV
#define NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2
#endif

// &amp;lt;o&amp;gt; NRF_SDH_CLOCK_LF_ACCURACY  - External clock accuracy used in the LL to compute timing.
 
// &amp;lt;0=&amp;gt; NRF_CLOCK_LF_ACCURACY_250_PPM 
// &amp;lt;1=&amp;gt; NRF_CLOCK_LF_ACCURACY_500_PPM 
// &amp;lt;2=&amp;gt; NRF_CLOCK_LF_ACCURACY_150_PPM 
// &amp;lt;3=&amp;gt; NRF_CLOCK_LF_ACCURACY_100_PPM 
// &amp;lt;4=&amp;gt; NRF_CLOCK_LF_ACCURACY_75_PPM 
// &amp;lt;5=&amp;gt; NRF_CLOCK_LF_ACCURACY_50_PPM 
// &amp;lt;6=&amp;gt; NRF_CLOCK_LF_ACCURACY_30_PPM 
// &amp;lt;7=&amp;gt; NRF_CLOCK_LF_ACCURACY_20_PPM 
// &amp;lt;8=&amp;gt; NRF_CLOCK_LF_ACCURACY_10_PPM 
// &amp;lt;9=&amp;gt; NRF_CLOCK_LF_ACCURACY_5_PPM 
// &amp;lt;10=&amp;gt; NRF_CLOCK_LF_ACCURACY_2_PPM 
// &amp;lt;11=&amp;gt; NRF_CLOCK_LF_ACCURACY_1_PPM 

#ifndef NRF_SDH_CLOCK_LF_ACCURACY
#define NRF_SDH_CLOCK_LF_ACCURACY 1
#endif
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="ivnn"]Also what is normal standby current for nrf52832 without advertise? I see its around 3 mA (58 μA/MHz * 64)[/quote]
&lt;p&gt;&amp;nbsp;The normal standby current (system ON) should be around 2uA, or 0.3 uA if you are in System OFF. To help illustrate this I modified the beacon example in SDK 16.0.0 to advertise at 2 s intervals and captured some current plots with the power profiler kit as shown below.&lt;/p&gt;
&lt;p&gt;CPU enters System ON mode between advertisment events:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-0cac42de6bd14160bbfa5f7755a8438a/adv_5F00_evt.PNG" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Measured IDLE current is measured to 1.3 uA in this case, but you can generally expect it to be closer to 2uA&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-0cac42de6bd14160bbfa5f7755a8438a/idle_5F00_current.PNG" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Modified beacon example. Pre-compiled hex included:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-0cac42de6bd14160bbfa5f7755a8438a/ble_5F00_app_5F00_beacon_5F00_2s.zip"&gt;devzone.nordicsemi.com/.../ble_5F00_app_5F00_beacon_5F00_2s.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: exit from sleep and advertising time</title><link>https://devzone.nordicsemi.com/thread/236338?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2020 16:13:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:61d176ec-a5fc-4ddf-a096-47174f1a9f66</guid><dc:creator>ivnn</dc:creator><description>&lt;p&gt;Hi, thanks for your feedback&amp;nbsp;&lt;br /&gt;for now my working steps looks like this:&lt;/p&gt;
&lt;p&gt;I have external interrupt pulse (every 2 sec)&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;after reset reason 0 (power on) I perform global init then&lt;/li&gt;
&lt;li&gt;when I finish&amp;nbsp;advertising (or some other process)&amp;nbsp;I configure&amp;nbsp;nrf_gpio_cfg_sense_input() and call for&amp;nbsp;&lt;span&gt;&lt;em&gt;sd_power_system_off()&lt;/em&gt;&amp;nbsp;to reduce consumption&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;when nrf52 catch interrupt pulse(reset reason 65536)-&amp;gt;init advertise-&amp;gt; start advertise with 20ms interval during my custom timeout of 200ms-&amp;gt;goto step 2.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I see a possible improvements:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;reduce my custom timeout -&amp;gt; reduce num of advertise packets (add some delay to other device connection)&lt;/li&gt;
&lt;li&gt;reduce num of process which I initialize after&amp;nbsp;startup&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;nbsp;Yes, I want advertise one or few times every 2 sec to archive low average current.&amp;nbsp;Could you describe a clear steps to archive low current with advertisement, should I call &lt;em&gt;sd_power_system_off()&lt;/em&gt;&lt;span&gt;&amp;nbsp; during 2 sec interval&lt;/span&gt;?&lt;/p&gt;
&lt;p&gt;Also what is normal standby current for nrf52832 without advertise? I see its around 3 mA (58 &amp;mu;A/MHz * 64)&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Thx!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: exit from sleep and advertising time</title><link>https://devzone.nordicsemi.com/thread/236306?ContentTypeID=1</link><pubDate>Tue, 25 Feb 2020 14:58:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1b6d33a-cfb1-42a3-afea-a3e7de81398f</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Please share your source code if possible. It&amp;#39;s not clear why you have to repeat the&amp;nbsp;init routine every time. Usually, you do it once on startup. Also, it looks to be a burst of advertisement events during the 200 ms advertisement period, is that intentional or do you really want it to advertise 1 time every 2 seconds?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that it should be possible to get an average current of around 7-8 uA if you just advertise at 2 second intervals.&amp;nbsp;Try our online power profiler&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/power/"&gt;https://devzone.nordicsemi.com/nordic/power/&lt;/a&gt;&amp;nbsp;if you want to estimate excepted current consumption for other scenarios.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>