Closed charlespax closed 8 years ago
Should be ADC. I have removed the voltage divider circuit in favor of a series diode to drop the voltage a bit.
The term "GPIO_Analog" is a bit confusing. In the STM32 there is a Schmitt trigger on each GPIO pin. This gives a more digital input as the internal signal will be stable at either HIGH or LOW. "GPIO_Analog" will disable the Schmitt trigger and allow the signal directly on the pin to be input into the microcontroller. This saves a little power.
How should PB0 be configured? It is connected to the BL-5C battery to measure battery voltage. Should it be GPIO_Analog or ADC1_IN8, or other value?