<?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>NRF52832 SAADC current issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19681/nrf52832-saadc-current-issue</link><description>Hi engineer, 
 I found that the SAADC current is increased after the SAADC function opened, then my processing method as below: 
 1,I close SAADC function after sampling SAADC data in below code: 
 nrf_drv_saadc_uninit();
NRF_SAADC-&amp;gt;INTENCLR = (SAADC_INTENCLR_END_Clear</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Feb 2017 16:09:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19681/nrf52832-saadc-current-issue" /><item><title>RE: NRF52832 SAADC current issue</title><link>https://devzone.nordicsemi.com/thread/76556?ContentTypeID=1</link><pubDate>Wed, 15 Feb 2017 16:09:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce70199f-067c-48c9-8c21-5a16602d06fb</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Not really a more working example you provided here. It is hard to debug your application without seeing the whole application and being able to run it. I managed to include your code into the BLE/ANT example, but it stop advertising on the timer event. If I alter the program to not uninit/init the SAADC on each timer event, the code works fine. I&amp;#39;m not sure what is the problem with your application unless you can provide a working example project, showing this issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SAADC current issue</title><link>https://devzone.nordicsemi.com/thread/76557?ContentTypeID=1</link><pubDate>Wed, 15 Feb 2017 01:20:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83e44ed0-ea47-4aa6-ad1d-f8b77991ce3b</guid><dc:creator>jimmy_wang</dc:creator><description>&lt;p&gt;what I am appplication of running is ble_ant_app_hrm(multiprotocol:BLE&amp;amp;ANT);I develop project base on the application,I have tried to set between 3ms to 10s for test ,but 10s is more  stable than other time ,the longer the better;I have done many method to look for the issue ,but I yet don&amp;#39;t look for until now;below is part of my code:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;int main(void)
{
    uint32_t err_code;
    sd_power_dcdc_mode_set(NRF_POWER_DCDC_ENABLE);
	
    err_code = NRF_LOG_INIT(NULL);
    APP_ERROR_CHECK(err_code);
    
    // Initialize time
     timers_init();

   // initialize saadc
     saadc_init();
	
   // Initialize S332 SoftDevice
     ble_ant_stack_init();

   //ANT data send setup
     ant_data_send_setup();
	
    // Initialize Bluetooth stack parameters.
    gap_params_init();
    advertising_init();
    services_init();
    conn_params_init();
   
   //ant profile setup
    profile_setup();
      
#ifdef BONDING_ENABLE
    bool erase_bonds;

    peer_manager_init(erase_bonds);
    if (erase_bonds == true)
    {
        NRF_LOG_INFO(&amp;quot;Bonds erased!\r\n&amp;quot;);
    }
#endif // BONDING_ENABLE
    application_timers_start();
    ant_and_adv_start();

    // Enter main loop.
    for (;;)
    {
      power_manage();
    }
}


static void timers_init(void)
{
    // Initialize timer module
      APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, NULL);
	  
   //adc sampling time module
      app_timer_create(&amp;amp;m_AD_sample_timer_id,
                     APP_TIMER_MODE_REPEATED,
                     AD_sample_meas_timeout_handler);
}

//adc sampling time setup
static void application_timers_start(void)
{
    uint32_t err_code;
	
	 //interval time is 3ms
	  err_code = app_timer_start(m_AD_sample_timer_id, AD_SAMPLE_MEAS_INTERVAL, NULL);
    APP_ERROR_CHECK(err_code);
	
}

//saadc init
void saadc_init(void)
{
	 ret_code_t err_code;
    err_code = nrf_drv_saadc_init(NULL, saadc_callback);
    APP_ERROR_CHECK(err_code);
	
    nrf_saadc_channel_config_t channel_battery_config =
    NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN1);
	
    nrf_saadc_channel_config_t channel_sensor_config =
    NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE(NRF_SAADC_INPUT_AIN2);
	
    err_code = nrf_drv_saadc_channel_init(0, &amp;amp;channel_battery_config);
    APP_ERROR_CHECK(err_code);
		
    err_code = nrf_drv_saadc_channel_init(1, &amp;amp;channel_sensor_config);
    APP_ERROR_CHECK(err_code);
	 
    err_code = nrf_drv_saadc_buffer_convert(m_buffer_pool[0], SAMPLES_IN_BUFFER);
    APP_ERROR_CHECK(err_code);
}

void saadc_callback(nrf_drv_saadc_evt_t const * p_event)
{
	 int i;
	 float offset=-0.025;
    if (p_event-&amp;gt;type == NRF_DRV_SAADC_EVT_DONE)
    {
			  ret_code_t err_code;
			
        err_code=nrf_drv_saadc_buffer_convert(p_event-&amp;gt;data.done.p_buffer, SAMPLES_IN_BUFFER);
        APP_ERROR_CHECK(err_code);
        for (i = 0; i &amp;lt; SAMPLES_IN_BUFFER; i++)
        {
		      AD_temp_check[i]=p_event-&amp;gt;data.done.p_buffer[i];
        }
				
		nrf_drv_saadc_uninit();
                NRF_SAADC-&amp;gt;INTENCLR = (SAADC_INTENCLR_END_Clear &amp;lt;&amp;lt; SAADC_INTENCLR_END_Pos);
                NVIC_ClearPendingIRQ(SAADC_IRQn);
}

static void AD_sample_meas_timeout_handler(void * p_context)
{
    UNUSED_PARAMETER(p_context);
    saadc_init();
    nrf_drv_saadc_sample();
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SAADC current issue</title><link>https://devzone.nordicsemi.com/thread/76555?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2017 12:30:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:08f8a576-6737-44a9-8e7b-4c4d13d6b8e0</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Which BLE application are you running? Are you basing it on one of the SDK examples? Is your issue with the current or that your device is not advertising when you set the sample time to 3 ms? Have you tried anything between 3 ms and 10 s? Are you checking error codes on any function calls to see why your application is not advertising? Could you upload a complete example showing your issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SAADC current issue</title><link>https://devzone.nordicsemi.com/thread/76553?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2017 09:03:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5797f04-3992-4410-87d3-14ff3cb11748</guid><dc:creator>jimmy_wang</dc:creator><description>&lt;p&gt;SDK Version is 12.2;yes ,I am running BLE application&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52832 SAADC current issue</title><link>https://devzone.nordicsemi.com/thread/76554?ContentTypeID=1</link><pubDate>Tue, 14 Feb 2017 08:15:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:edc560ad-833c-44fc-876e-b605733e65d5</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Which SDK version are you using? Are you running BLE application?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>