<?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 while enabling interrupt and going into deep sleep</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/78422/high-power-consumption-while-enabling-interrupt-and-going-into-deep-sleep</link><description>Hello Nordic team, 
 Our current setup: 
 
 nRF52840 
 nRF SDK v15.00 
 
 
 In our current setup, the steps we take are as following: 
 Initialize nRF52840 -&amp;gt; BLE fast advertisement -&amp;gt; BLE slow advertisement -&amp;gt; Deep sleep 
 Once the timeout is completed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 17 Aug 2021 13:28:42 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/78422/high-power-consumption-while-enabling-interrupt-and-going-into-deep-sleep" /><item><title>RE: High power consumption while enabling interrupt and going into deep sleep</title><link>https://devzone.nordicsemi.com/thread/325322?ContentTypeID=1</link><pubDate>Tue, 17 Aug 2021 13:28:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1180f9ff-123b-4c81-815e-8269c4395351</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Avi&lt;/p&gt;
&lt;p&gt;Is there any way you can connect an amperemeter between the battery and the board supply, so you can monitor the current draw live without having to wait and see how long the battery will last?&lt;/p&gt;
&lt;p&gt;Then it should be quite easy to see how much difference there is in current consumption when enabling the motion interrupt.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also, have you tried to measure the voltage of the motion pin to ensure it is low when the device is in sleep?&lt;/p&gt;
&lt;p&gt;What is the rated capacity of the battery you are using?&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High power consumption while enabling interrupt and going into deep sleep</title><link>https://devzone.nordicsemi.com/thread/325033?ContentTypeID=1</link><pubDate>Mon, 16 Aug 2021 08:14:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a29c5d68-7f35-4228-bfed-1bd8eafda627</guid><dc:creator>avi_2020</dc:creator><description>&lt;p&gt;Hello T&lt;span&gt;orbj&amp;oslash;rn &lt;br /&gt;(@ovrebekk),&lt;br /&gt;&lt;br /&gt;Thank you for your prompt and detailed response. I have tried my best to answer all the questions.&amp;nbsp;&lt;br /&gt;Please have a look and let me know if I can add any more details to help you in any way possible.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Method of measuring:&lt;br /&gt;I am quantifying the power draw measurements by measuring the voltage drop across every&amp;nbsp;24 hours using a fully charged battery at the start. And I also measure the number of days they are usable before complete depletion.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Our hardware:&lt;br /&gt;We have a custom hardware. The only external component is an IMU and a battery on board and IMU is put to sleep/wake-on-motion before nRF52840 is put to deep sleep.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Power consumption tests:&lt;br /&gt;I have tried several configurations. There is one configuration which performs as per our expectations and calculations and lasts for 2 weeks as we expect, so we know it is completely possible. There is something we might be overlooking while configuring.&lt;br /&gt;&lt;br /&gt;Configuration which shows the desired behavior:&lt;br /&gt;Below is the part main() function for the configuration which&amp;nbsp;gives us the desired results:&lt;br /&gt;(In the code below, only a single line system_shutdown() call is added when&amp;nbsp;while (wom_interrupt_evt != true), rest is same as in the main question)&lt;br /&gt;By adding this call we are able to see the desired system power consumption as per the documentation, but we &lt;strong&gt;lose&lt;/strong&gt; the wake-on-motion functionality.&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    while (1)
    {
        if (interrupt_evt != true)
        {
            err_code = ble_advertising_start(&amp;amp;m_advertising, BLE_ADV_MODE_FAST);
            check_error_code(__func__, err_code, 1);

            gpio_interrupt_config(false);
            interrupt_evt_processing = false;
        }

        check_advertising_state();

        while (wom_interrupt_evt != true)
        {
            system_shutdown();
            __SEV();
            __WFE();
            // Enter System ON sleep mode
            __WFE();
        }

        interrupt_evt = false;
        wom_interrupt_evt = false;
    }&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;Real question:&lt;br /&gt;Could you please tell us a way in which we can incorporate both wake-on-motion&amp;nbsp;feature and the shutdown to save power.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you for clearing up the bit with LATCH, that we don&amp;#39;t&amp;nbsp;need to worry about it.&lt;br /&gt;&lt;br /&gt;We thank you immensely&amp;nbsp;for you help and support.&lt;br /&gt;&lt;br /&gt;Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Avi&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: High power consumption while enabling interrupt and going into deep sleep</title><link>https://devzone.nordicsemi.com/thread/324398?ContentTypeID=1</link><pubDate>Wed, 11 Aug 2021 08:32:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2f0bdbd-e877-41b1-9f8d-b5909290fb84</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Avi&lt;/p&gt;
&lt;p&gt;I can&amp;#39;t spot any immediate issues in your code.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you say the current consumption is &amp;quot;quite high&amp;quot;, are you able to quantify this?&lt;br /&gt;The exact current consumption can some times point to the cause of the issue.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;How about System ON sleep current, is this as expected?&lt;/p&gt;
&lt;p&gt;How are you testing the current consumption?&lt;/p&gt;
&lt;p&gt;Are you testing this on custom hardware or on a DK?&lt;/p&gt;
&lt;p&gt;If it is custom hardware, are you sure it is the nRF device drawing excessive current and not some other part of the system?&lt;/p&gt;
&lt;p&gt;As for the LATCH register, this is not something you need to worry about when using the GPIOTE driver. It is handled automatically.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Not using an input in low accuracy mode should add around 20uA to the sleep current.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>