cancel
Showing results for 
Search instead for 
Did you mean: 

VREFBUFF option is not available in CubeMx for STM32G4

abhijith_raj
Associate III

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?

1 ACCEPTED SOLUTION

Accepted Solutions
mƎALLEm
ST Employee

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.

View solution in original post

2 REPLIES 2
mƎALLEm
ST Employee

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
ST Employee

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.