<?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>SAADC maintains high current consumption</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22786/saadc-maintains-high-current-consumption</link><description>After performing the first ADC operation (4 channel scan, sample rate controlled from TIMER1), the power consumption stays at almost 4 mA for the nRF52832. 
 Why? 
 Initialization code: 
 case DRIVER_ADC_IOCTL_START:
	if( ioctl )
	{
 memset( dma_sample_buf</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Jun 2017 09:43:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22786/saadc-maintains-high-current-consumption" /><item><title>RE: SAADC maintains high current consumption</title><link>https://devzone.nordicsemi.com/thread/89597?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 09:43:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0809d1df-b2f6-499c-a29d-0a0358f25774</guid><dc:creator>tkorsdal</dc:creator><description>&lt;p&gt;It is done in the SAADC IRQ handler. The code posted here has the fix added to it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	if( SAADC_EVENTS_STOPPED &amp;gt; 0 )
{
	SAADC_EVENTS_STOPPED = 0;
	
	if( isr_cmd == ISR_CMD_CALIBRATE_OFFSET )
	{
		isr_cmd = ISR_CMD_NONE;
		TIMER1_TASKS_START = 1;
		SAADC_TASKS_START = 1;
	}
	else  // Stop ADC
	{
		PPI_CHENCLR = 1;
		TIMER1_TASKS_CLEAR = 1;
		TIMER1_TASKS_STOP = 1;
		
		uint8_t n;
		for( n = 0; n &amp;lt; 8; n++ )
		{
			SAADC_CH[n].CONFIG = 1 &amp;lt;&amp;lt; 17;
			SAADC_CH[n].PSELP = 0;
			SAADC_CH[n].PSELN = 0;
		}

		SAADC_ENABLE = 0;
		SAADC_INTENCLR = ( 1 &amp;lt;&amp;lt; 22 ) - 1;	// Disable all interrupts
		NVIC_DisableIRQ( SAADC_IRQ_NO );
		NVIC_ClearPendingIRQ( SAADC_IRQ_NO );
		
		os_isr_status_bits_set( DEVHDL_ADC, ISR_STATUS_SAMPLING_STOPPED );
	}
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC maintains high current consumption</title><link>https://devzone.nordicsemi.com/thread/89596?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 08:36:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46e25104-9fc9-4722-8ddb-a04fa74f208d</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Could you post your code to put the device into sleep mode?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: SAADC maintains high current consumption</title><link>https://devzone.nordicsemi.com/thread/89598?ContentTypeID=1</link><pubDate>Thu, 15 Jun 2017 08:32:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:109538e7-d7c4-4fd3-9924-fdd1f7ecb642</guid><dc:creator>tkorsdal</dc:creator><description>&lt;p&gt;The answer was found here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/question/119576/saadc-battery-measurement-current-consumption/?answer=119632#post-id-119632"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Interrupts must be disabled and pending interrupts cleared.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>