<?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>Lower power in sleep of GPIO as outputs?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20670/lower-power-in-sleep-of-gpio-as-outputs</link><description>Hi Nordic, 
 In my application, I want to consume as less power as I can. In the initialization I have this functions: 
 static void utils_setup(void)
{
 APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, false);
}

static void softdevice_setup</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 27 Mar 2017 07:16:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20670/lower-power-in-sleep-of-gpio-as-outputs" /><item><title>RE: Lower power in sleep of GPIO as outputs?</title><link>https://devzone.nordicsemi.com/thread/80599?ContentTypeID=1</link><pubDate>Mon, 27 Mar 2017 07:16:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a40c90ba-3804-4b30-a9f3-c983d0ceb625</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;I found out the problem: I was configuring the input pins as high accuracy (which I certainly do not need). I fixed it changing this line:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_TOGGLE(true);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_drv_gpiote_in_config_t in_config = GPIOTE_CONFIG_IN_SENSE_TOGGLE(false);
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lower power in sleep of GPIO as outputs?</title><link>https://devzone.nordicsemi.com/thread/80598?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2017 17:22:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1cd7016-1452-4b37-8521-2d0844ba13a2</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;I have tried this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_gpio_cfg_input(LED_UP, NRF_GPIO_PIN_NOPULL);
nrf_gpio_cfg_input(LED_DOWN, NRF_GPIO_PIN_NOPULL);
nrf_gpio_cfg_input(LED_LEFT, NRF_GPIO_PIN_NOPULL);
nrf_gpio_cfg_input(LED_RIGHT, NRF_GPIO_PIN_NOPULL);

nrf_gpio_input_disconnect(LED_UP);
nrf_gpio_input_disconnect(LED_DOWN);
nrf_gpio_input_disconnect(LED_LEFT);
nrf_gpio_input_disconnect(LED_RIGHT);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Didnt make any difference...&lt;/p&gt;
&lt;p&gt;I also have changed the function timer stop from:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void timer2_stop()
{
    NRF_TIMER2-&amp;gt;TASKS_STOP = 1;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void timer2_stop()
{
    NRF_TIMER2-&amp;gt;TASKS_SHUTDOWN = 1;
    NRF_TIMER2-&amp;gt;TASKS_STOP = 1;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;but it made no difference :(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lower power in sleep of GPIO as outputs?</title><link>https://devzone.nordicsemi.com/thread/80597?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2017 07:51:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:22ff60ec-e53b-4da0-9b75-66a2c35b118f</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;Hi Stian,&lt;/p&gt;
&lt;p&gt;This is what I have been testing and I still get current consumption of 1 mA&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void do_to_sleeping(instance_data_t* data)
{
    timer2_stop();
    close_channel(&amp;amp;channel_0);
    nrf_gpio_cfg_default(LED_UP);
    nrf_gpio_cfg_default(LED_DOWN);
    nrf_gpio_cfg_default(LED_LEFT);
    nrf_gpio_cfg_default(LED_RIGHT);

    nrf_gpio_pin_clear(LED_UP);
    nrf_gpio_pin_clear(LED_DOWN);
    nrf_gpio_pin_clear(LED_LEFT);
    nrf_gpio_pin_clear(LED_RIGHT);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This nrf_gpio_cfg_default() function is supposed to do what you told me, but I still get high power consumption.&lt;/p&gt;
&lt;p&gt;Should I set as input and disconnect in another way?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Lower power in sleep of GPIO as outputs?</title><link>https://devzone.nordicsemi.com/thread/80596?ContentTypeID=1</link><pubDate>Wed, 22 Mar 2017 10:40:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d422b2a-1c18-43cf-ae42-d0a3faa1e2d5</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You should configure the GPIO&amp;#39;s as input and disconnect the input buffer before going to sleep, this way the pins will be floating and no current will go through them.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>