Skip to main content
Associate III
January 21, 2026
Solved

VREFBUFF option is not available in CubeMx for STM32G4

  • January 21, 2026
  • 2 replies
  • 218 views

Question moved from this post.

Hi @mƎALLEm ,
I am using STMCubeIDE with cubeMX, in that there is no such configuration for VREFBUF. is there any alternative way for that?

Best answer by mƎALLEm

Hello,

After checking, VREFBUF option is available under SYS menu.

VREFBUF.png

This thread will be closed.

 

2 replies

mƎALLEm
Technical Moderator
January 21, 2026

Hello,

According to the datasheet STM32G491RET6 features an internal voltage reference buffer (VREFBUF)

mALLEm_0-1768985833848.png

It seems VREFBUF option is missing in CubeMx. I will escalate internally for analysis and eventual fix in the tool (internal ticket number 225569 for follow-up).

Try to add this code in the User code section (inspired from H7 generated code): scale set to 0 (2.5V)

 /** Configure the internal voltage reference buffer voltage scale
 */
 HAL_SYSCFG_VREFBUF_VoltageScalingConfig(SYSCFG_VREFBUF_VOLTAGE_SCALE0);

 /** Enable the Internal Voltage Reference buffer
 */
 HAL_SYSCFG_EnableVREFBUF();

 /** Configure the internal voltage reference buffer high impedance mode
 */
 HAL_SYSCFG_VREFBUF_HighImpedanceConfig(SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE);

 

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."
mƎALLEm
mƎALLEmBest answer
Technical Moderator
January 23, 2026

Hello,

After checking, VREFBUF option is available under SYS menu.

VREFBUF.png

This thread will be closed.

 

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."