2020-02-06 06:20 AM
I'd like to report 2 bugs/errors in CubeMx and the documentation in the stm32g4xx LL driver file:
Setting the "Internal Voltage reference scale" in the "SYS" menu of CubeMX to SCALE2 (2.9V), won't take effect and the selected value always falls back to SCALE0. I'm working with an STM32G474 device.
Also the values of the scales in CubeMX are wrong, where it's written:
SCALE0: 2.5V
SCALE1: 2.048V
SCALE2: 2.9V
Whereas the correct asignments are:
SCALE0: 2.048V
SCALE1: 2.5V
SCALE2: 2.9V
Furthermore the documentation in the LL driver in "stm32g4xx_ll_system.h" has the documentation wrong for LL_VREFBUF_VOLTAGE_SCALE2, where a voltage is 2.8V is documented instead of the correct value 2.9V
Solved! Go to Solution.
2020-02-06 07:23 AM
You're right @MScho.1 issue will be fixed in the CubeMX release,
Best Regards,
Khouloud
2020-02-06 06:37 AM
Hello @MScho.1
Thanks for the feedback , i'll check it,
Best Regards,
Khouloud
2020-02-06 07:23 AM
You're right @MScho.1 issue will be fixed in the CubeMX release,
Best Regards,
Khouloud
2020-02-06 07:26 AM
Thanks for the quick reponse and checking!
2020-02-17 05:32 AM
Hi @MScho.1 , after check, the issue is only in the "stm32g4xx_ll_system.h" and not in CubeMX ,
According the Ref Man of STM32G4, the bit VRS has these values:
Bits 3:2 VRS[1:0]: Voltage reference scale
These bits select the value generated by the voltage reference buffer.
000: Voltage reference set to 2.5 V
001: Voltage reference set to 2.048 V
010: Voltage reference set to 2.90 V
Best Regards,
Khouloud
2020-02-17 05:41 AM
I'm sorry to disagree. When "SCALE0 around 2.5V" is selected in CubeMX, the output voltage after code generation on VREF is 2.048V.
2020-02-18 12:55 AM
There is some changes in the reference, and this value has been changed, the right one will be in the 6.0.0 MX version.
You are right and thanks for bringing this confusion to our attention.
Best Regards,
Khouloud