<?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>nrf52DK 32k crystal current higher than RC</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23156/nrf52dk-32k-crystal-current-higher-than-rc</link><description>Testing on nrf52DK (QFAAB0), without softdevice, unfortunately still on SDK10 and
NRF52 sleeping on RTC. Programming pins disconnected. 
 Measured: 
 
 low frequency clock source being external crystal with 3.05uA , 
 running on RC oscillator it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 Jun 2017 09:24:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23156/nrf52dk-32k-crystal-current-higher-than-rc" /><item><title>RE: nrf52DK 32k crystal current higher than RC</title><link>https://devzone.nordicsemi.com/thread/91086?ContentTypeID=1</link><pubDate>Fri, 30 Jun 2017 09:24:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42b9296a-95b2-4c29-8b52-23d7ced5c750</guid><dc:creator>lev</dc:creator><description>&lt;p&gt;Thank you so much
Now on Xtal consumes around 2,1uA and RC 2.0uA. Coming from Atmel world where unconfigured floating inputs always drew unexpected amounts (at least tinys)... So this must be possible because of true input-disconnect...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52DK 32k crystal current higher than RC</title><link>https://devzone.nordicsemi.com/thread/91085?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2017 17:41:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:518589b9-5ef2-4ab6-a571-444d245b8318</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Try &lt;code&gt;nrf_gpio_cfg_default()&lt;/code&gt; for all those pins - this should yield less current consumtion.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf52DK 32k crystal current higher than RC</title><link>https://devzone.nordicsemi.com/thread/91084?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2017 15:28:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ba95b4b-390f-4bb0-a757-685665edb2e9</guid><dc:creator>lev</dc:creator><description>&lt;p&gt;//&lt;strong&gt;Working code based on SDK 12.2. Exactly the same results.&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;quot;nrf.h&amp;quot;
#include &amp;quot;nrf_gpio.h&amp;quot;
#include &amp;quot;nrf_drv_rtc.h&amp;quot;
#include &amp;quot;nrf_drv_clock.h&amp;quot;
#include &amp;quot;app_error.h&amp;quot;
#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;stdbool.h&amp;gt;

const nrf_drv_rtc_t rtc = NRF_DRV_RTC_INSTANCE(0);

static void rtc_handler(nrf_drv_rtc_int_type_t int_type)
{
}

static void lfclk_config(void)
{
    ret_code_t err_code = nrf_drv_clock_init();
    APP_ERROR_CHECK(err_code);

    nrf_drv_clock_lfclk_request(NULL);
}

static void rtc_config(void)
{
    uint32_t err_code;

    //Initialize RTC instance
    nrf_drv_rtc_config_t config = NRF_DRV_RTC_DEFAULT_CONFIG;
    err_code = nrf_drv_rtc_init(&amp;amp;rtc, &amp;amp;config, rtc_handler);
    APP_ERROR_CHECK(err_code);

    //Set compare channel to trigger interrupt after COMPARE_COUNTERTIME seconds
    err_code = nrf_drv_rtc_cc_set(&amp;amp;rtc,0, 30 * RTC_DEFAULT_CONFIG_FREQUENCY,true);
    APP_ERROR_CHECK(err_code);

    //Power on RTC instance
    nrf_drv_rtc_enable(&amp;amp;rtc);
}

static void dk_gpio_pins_low_power_init()
{
	for(int i = 0; i &amp;lt; 32; i++)
		nrf_gpio_cfg_input(i, NRF_GPIO_PIN_PULLDOWN);
// DK leds
	nrf_gpio_cfg_input(17, NRF_GPIO_PIN_PULLUP);
	nrf_gpio_cfg_input(18, NRF_GPIO_PIN_PULLUP);
	nrf_gpio_cfg_input(19, NRF_GPIO_PIN_PULLUP);
	nrf_gpio_cfg_input(20, NRF_GPIO_PIN_PULLUP);
// DK buttons
	nrf_gpio_cfg_input(13, NRF_GPIO_PIN_PULLUP);
	nrf_gpio_cfg_input(14, NRF_GPIO_PIN_PULLUP);
	nrf_gpio_cfg_input(15, NRF_GPIO_PIN_PULLUP);
	nrf_gpio_cfg_input(16, NRF_GPIO_PIN_PULLUP);
// DK I2C com
	nrf_gpio_cfg_input(26, NRF_GPIO_PIN_PULLUP);
	nrf_gpio_cfg_input(27, NRF_GPIO_PIN_PULLUP);
// DK Prog UART
	nrf_gpio_cfg_input(5, NRF_GPIO_PIN_PULLUP);	// CTS
	nrf_gpio_cfg_input(6, NRF_GPIO_PIN_PULLUP);	// RxD
	nrf_gpio_cfg_input(7, NRF_GPIO_PIN_PULLUP);	// RTS
	nrf_gpio_cfg_input(8, NRF_GPIO_PIN_PULLUP);	// TxD
// DK SWO RES
	nrf_gpio_cfg_input(18, NRF_GPIO_PIN_PULLUP);
	nrf_gpio_cfg_input(21, NRF_GPIO_PIN_PULLUP);
}

int main(void)
{
	dk_gpio_pins_low_power_init();

    lfclk_config();

    rtc_config();

    while (true)
    {
        __SEV();
        __WFE();
        __WFE();
    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>