Skip to main content
Tomas Hamouz
Associate III
March 28, 2024
Question

STM32U575 ADC4 unable to set AUTOFF bit

  • March 28, 2024
  • 1 reply
  • 845 views

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

Amel NASRI
Technical Moderator
May 2, 2024

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 "Best Answer" on the reply which solved your issue or answered your question.