STM32CubeH5
STM32CubeH5 copied to clipboard
Register bit name typo causes compiler warning due to bug
There is a typo in the LL_PWR include for H5XX
This typo uses the wrong bit name:
Drivers/STM32H5xx_HAL_Driver/Inc/stm32h5xx_ll_pwr.h:1507:106: warning: bitwise comparison always evaluates to false [-Wtautological-compare] 1507 | return ((READ_BIT(PWR->VMSR, PWR_VMSR_PVDO) == (PWR_VMSR_AVDO)) ? 1UL : 0UL);
The correction is to read the bit PWR_VMSR_AVDO and not PWR_VMSR_PVDO
bye.
For ref: https://github.com/stm32duino/Arduino_Core_STM32/issues/2119
ST Internal Reference: 161158