<?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>current increases by about 1.5 mA after a battery check.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/3162/current-increases-by-about-1-5-ma-after-a-battery-check</link><description>Hi all. 
 Consumption current increases by about 1.5 mA after a battery check. 
 uint8_t battery_start(void)
{
// Configure ADC
NRF_ADC-&amp;gt;INTENSET = ADC_INTENSET_END_Msk;
NRF_ADC-&amp;gt;CONFIG = (ADC_CONFIG_RES_8bit &amp;lt;&amp;lt; ADC_CONFIG_RES_Pos) |
(ADC_CONFIG_INPSEL_SupplyOneThirdPrescaling</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Aug 2015 09:57:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/3162/current-increases-by-about-1-5-ma-after-a-battery-check" /><item><title>RE: current increases by about 1.5 mA after a battery check.</title><link>https://devzone.nordicsemi.com/thread/11668?ContentTypeID=1</link><pubDate>Mon, 03 Aug 2015 09:57:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d0d9c35-cb78-4dbe-af8e-a4d4034d1dcf</guid><dc:creator>andlier</dc:creator><description>&lt;p&gt;My issue was indeed enabling the ADC interrupt, same as in this thread: &lt;a href="https://devzone.nordicsemi.com/question/3063/extremely-high-current-consumption-during-advertising-broadcast-modeble_app_temp/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;  But I&amp;#39;m not sure if my issue is the same as yours, since you do not enable the adc interrupt in the code you posted. Have you checked the current consumption increase with and without debugger enabled? Any other peripherals keeping the hfclock running?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: current increases by about 1.5 mA after a battery check.</title><link>https://devzone.nordicsemi.com/thread/11667?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2015 18:52:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b255839-a399-4078-bbd7-f3c18631a216</guid><dc:creator>andlier</dc:creator><description>&lt;p&gt;I solved my issue, I had this line at the start of my adc routine:&lt;code&gt;NRF_ADC-&amp;gt;INTENSET = ADC_INTENSET_END_Msk;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;After removing it, I got back to the expected consumption. (it was 2-3mA too high)&lt;/p&gt;
&lt;p&gt;My code that works now is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint16_t adc_result;
	
// Configure ADC
NRF_ADC-&amp;gt;CONFIG   = (ADC_CONFIG_RES_BATT &amp;lt;&amp;lt; ADC_CONFIG_RES_Pos) |
                    (ADC_CONFIG_INPSEL_SupplyOneThirdPrescaling &amp;lt;&amp;lt; ADC_CONFIG_INPSEL_Pos) |
                    (ADC_CONFIG_REFSEL_VBG &amp;lt;&amp;lt; ADC_CONFIG_REFSEL_Pos) |
                    (ADC_CONFIG_PSEL_Disabled &amp;lt;&amp;lt; ADC_CONFIG_PSEL_Pos) |
                    (ADC_CONFIG_EXTREFSEL_None &amp;lt;&amp;lt; ADC_CONFIG_EXTREFSEL_Pos);
NRF_ADC-&amp;gt;EVENTS_END = 0;
NRF_ADC-&amp;gt;ENABLE     = ADC_ENABLE_ENABLE_Enabled;

NRF_ADC-&amp;gt;TASKS_START = 1;

while (NRF_ADC-&amp;gt;EVENTS_END == 0) ;

NRF_ADC-&amp;gt;EVENTS_END = 0;
adc_result          = NRF_ADC-&amp;gt;RESULT;
NRF_ADC-&amp;gt;TASKS_STOP = 1;

batt_lvl_in_milli_volts = ADC_RESULT_IN_MILLI_VOLTS(adc_result) +
                          DIODE_FWD_VOLT_DROP_MILLIVOLTS;

	NRF_ADC-&amp;gt;ENABLE     = ADC_ENABLE_ENABLE_Disabled;

return batt_lvl_in_milli_volts;
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: current increases by about 1.5 mA after a battery check.</title><link>https://devzone.nordicsemi.com/thread/11666?ContentTypeID=1</link><pubDate>Fri, 31 Jul 2015 17:56:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50ffc61d-a9c9-49d6-b21d-2c9c921f7bfa</guid><dc:creator>andlier</dc:creator><description>&lt;p&gt;I have the same issue. Please post a solution here if you figure it out Suzuki.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>