<?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>40uA on Power OFF nrf52832 s223</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18780/40ua-on-power-off-nrf52832-s223</link><description>Hello,
My problem is to much current c.a. 40uA in POWER OFF mode. Below attach code: 
 void power_down()
{
	nrf_gpio_pin_clear(22); // Wylacz mostek tensometryczny
	nrf_delay_ms(10);
	nrf_gpio_pin_clear(20); // Wylacz LDO 2V5
	nrf_delay_ms(10);</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 05 Jan 2017 14:08:49 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18780/40ua-on-power-off-nrf52832-s223" /><item><title>RE: 40uA on Power OFF nrf52832 s223</title><link>https://devzone.nordicsemi.com/thread/72551?ContentTypeID=1</link><pubDate>Thu, 05 Jan 2017 14:08:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85d65d8a-9fdc-4ea8-b017-1dde7910888b</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Yes, if you&amp;#39;re able to post your project here, that would be great.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 40uA on Power OFF nrf52832 s223</title><link>https://devzone.nordicsemi.com/thread/72552?ContentTypeID=1</link><pubDate>Thu, 05 Jan 2017 14:07:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8af4c45-e8f6-4da3-872b-f3a3a4203502</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Hi, are you measuring on the pca10040 DK or are you using a custom board? And what equipment are you using to measure current?&lt;/p&gt;
&lt;p&gt;It could be that the ADC is still running? Could you try to just run the below code and see what the current consumption is, just so we know that it&amp;#39;s not any hardware or measurement issues. Also try to enable the peripherals one after another to see when the consumption goes up.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;int main(void)
{
    utils_setup();
    softdevice_setup();
    sd_power_system_off();
    for (;;)
    {
        uint32_t err_code = sd_app_evt_wait();
        APP_ERROR_CHECK(err_code);
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Also, you always want to end your code with an infinite loop so that the CPU knows where to continue (e.g. if it returns from sd_power_system_off() (even though it might not do that))&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 40uA on Power OFF nrf52832 s223</title><link>https://devzone.nordicsemi.com/thread/72550?ContentTypeID=1</link><pubDate>Thu, 05 Jan 2017 10:11:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6164ef6a-a7b7-489f-b09a-9be6f14f3036</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;OK i thought it might be something with hardware bug in timer (errata 78), but if you are using drv, appareantly it is not. I would check the board first or post the whole (simplified but able to compile) project here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 40uA on Power OFF nrf52832 s223</title><link>https://devzone.nordicsemi.com/thread/72549?ContentTypeID=1</link><pubDate>Thu, 05 Jan 2017 09:46:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a5251f7-0cff-47d9-9fbd-8a2bae91b7a1</guid><dc:creator>cavalihno</dc:creator><description>&lt;p&gt;Both are crystal. Still the same problem. I am not sure if I do power_off steps properly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 40uA on Power OFF nrf52832 s223</title><link>https://devzone.nordicsemi.com/thread/72547?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2017 18:02:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52736947-6cb4-47e9-83f1-8657bb16a8d9</guid><dc:creator>cavalihno</dc:creator><description>&lt;p&gt;void timer_disable(void)
{
nrf_drv_timer_disable(&amp;amp;m_timer);
}&lt;/p&gt;
&lt;p&gt;&amp;amp;m_timer is instance of timer
static const nrf_drv_timer_t   m_timer = NRF_DRV_TIMER_INSTANCE(1);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 40uA on Power OFF nrf52832 s223</title><link>https://devzone.nordicsemi.com/thread/72546?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2017 17:53:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97aabbab-4baf-40a4-9b64-d920fe986a00</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;I mean if they are both crystals or what - I assume they are. There are few things that may go wrong here - hard to say without seeing code. However, I will try another blind-shot: what is inside timer_disable() function?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 40uA on Power OFF nrf52832 s223</title><link>https://devzone.nordicsemi.com/thread/72545?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2017 17:51:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c85f8a26-8b48-44af-9c22-903b7b255fec</guid><dc:creator>cavalihno</dc:creator><description>&lt;p&gt;HFCLK - 32MHz
LFCLK - 32,768 kHz&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 40uA on Power OFF nrf52832 s223</title><link>https://devzone.nordicsemi.com/thread/72544?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2017 17:43:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bced0c35-50b2-44fd-86b4-72673481e6dd</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;Sorry I edited my above comment just after you answered - you may have missed it. I would check that code on nrf52-DK and measure the current. Maybe something else is draining power.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 40uA on Power OFF nrf52832 s223</title><link>https://devzone.nordicsemi.com/thread/72543?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2017 17:39:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2c38e88-11c2-4c50-aa2e-07a5a4c1f873</guid><dc:creator>cavalihno</dc:creator><description>&lt;p&gt;Sorry, my mistake, I am using s223 ANT+ softdevice. No, inside the loop is only sleep until FORCE_SLEEP == 1. Then executs power_down(). Here nRF diables all pherips and go to Power OFF and now current consumption is 40uA.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 40uA on Power OFF nrf52832 s223</title><link>https://devzone.nordicsemi.com/thread/72548?ContentTypeID=1</link><pubDate>Wed, 04 Jan 2017 17:35:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b860d633-9cca-4d4d-aa6b-fe8452fafa59</guid><dc:creator>Wojtek</dc:creator><description>&lt;p&gt;By POWER OFF you mean code inside while loop? If so, you should use sd_app_evt_wait instead of these SEV and WFE instructions when softdevice is enabled (is it?). I don&amp;#39;t know which softdevice You are using, though there is no S223 :? Oh ok, by power off you mean power_down function. What LFCLK src are You using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>