2019-09-09 05:30 AM
Using NUCLEO-G071RB board and therein DAC_OUT1, PA4, CN8.3.
Use internal Vref with 2500 mV.
Calculating DOR from a dst_voltage using equation in Reference Manual (page 360/1223)
DOR = DACoutput * 4096 / Vref
gives voltages3..5 mV too high, e.g.
// 400 mV 403.9 mV
// 800 mV 804.3 mV
// 1200 mV 1204.7 mV.
Using 4095, voltages are much better:
DOR = DACoutput * 4095 / Vref
// 400 mV 399.4 mV
// 800 mV 800.0 mV
// 1200 mV 1200.8 mV.
Why ST docs tell "4096" (RM0444) or "DAC_MaxDigitalValue+1" (AN3126, AN4556) ?
2019-09-09 05:31 AM
Typo:
Using 4095, voltages are much better:
DOR = DACoutput * 4095 / Vref
// 400 mV 399.4 mV
...