hello ivan i extracted this function from your prop bord power api however i cant seem to figure out the naming convention for this " ADC_Channel_17". i changed the read battery pin to ADC_Channel_14 thinking it would be conneted to pc4 instead of pc0 that you used(ADC_Channel_10)
`uint16_t readBattery()
{
uint16_t battery;
uint16_t vrefint;
// Read VREFINT
while (ADC_GetSoftwareStartConvStatus(ADC1) != RESET);
ADC_RegularChannelConfig(ADC1, ADC_Channel_17, 1, ADC_SampleTime_84Cycles);
ADC_SoftwareStartConv(ADC1);
while (ADC_GetFlagStatus(ADC1, ADC_FLAG_EOC) == RESET);
vrefint = ADC1->DR;
while (ADC_GetSoftwareStartConvStatus(ADC1) != RESET);
ADC_RegularChannelConfig(ADC1, ADC_Channel_14, 1, ADC_SampleTime_84Cycles);
ADC_SoftwareStartConv(ADC1);
while (ADC_GetFlagStatus(ADC1, ADC_FLAG_EOC) == RESET);
battery = ADC1->DR;
battery = battery * 1210 / vrefint;
return battery / 0.233f;
}`