cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H743 Internal voltage Reference and the ADC.

jgroff
Associate

I am using the STM32H743II package (with Vref+ and Vref-). Those two pins are not connected in this design (they're left floating). I'd like to measure the temperature of the chip, and am having trouble using the internal voltage reference as the reference for the ADC. As it stands, after enabling everything, I am reading "0" as the ADC value for the temperature sensor.

For reading the temperature sensor, I used CubeMX to set it up. I've tested the code on a nucleo board, and it reads the temperature just fine, so that code is working.

From the reference manual: Figure 18 "Power supply Overview" under section 5.4, Power Supplies, indicates that the voltage reference buffer (REF_BUF) can be connected to the reference for the internal ADC. Also, section 26 (VREFBUF) indicates that this is the case as well.

I'm enabling the internal voltage reference per the reference manual, and once done, the VRR bit is set in VREFBUF_CSR.

However, after all that, the ADC is returning a value of 0 after reading the temperature sensor.

Is there some additional configuration I might be missing so that the ADC uses the voltage reference properly?

Thanks!

2 REPLIES 2
TDK
Guru

It's a little unclear if the internal reference provides VREF- as well as VREF+. The manual isn't consistent in this regard. I'd try connecting VREF- to VSSA to see if that changes anything.

Or try your VREFBUF code on the nucleo board.

If that doesn't work, post your code that does the initialization. Could be something wrong there.

If you feel a post has answered your question, please click "Accept as Solution".
jgroff
Associate

I realized I had a H743-EVAL kit on hand. Looking at the schematic, I found I was able to remove R216, which isolated the Vref+ pin and left it floating. I put a meter on TP4 (Vref+), and saw that the voltage output from the internal voltage was output properly, and changed when I changed the scaling factor, so that works. Putting the code together, the ADC seems to use the reference voltage properly in conjunction with measuring the temperature sensor. So that all is good.

The only question left now is as you said, does the internal reference provide Vref- as well; it's not well defined in the reference manual. On the EVAL board, Vref- is connected directly to ground along with VSSA, so I cannot isolate that. The only difference between my board and the EVAL board now is that on my board, Vref- is floating.

Therefore I'm going to assume that Vref- must not be left floating, and I'll need to respin my board to make use of the sensor properly.