Skip to main content
Senior
July 30, 2026
Question

VREFBUF and motor control

  • July 30, 2026
  • 2 replies
  • 55 views

Hi; this question is pretty much the same as another version of it I find on the forums, but it was never answered, so I would like to try asking again. 

 

I’m working through a design that will use an stm32u595 for motor control, and the STSPIN233 as my driver. I will be using three current sense amplifiers on my low-side shunt resistors; each of these need a bias voltage to offset the shunt resistor voltages. 

 

For past prototypes, I worked with an stm32F4, which doesn’t have this nifty VREF+ pin or VREFBUF capability - so I simply used VDDA to create a bias voltage, and used it for my ADC. VDDA itself was drawn from VDD through a ferrite PI filter. I suppose all of this is sort of “lo-fi”, but it worked - I was able to get a motor to turn using FOC. 

 

The stm32u5 is considerably more complex by comparison, so I’ve been trying to teach myself what VREF+/VREFBUF is, and why I might want to use it. Claude, infuriatingly, vacillates from thread to thread in its advice - sometimes it says “Oh you have to use this, there’s too much error if you don’t”, other times it says “Well, you got this working once without VREFBUF, so you’re fine not using it here”. It is hyperbolic and confident in both cases, which is frustrating for trying to learn how to use something new. 

 

I wonder, then, if a human might be able to offer some insight. The other note above points out that dev boards don’t show VREFBUF being used, and rather just relying on VDDA as the ADC reference voltage. I’m curious why this might be, or if anyone might have insight as to when/how VREFBUF is intended to be used, whether it is appropriate in this case, etc. It seems to add some complexity to my design (which is new to me), and I’m trying to understand how far afield I’m getting here, being prodded by AI chatbot help. 

 

Thanks!

2 replies

TDK
July 30, 2026

I’m curious why this might be, or if anyone might have insight as to when/how VREFBUF is intended to be used, whether it is appropriate in this case

For general questions about VREFBUF, the reference manual is the right source.

There is no “right” way to do things here. It’s a utility that you can use, or not use, depending on your application. If you need a relatively low accuracy voltage reference in your project, use it. Else don’t. The accuracy of the VDDA may already be sufficient. If it is, no need to complicate things with VREFBUF.

In general, I can’t see the use or not use of VREFBUF being necessary or critical to a motor control application.

Don’t go by what someone else has done on another board. It’s irrelevant here.

so I simply used VDDA to create a bias voltage, and used it for my ADC. VDDA itself was drawn from VDD through a ferrite PI filter

Perfectly acceptable.

So why is the voltage reference not used by default? Am I missing something important here?

Don’t mistake defaults as the correct or best behavior.

"If you feel a post has answered your question, please click ""Accept as Solution""."
AScha.3
Super User
July 30, 2026

Hi,

>I wonder, then, if a human might be able to offer some insight.

Me too, so lets try:

at first, it depends ….on the precision you want/need and how much it can cost.

  1. So a super reference chip will do the best job, but be the most expensive solution.
  2. using battery supply (not stable) calls for using the internal reference + ref.buf
  3. good regulated VDD (3 or 3v3 ) allows the VDD to be used as VDDA + VREF (as you did on F4 cpu)

So if you can go with the precision of a good VDD regulator (maybe 1% tol.) the most easy way is to use it as VDDA + VREF .

If you have a battery supply (U series is for ultra low power design or battery powered devices) that changes with time a lot,

then you might use the internal reference + ref.buf and have a stable reference for ADC and DAC , but only at about +/- 3 % , see ds , but for sure better than just a battery.

High precision always needs a top reference , giving for example 2.048 V to the VREF pin and using this as reference.

579-MCP1501T-20E/CHY

2.048 V  ,   0.1%

 

Now more insight ? :)

 

If you feel a post has answered your question, please click on " Best Answer ".