STM32CubeH5 icon indicating copy to clipboard operation
STM32CubeH5 copied to clipboard

Register bit name typo causes compiler warning due to bug

Open nroff-man opened this issue 2 years ago • 2 comments

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.

nroff-man avatar Sep 02 '23 15:09 nroff-man

For ref: https://github.com/stm32duino/Arduino_Core_STM32/issues/2119

fpistm avatar Sep 02 '23 18:09 fpistm

ST Internal Reference: 161158

TOUNSTM avatar Sep 11 '23 13:09 TOUNSTM