cancel
Showing results for 
Search instead for 
Did you mean: 

How to enable ADC1 on NUCLEO-U575ZI-Q?

Bastien LS
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions
Bastien LS
Associate III

This line was missing:

HAL_PWREx_EnableVddA();

View solution in original post

7 REPLIES 7
Mike_ST
ST Employee

Hello,

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

Maybe somebody will be able to help.

Mike_ST
ST Employee

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.

Thank you, I will have a look at it.

Bastien LS
Associate III

This line was missing:

HAL_PWREx_EnableVddA();

meghasb
Senior
  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
Associate II

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

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.