STM32U575 ADC4 unable to set AUTOFF bit
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?
