Skip to main content
MAdle.1
Associate II
April 28, 2022
Question

Init code generated by CubeMx for vrefbuf not working (STM32G4)

  • April 28, 2022
  • 1 reply
  • 1288 views

The sequence used to enable vrefbuf in HAL_MspInit() is not working.

It calls HAL_SYSCFG_EnableVREFBUF() before switching from input to output (HAL_SYSCFG_VREFBUF_HighImpedanceConfig(SYSCFG_VREFBUF_HIGH_IMPEDANCE_DISABLE)), so HAL_SYSCFG_EnableVREFBUF() always returns a timeout error incase systick is running or blocks forever in case systick is not running.

PS:

In my opinion HAL_MspInit() should also return a HAL_STATUS instead of void.

This topic has been closed for replies.

1 reply

Simon V.
ST Employee
May 30, 2022

Hello,

Thank you for your feedback.

I confirm your observation.

I will reproduce on my side and inform CubeMx Team.

Regards,

Simon

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.