Increase ADC sampling time to increase accuracy

This commit is contained in:
2020-06-28 16:35:20 +02:00
parent e6205458c5
commit a5c15cd746
2 changed files with 4 additions and 2 deletions

View File

@@ -55,7 +55,7 @@ void MX_ADC_Init(void)
*/
sConfig.Channel = ADC_CHANNEL_0;
sConfig.Rank = ADC_RANK_CHANNEL_NUMBER;
sConfig.SamplingTime = ADC_SAMPLETIME_1CYCLE_5;
sConfig.SamplingTime = ADC_SAMPLETIME_239CYCLES_5;
if (HAL_ADC_ConfigChannel(&hadc, &sConfig) != HAL_OK)
{
Error_Handler();