Feature #740
Measure VDD
Status:
Neu
Priorität:
Normal
Zugewiesen an:
-
Beginn:
09.03.2026
Abgabedatum:
% erledigt:
0%
Geschätzter Aufwand:
CS Zielversion:
Beschreibung
The device often fails because of voltage drops.
VBus can not be monitored, no connection.
The internal reference 1,2V i quite stable. But when reading it, it gets compared to VDDA. The higher the raw ADC value is, the lower VDDA is.
VDD = 3.3V * ( VREFINT_CAL / ADC_VREFINT )
Examle
VDD = 3.3 * 1210 / 1500 = 2.66V
V_BAT can be measured way more accurate when VDDA is known.
V_BAT=VDD/4095*ADC_VAL
Or after voltage divider:
V_IN = ( VDD * ADC_VAL * ( R1 + R2 ) ) / ( R2 * 4095 )