2022-05-11 02:19 AM
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?
Solved! Go to Solution.
2022-05-12 05:43 AM
2022-05-11 02:38 AM
Hello,
Please share your .ioc file and code, if you wish.
Maybe somebody will be able to help.
2022-05-11 02:41 AM
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.
2022-05-11 02:45 AM
Thank you, I will have a look at it.
2022-05-12 05:43 AM
This line was missing:
HAL_PWREx_EnableVddA();
2023-01-04 03:13 AM
is also not working..
can any one help with this?
2023-02-07 02:20 PM
HAL_PWREx_EnableVddA(); placed between MX_ADC1_Init and HAL_ADC_Start in main.c seems to work.
2024-08-02 12:24 AM
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.