<?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>High power consumption with Distance Measurement enabled (when not active)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/114479/high-power-consumption-with-distance-measurement-enabled-when-not-active</link><description>Hi, 
 We are experimenting with Distance Measurement feature a we observed 2 issues. 
 HW: Custom HW with: CR2032 coin cell -&amp;gt; joulescope -&amp;gt; 40 uF capacity in ceramic caps -&amp;gt; BL652 (nrf52832) module from Ezurio. 
 SW: NRF connect SDK 2.7.0, custom toolchain</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Sep 2024 15:12:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/114479/high-power-consumption-with-distance-measurement-enabled-when-not-active" /><item><title>RE: High power consumption with Distance Measurement enabled (when not active)</title><link>https://devzone.nordicsemi.com/thread/501785?ContentTypeID=1</link><pubDate>Mon, 09 Sep 2024 15:12:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48fc43df-6a77-477b-ad86-64b8e258c63c</guid><dc:creator>xorly</dc:creator><description>&lt;p&gt;Ok, after physically disconnecting debugger, it got better. There are still still some spikes, but only 1 after each advertising and if there is not adverting, no current spikes at all. I thought that J-link in detached state is inert, but obviously not.&lt;/p&gt;
&lt;p&gt;I have to get a rubber duck for my future debugging &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f605.svg" title="Sweat smile"&gt;&amp;#x1f605;&lt;/span&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High power consumption with Distance Measurement enabled (when not active)</title><link>https://devzone.nordicsemi.com/thread/501771?ContentTypeID=1</link><pubDate>Mon, 09 Sep 2024 14:12:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d611fad-2583-4449-8004-53b96ec2a621</guid><dc:creator>xorly</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
&lt;p&gt;I simplified my code as much as I could:&lt;/p&gt;
&lt;p&gt;- BLE is not even initialized (thus neither DM)&lt;/p&gt;
&lt;p&gt;- main function/thread only contains &lt;code&gt;k_thread_suspend(k_current_get());&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;and those periodic current spikes are still there. Joulescope shows 19.999 ms between them. What is the default source of timing in zephyr on nrf52(832)? Could it be overflow of some HW timer user for time keeping? Logging and printing is disabled via Kconfig.&lt;/p&gt;
&lt;p&gt;Only default threads are there:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;Address     Name      Status  Priority Stack Usage % (Used B / Size B)  
0x20001ad8  BT LW WQ  PRESTART   10    13 % (168 / 1304)
0x200027b0  MPSL Work PRESTART   246   16 % (168 / 1024)
0x200028d8  idle      RUNNING    15    10 % ( 32 / 320)
0x200029e0  main      SUSPENDED  0     16 % (160 / 1024)
0x20002ae8  sysworkq  PRESTART   255    8 % (168 / 2048)&lt;/pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;How can I debug this?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;These spikes result in average consumption of 30 uA.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High power consumption with Distance Measurement enabled (when not active)</title><link>https://devzone.nordicsemi.com/thread/501542?ContentTypeID=1</link><pubDate>Fri, 06 Sep 2024 12:43:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c933933d-80a0-4743-9256-816b2f70fbdc</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;It&amp;#39;s a bit hard to tell from these screenshots, but my guess is that these extra spikes you&amp;#39;re seeing is the synchronization between the advertiser and the scanner as well as Distance Measurement that is occurring, since the Distance Measurement Toolbox uses synchronization between devices to do the Distance Measurements. This is something the Online Power Profiler does not take into account and so I think that&amp;#39;s what we&amp;#39;re seeing on your end here. If you&amp;#39;d like I can try to set up a DM sample with power measurements on my end next week to confirm this behavior.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High power consumption with Distance Measurement enabled (when not active)</title><link>https://devzone.nordicsemi.com/thread/501364?ContentTypeID=1</link><pubDate>Thu, 05 Sep 2024 12:30:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:223d7b72-e53f-4d57-b9d2-c769cce7cda8</guid><dc:creator>xorly</dc:creator><description>&lt;p&gt;Hi, sorry for the mess, but I did not find a way how to edit original post to clean it up and remove outdated stuff from there.&lt;/p&gt;
&lt;p&gt;One minor thing: Timing of the current waveform in&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/114479/high-power-consumption-with-distance-measurement-enabled-when-not-active/501161"&gt;RE: High power consumption with Distance Measurement enabled (when not active)&lt;/a&gt; does not match the timing from &lt;a href="https://devzone.nordicsemi.com/power/w/opp/2/online-power-profiler-for-bluetooth-le"&gt;online power profiler&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Main issue&lt;/strong&gt; are those periodic current spikes in between advertising packets. They seem to start after being scanned for the first time and &lt;em&gt;they never stop&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;OK: Start and periodic advertising (no excessive current spikes)&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/adv_5F00_100m_5F00_ok.png" /&gt;&lt;/p&gt;
&lt;p&gt;OK: Zoom 1 (multiple advertising packets)&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/adv_5F00_100m_5F00_ok_5F00_zoom1.png" /&gt;&lt;/p&gt;
&lt;p&gt;OK: Zoom 2 (one advertising packet)&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/adv_5F00_100m_5F00_ok_5F00_zoom2.png" /&gt;&lt;/p&gt;
&lt;p&gt;NOK: Transition before and after being scanned&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/adv_5F00_100m_5F00_ok_5F00_to_5F00_nok.png" /&gt;&lt;/p&gt;
&lt;p&gt;NOK: Zoom 1 (detail of transition)&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/adv_5F00_100m_5F00_ok_5F00_to_5F00_nok_5F00_zoom1.png" /&gt;&lt;/p&gt;
&lt;p&gt;NOK: Zoom 2 (detail of one advertising packet + scan req. scan response and first 2 periodic current spikes)&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/adv_5F00_100m_5F00_ok_5F00_to_5F00_nok_5F00_zoom2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High power consumption with Distance Measurement enabled (when not active)</title><link>https://devzone.nordicsemi.com/thread/501356?ContentTypeID=1</link><pubDate>Thu, 05 Sep 2024 11:58:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:320802f1-8919-4e1a-8280-279bc15308a3</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;What issue is it that is still remaining now? Is it the increased power consumption after advertising? If so, what exactly is the average current consumption after advertisements, and can you zoom in on the graph so we can get a better view of how the spikes look? Something must not be going to sleep as expected if that&amp;#39;s the case.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High power consumption with Distance Measurement enabled (when not active)</title><link>https://devzone.nordicsemi.com/thread/501332?ContentTypeID=1</link><pubDate>Thu, 05 Sep 2024 11:06:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6408925e-0d85-4c19-81af-8ed86c7419df</guid><dc:creator>xorly</dc:creator><description>&lt;p&gt;One more update - those periodic power spikes in between advertising packets start appearing, once the device is scanned. It is not bound to DM.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High power consumption with Distance Measurement enabled (when not active)</title><link>https://devzone.nordicsemi.com/thread/501211?ContentTypeID=1</link><pubDate>Wed, 04 Sep 2024 15:32:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4925ce58-2c9c-4b51-934c-5cf7eef96363</guid><dc:creator>xorly</dc:creator><description>&lt;p&gt;Ok, first issue is mostly resolved. I did not notice, my advertising running with 100 ms period and expected 500 ms. Despite that, power consumption timing does not match the profiler, but it&amp;#39;s not a big deal.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High power consumption with Distance Measurement enabled (when not active)</title><link>https://devzone.nordicsemi.com/thread/501161?ContentTypeID=1</link><pubDate>Wed, 04 Sep 2024 12:37:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e77763e-ad32-4a47-9bf5-fa1e7966bbcc</guid><dc:creator>xorly</dc:creator><description>&lt;p&gt;One more screenshot of advertising. It takes longer than online profiler displays. There are quite long pauses in between. Only 2 Bytes of AD data i sent. 9 more Bytes are in scan response (not being scanned in captured moment).&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/advertising_5F00_timing.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>