cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U575 ADC4 unable to set AUTOFF bit

Tomas Hamouz
Associate III

I am unable to switch on the AUTOFF bit in ADC4.

DS reads about ADC_PWRR/AUTOFF: The software is allowed to write this bit only when ADEN bit is cleared to 0 (this ensures that no conversion is ongoing).

But if this bit is set, the ADC doesn't set ADRDY flag if enabled.

 

LL_ADC_SetLPModeAutoPowerOff(ADC4, LL_ADC_LP_AUTOPOWEROFF_ENABLE);

LL_ADC_ClearFlag_ADRDY(ADC4);
LL_ADC_Enable(ADC4);

while(!LL_ADC_IsActiveFlag_ADRDY(ADC4)) {}   // here waits forever

 

If I omit the ADRDY check and simply wait some time and then I start the conversion, the ADC works and converts inputs correctly.

 

If I omit the AUTOFF setting, the code works ok. If I try to set the bit after enable, the bit remain unchanged (acording to DS)..

My question is: How to set the AUTOFF bit? Isn't it a bug in silicon?

 

 

 

 

 

 

 

 

1 REPLY 1
Amel NASRI
ST Employee

Hi @Tomas Hamouz,

Coming back to your question, I hope it was solved since the time you asked it. That would be interesting to share your findings.

On my side, I have following 2 proposals:

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.