Skip to main content
Haizhou Li
Associate
August 28, 2019
Question

The way to disable ADC completely?

  • August 28, 2019
  • 1 reply
  • 1706 views

I am using STM32G070 with CubeMX HAL code.  The system runs into STOP mode from time to time. I need turn off the ADC before it entering the STOP.  Here is my testing:

If running the MCU without ADC by commenting out MX_ADC1_Init(), the system shows 3.5 uA in STOP mode; This also proves the system was set right for both hardware and software.

If initiating the ADC by MX_ADC1_Init(), I shut down the ADC by running:

HAL_ADC_DeInit(&hadc1);

HAL_ADC_Stop_IT(&hadc1);

HAL_ADC_MspDeInit(&hadc1);

__HAL_RCC_ADC_CLK_DISABLE();

The system still shows 15uA in STOP mode, even by running these functions redundantly. I cannot figure out what caused this extra 12uA leakage. Which switch did I miss?

Thank you in advance!

This topic has been closed for replies.

1 reply

Shenshen Lee
Associate
March 28, 2023

In case you haven't figured it out, this extra 10+uA current comes from ADC's internal voltage regulator, which is turned on in HAL_ADC_Init (LL_ADC_EnableInternalRegulator) but never disabled in HAL_ADC_DeInit.