This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SAADC with soft device and low-power mode

Hello,

yesterday I measured the current of our device and found out that it looks more as a square instead of spikes when no device was connected. Found out that when I established a BLE connection it looks as expected. Took me quite a while but I seems that the SAADC causes the behavior. Ported back the SDK13.x SAADC driver to SDK12.3 but had not luck. When using only on channel instead of the three ADC everything was fine.

The problem was tracked back to the calling of

if(!m_saadc_initialized)
{			
	//Initialize the SAADC. 
	adc_init();
}
m_saadc_initialized = true; //Set SAADC as initialized
nrf_drv_saadc_sample(); //Trigger the SAADC SAMPLE task

in

    err_code = app_timer_create(&m_our_char_timer_id, APP_TIMER_MODE_REPEATED, timer_timeout_handler);

I tested to execute the statements in the while(1) in main and this solved so far the problem. Thus, is this any interrupt priority problem or has this behavior been seen so far?

Another issues is that using NRF_SAADC_ACQTIME_10US instead of NRF_SAADC_ACQTIME_3US reduces the required current. Thought that this is fixed in the SDK13.x SAADC driver. At least, inside the source code it is mentioned. Or is there any specific reason by 10us has lower power consumption?

Any suggestion or help is appreciated. Thanks.

P.S. I attached some pictures. I measured the current by measuring the voltage over a 100 Ohm resistor which I have connected in series. The only difference is that I trigger the sampling once in AppTimer routine and in Main. The ADC is triggered twice per second, thus 2 Hz. This is also visible in the current consumption :)

SAADC triggered in AppTimer - Connected SAADC triggered in AppTimer - Not connected SAADC triggered in Main - Connected SAADC triggered in Main - Not connected

P.S.S. I stripped the project down to a minimum. I can still see the behavior but it happens less. test.zip By defining or not defining OPTION1 the triggering is moved from AppTimer to Main.

Related