STM32U575 VREFBUF Driver bug when 2.5V is set
Hello,
Just fount a bug on the LL driver of VREFBUF on STM32U575
when you want to configure internal Vref to 2.5V and you use the nest function:
LL_VREFBUF_SetVoltageScaling(LL_VREFBUF_VOLTAGE_SCALE3);
where LL_VREFBUF_VOLTAGE_SCALE3 should set VRS bits of CSR REG to 0x3 it set it to 0x4 instead.
the problem is in the definition of the term LL_VREFBUF_VOLTAGE_SCALE3
#define LL_VREFBUF_VOLTAGE_SCALE3 VREFBUF_CSR_VRS_2 /*!< Voltage reference scale 1 (VREF_OUT4) */
where
#define VREFBUF_CSR_VRS_2 (0x04UL<< VREFBUF_CSR_VRS_Pos) /*!< 0x00000030 */
where:
#define VREFBUF_CSR_VRS_Pos (3U)
0x04UL<< VREFBUF_CSR_VRS_Pos should be equal to 0x00000030 but it actually equal to 0x00000040
therefor wrong value is set in the VRS bits.
