I'm trying to get the internal voltages of a STM chip and so far I see some odd behaviour:
Code: Select all
# setting it up from REPL
import pyb
pyb.ADCAll(12,0x70000)
# enter through REPL
adc.read_core_temp()
adc.read_core_vbat()
adc.read_core_vref()
adc.read_vref()
Code: Select all
function MIN TYP MAX
core vref 1.227 1.227 1.227
core_vbat 2.451 2.453 2.455
vref 3.452 3.454 3.457
core temp 30.060 71.341 71.822
Code: Select all
core vref 1.227 1.227 1.277
core vbat 2.452 2.453 2.455
vref 2.999 3.000 3.002
core temp 71.501 71.501 71.661
The test was run on a NUCLEO_F091RC board. The VBAT is hardwired to VDD and the voltage measured is 3.31V.
The same test on my "reference" PYBV10 board showed expected behaviour:
Code: Select all
function | MIN | TYP | MAX
--- | --- | --- |---
core temp | 36.254 | 36.626 | 36.940
core vref | 1.205 | 1.205 | 1.205
core vbat | 3.229 | 3.230 | 2.233
core vref | 3.250 | 3.250 | 3.252
Is there a explanation for this?