Skip to content

Commit b8b6afd

Browse files
gautierg-stkartben
authored andcommitted
drivers: adc: stm32: use dedicated status function for ldo state
Now that the U5 HAL contains the dedicated LDO status function, use it instead of reading the register directly. Signed-off-by: Guillaume Gautier <[email protected]>
1 parent 6401c47 commit b8b6afd

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

drivers/adc/adc_stm32.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,10 +1623,7 @@ static int adc_stm32_init(const struct device *dev)
16231623
#elif defined(CONFIG_SOC_SERIES_STM32H7X) || \
16241624
defined(CONFIG_SOC_SERIES_STM32U5X) || \
16251625
defined(CONFIG_SOC_SERIES_STM32WBAX)
1626-
/* Don't use LL_ADC_IsActiveFlag_LDORDY since not present in U5 LL (1.5.0)
1627-
* (internal issue 185106)
1628-
*/
1629-
while ((READ_BIT(adc->ISR, LL_ADC_FLAG_LDORDY) != (LL_ADC_FLAG_LDORDY))) {
1626+
while (LL_ADC_IsActiveFlag_LDORDY(adc) == 0) {
16301627
}
16311628
#else
16321629
k_busy_wait(LL_ADC_DELAY_INTERNAL_REGUL_STAB_US);

0 commit comments

Comments
 (0)