You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This applies at least on the NucleoL476 sample code, probably worth looking at the other STM32 sample code as well.
This line sets the ADC sampling time to 92 cycles for every ADC read. The problem is that when it's this low, it makes BoardBatteryMeasureVoltage return incorrect values when the input voltage is under 2.6 volts. We were able to solve this by changing the ADC sampling time to 640 cycles (ADC_SAMPLETIME_640CYCLES_5). This does slightly increase the amount of time the ADC takes to read, but given that AdcMcuReadChannel recalibrates the ADC every time it does a read, I'm assuming ADC read performance isn't a priority anyway.