<?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>Relationship between ble_stack_init() and current consumption</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/60117/relationship-between-ble_stack_init-and-current-consumption</link><description>Hello devzone! I am using translation. 
 I&amp;#39;m trying various things in a continuation of my previous post , but I do have one question. 
 I set NRF_LOG_ENABLED to 0 at ble_app_blinky of SDK15.3. When ble_stack_init(), gap_param_init(), gatt_init(), services_init</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Apr 2020 21:01:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/60117/relationship-between-ble_stack_init-and-current-consumption" /><item><title>RE: Relationship between ble_stack_init() and current consumption</title><link>https://devzone.nordicsemi.com/thread/246941?ContentTypeID=1</link><pubDate>Mon, 27 Apr 2020 21:01:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77b11a52-0fa7-4c86-a1ce-de2f2ad789eb</guid><dc:creator>Ekmekci</dc:creator><description>&lt;p&gt;ohh, sorry for my typing mistake,&lt;/p&gt;
&lt;p&gt;i was mentioned about&amp;nbsp;&lt;span&gt;advertising_start();&amp;nbsp; &amp;nbsp;not&amp;nbsp;advertising_init();&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;i just wonder, why you want to disable ble_stack_init();?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;on the other hand,&lt;br /&gt;for correct measurement yo need to use power profiler kits.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Because, if you use&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/power/"&gt;https://devzone.nordicsemi.com/nordic/power/&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;you can see,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Pre-processing : Current : xxmA, length : xxuS&lt;br /&gt;Crystal ramp-up : Current : xmA, length : xxuS&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;so you have to calculate all currents and all lengths for measurement.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Relationship between ble_stack_init() and current consumption</title><link>https://devzone.nordicsemi.com/thread/245688?ContentTypeID=1</link><pubDate>Tue, 21 Apr 2020 05:09:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46da23ce-a507-4d38-94c3-18b74fe61748</guid><dc:creator>Daichi</dc:creator><description>&lt;p&gt;I understand that the active radio is related to the increased current consumption.&lt;/p&gt;
&lt;p&gt;Does advertising_init(); make the radio active?&lt;/p&gt;
&lt;p&gt;If so, that&amp;#39;s not match what I measured result.&lt;br /&gt;Activating advertising_start(); will increase the current, but activating advertising_init(); and deactivating advertising_start(); will still be about 5uA.&lt;/p&gt;
&lt;p&gt;What I want to know is what causes the current consumption to increase if you don&amp;#39;t do ble_stack_init();.&lt;/p&gt;
&lt;p&gt;Is there a mistake in the current measurement method?&lt;/p&gt;
&lt;p&gt;The SB40 of the DK board (PCA10056) is disconnected and the multimeter is connected to P22.&lt;br /&gt;4V is supplied to VIN_3-5V of P20 from a stabilized power supply.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Relationship between ble_stack_init() and current consumption</title><link>https://devzone.nordicsemi.com/thread/245422?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 06:32:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1587136f-8fd2-490f-aca3-5a30f71a7ac5</guid><dc:creator>Ekmekci</dc:creator><description>&lt;p&gt;Actually my meaning,&lt;/p&gt;
&lt;p&gt;if you are not activate Radio, it consumes low power.&lt;/p&gt;
&lt;p&gt;If you activate Radio, it is starting to consume higher power. Higher mean it depend your settings.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For example,&lt;br /&gt;&lt;span&gt;int main()&lt;/span&gt;&lt;br /&gt;&lt;span&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span&gt;while(true)&lt;/span&gt;&lt;br /&gt;&lt;span&gt;{&lt;/span&gt;&lt;br /&gt;&lt;span&gt;// Wait for an event.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;__WFE();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;// Clear the internal event register.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;__SEV();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;__WFE();&lt;/span&gt;&lt;br /&gt;&lt;span&gt;}&lt;/span&gt;&lt;br /&gt;&lt;span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;if you try this. you can measure your Custom board power consumption. Because it normally consumes around 5uA current.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;log_init();&lt;br /&gt; timers_init();&lt;br /&gt; buttons_leds_init(&amp;amp;erase_bonds);&lt;br /&gt; power_management_init();&lt;br /&gt; ble_stack_init();&lt;br /&gt; conn_evt_len_ext_set();&lt;br /&gt; gap_params_init();&lt;br /&gt; gatt_init();&lt;br /&gt; services_init();&lt;br /&gt;// advertising_init();&amp;nbsp; &amp;nbsp;deactivate&lt;br /&gt; conn_params_init();&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;even you try this it still consumes around 5uA&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When you activate&amp;nbsp;advertising_init(); it starts consume higher current. Because i already tried to explain above.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Relationship between ble_stack_init() and current consumption</title><link>https://devzone.nordicsemi.com/thread/245405?ContentTypeID=1</link><pubDate>Mon, 20 Apr 2020 03:17:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32827f5a-bdce-43e3-8c61-91aabca710a9</guid><dc:creator>Daichi</dc:creator><description>&lt;p&gt;Dear Ekmekci,&lt;/p&gt;
&lt;p&gt;Thanks for your reply.&lt;br /&gt;I apologize for the delay in replying.&lt;/p&gt;
&lt;p&gt;Your explanation has helped me to understand the BLE connection better.&lt;/p&gt;
&lt;p&gt;In my case, I think it falls under &lt;/p&gt;
[quote userid="76860" url="~/f/nordic-q-a/60117/relationship-between-ble_stack_init-and-current-consumption/244269"]ble_stack_init() it will not advertising, so it will not consume power[/quote]
&lt;p&gt;It was 5uA when only&amp;nbsp;&lt;span&gt;ble_stack_init()&lt;/span&gt; was active, but it is 420uA when all are disactivated.&lt;br /&gt;I think both of them are not&amp;nbsp;advertising&amp;nbsp;and connection, am I wrong?&lt;/p&gt;
&lt;p&gt;Best regards.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Relationship between ble_stack_init() and current consumption</title><link>https://devzone.nordicsemi.com/thread/244269?ContentTypeID=1</link><pubDate>Mon, 13 Apr 2020 05:28:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25dcefa2-0d75-4444-b6e0-151fe6394adc</guid><dc:creator>Ekmekci</dc:creator><description>&lt;p&gt;Dear Daichi,&lt;/p&gt;
&lt;p&gt;For power consumpiton there are too many parameter to you should care :)&lt;/p&gt;
&lt;p&gt;First of all, you should divide your scenario into two parts.&lt;/p&gt;
&lt;p&gt;1) Before connection (We call this advertising)&lt;/p&gt;
&lt;p&gt;2) After connection (We call this connection )&lt;/p&gt;
&lt;p&gt;There are two differents settings for above 2 parts.&lt;/p&gt;
&lt;p&gt;1) Before connection, All Ble examples comes with this parameters&lt;/p&gt;
&lt;p&gt;#define APP_ADV_INTERVAL 40&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;APP_ADV_INTERVAL&amp;nbsp;: time for advertising period. It&amp;#39;s unit is 0.625ms. So we can calculate 40*0.625ms = 25ms&lt;br /&gt;Its mean,&amp;nbsp; At the advertising scenario (Part 1 above) your project can broadcast every 25ms. You can imagine that it will consume too much power&lt;br /&gt;When i use tool for calculating power consumption (&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/power"&gt;https://devzone.nordicsemi.com/nordic/power&lt;/a&gt; ) When i set advertising period to 25ms. It calculated 305uA. It almost similar with your power consumption. When you deactivate ble_stack_init() it will not advertising, so it will not consume power. But, it is not solution :)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Solution 1: Try to increase&amp;nbsp;APP_ADV_INTERVAL, for example in my project this value is 8000. It&amp;#39;s mean 8000*0.625ms = 5000ms = 5sn.&lt;br /&gt;My device advertising at every 5sn. And power consumption will decrease from 305uA to 3.8uA.&lt;br /&gt;(Warning :when you try to search your device with phone or PC just wait while a moment because it will report his name at 5sn)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2) After connection, most ble examples comes with this parameters.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#define MIN_CONN_INTERVAL MSEC_TO_UNITS(500, UNIT_1_25_MS)&lt;br /&gt;#define MAX_CONN_INTERVAL MSEC_TO_UNITS(1000, UNIT_1_25_MS)&amp;nbsp;&lt;br /&gt;#define SLAVE_LATENCY 0&lt;br /&gt;#define CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;MIN_CONN_INTERVAL&amp;nbsp; and&amp;nbsp;MAX_CONN_INTERVAL&amp;nbsp; are data updating times for after connection.&amp;nbsp;&lt;br /&gt;SLAVE_LATENCY&amp;nbsp; : How many times your device will reject to answer to the central&lt;br /&gt;CONN_SUP_TIMEOUT&amp;nbsp; : After your device connection lost, after how many seconds your central will recognize there is connection lost.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;These all parameters connected to each others. You cannot change one of them randomly.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For example, in my project&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#define MIN_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS)&lt;br /&gt;#define MAX_CONN_INTERVAL MSEC_TO_UNITS(100, UNIT_1_25_MS)&amp;nbsp;&lt;br /&gt;#define SLAVE_LATENCY 50&lt;br /&gt;#define CONN_SUP_TIMEOUT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MSEC_TO_UNITS(32000, UNIT_10_MS)&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Its mean, my device will update if there is data to send in 100ms, When there is no data my device will select to reject 50times to give answer to the centra. If my device will go out of range or if i will turn off device power, my central will recongnize after 32second there is connection lost.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In this settings my consumption is&amp;nbsp; 3.1uA.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You should try to change and see what will happen.&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&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>