Skip to main content
Associate III
May 11, 2022
Solved

How to enable ADC1 on NUCLEO-U575ZI-Q?

  • May 11, 2022
  • 5 replies
  • 2782 views

I work with STM32CubeIDE 1.9.0, STM32CubeMX 6.5.0, and STM32Cube FW_U5 V1.1.0, on a NUCLEO-U575ZI-Q.

I created a new project for this specific board, and left everything by default.

I need to use the ADC1, wich is enabled by default.

I start with this call:

HAL_ADC_Start(&hadc1);

And it never succeed. Digging deeper, there seem to be a timeout on the ADC1 activation. The register bit ADC_CR_ADEN is set but the corresponding flag ADC_FLAG_RDY never rise.

For information, the ADC voltage regulator was successfuly enabled during system initialization (ADVREGEN set to 1, wait for a time, then check that the corresponding flag is risen). Before rising ADC_CR_ADEN, all bits of the register ADC CR is are low (except ADVREGEN = 1). According to the RM for STM32U575, this is the only condition before enabling the ADC.

Did I miss something in the reference manual, or in the code? Is there something wrong with my STM32U575 chip?

Best answer by Bastien LS

This line was missing:

HAL_PWREx_EnableVddA();

5 replies

Mike_ST
Technical Moderator
May 11, 2022

Hello,

Please share your .ioc file and code, if you wish.

Maybe somebody will be able to help.

Mike_ST
Technical Moderator
May 11, 2022

By the way, in the STM32Cube FW_U5 V1.1.0 package you have some ADC examples under

Projects\NUCLEO-U575ZI-Q\Examples\ADC\

So you can check what is different with your code.

Associate III
May 11, 2022

Thank you, I will have a look at it.

Bastien LSAuthorBest answer
Associate III
May 12, 2022

This line was missing:

HAL_PWREx_EnableVddA();

meghasb
Associate III
January 4, 2023
  1. @Bastien LS​ hi, did u get the ans for this? even i'm facing the same problem, even after enabling HAL_PWREx_EnableVddA();

is also not working..

can any one help with this?

JCout.11
Visitor II
February 7, 2023

HAL_PWREx_EnableVddA(); placed between MX_ADC1_Init and HAL_ADC_Start in main.c seems to work.

Associate III
August 2, 2024

I have placed the  HAL_PWREx_EnableVddA(); after MA_ADC1_Init() in main.c, still my ADC value is not good. I am getting ADC value as 11 or 12.