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

High Idle Current using SAADC Low Power

I have a 3 channel setup on my SAADC module, which I sample according to a LFCLK timer. I notice after the first called to nrf_drv_saadc_sample() and receipt of the ADC results, it seems the HFCLK is not shutting off. The idle current is approximately 400uA.

My SAADC configuration is:

  1. Two buffer setup
  2. Low Power Mode = True
  3. 12bit
  4. No Oversampling
  5. Buffer Size = 3

The configuration for each channel uses the NRF_DRV_SAADC_DEFAULT_CHANNEL_CONFIG_SE macro.

Just as a not I do have some floating point math in my code so the FPU is technically used. I've added the following to address this:

void SETUP_FPU_HANDLER()
{
	NVIC_SetPriority(FPU_IRQn, APP_IRQ_PRIORITY_LOW);
	NVIC_EnableIRQ(FPU_IRQn);
}


void FPU_IRQHandler(void)
{
    uint32_t *fpscr = (uint32_t *)(FPU->FPCAR+0x40);
    (void)__get_FPSCR();

    *fpscr = *fpscr & ~(FPU_EXCEPTION_MASK);

    interrupt_calls_counter++;
}

How can I get the HFCLK to shutoff properly?

Related