Skip to main content
Associate II
August 6, 2026
Question

STM32H743. How to disable ADC3 after first use

  • August 6, 2026
  • 2 replies
  • 21 views

My device uses an STM32H743VITx MCU.
I need to use ADC3 at the beginning of my program to verify that three voltages are indeed at the correct values. Then I want to disable it completely before initializing ADC1 and ADC2 to avoid pin conflicts.
Does the function HAL_ADC_DeInit(&hadc3) allow me to do this?

2 replies

AScha.3
Super User
August 6, 2026

No need to de-init the ADC3 , just dont start it / use it , if you dont need it later in your program.

There is no pin conflict between ADCs on same pin, otherwise Cube would not allow to set it, more than one ADC on same pin.

Any ADC just switching its sampling input cap to the selected input while its in the sampling interval at the beginning of a conversion; so as long as you dont start a conversion for pin XX , its not connecting the pin and cannot disturb any other analog function on this pin.

Just look at rm :

The analog mux is always there, just on a started conversion the selected input is switched to the ADC for the sampling time, then its disconnected again.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Karl Yamashita
Principal
August 6, 2026

All the HAL drivers are well documented. Just go to that function and read the comments

 

/**
* @brief Deinitialize the ADC peripheral registers to their default reset
* values, with deinitialization of the ADC MSP.
* @note For devices with several ADCs: reset of ADC common registers is done
* only if all ADCs sharing the same common group are disabled.
* (function "HAL_ADC_MspDeInit()" is also called under the same conditions:
* all ADC instances use the same core clock at RCC level, disabling
* the core clock reset all ADC instances).
* If this is not the case, reset of these common parameters reset is
* bypassed without error reporting: it can be the intended behavior in
* case of reset of a single ADC while the other ADCs sharing the same
* common group is still running.
* @note By default, HAL_ADC_DeInit() set ADC in mode deep power-down:
* this saves more power by reducing leakage currents
* and is particularly interesting before entering MCU low-power modes.
* @param hadc ADC handle
* @retval HAL status
*/
HAL_StatusTypeDef HAL_ADC_DeInit(ADC_HandleTypeDef *hadc)
{

 

If a reply has proven helpful, click on Accept as Solution so that it'll show at top of the post.CAN Jammer an open source CAN bus hacking toolCANableV3 Open Source