[pyb.ADCAll()] strange results
Posted: Mon Jul 02, 2018 1:49 pm
Hello,
I'm trying to get the internal voltages of a STM chip and so far I see some odd behaviour:
The results are not exactly what I would expect, being:
But after a soft reset (ctrl-D) and reentering the above it gets even stranger (IMHO):
The temperature and the core vref seem to behave as expected, but should vbat not be the same as vdd? Also In the second "run" the vref is 0,3V lower whereas the first run the vref was 0,15V higher that the 3,3V it is supposed to be...
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:
So one would expect that the temperatures between these two version would stay around the same and that the core_vbat and vref would behave differently.
Is there a explanation for this?
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?