How to read multiple ADC (ADC 1, ADC2, ADC3) and each with 4 channels at a time using timer interrupt
Hi,
I am working on STM32G474.
I want to read multiple ADC channels (ADC1 , ADC2 and ADC3 all with 4 channels at a time).
I generated interrupt using timer 3 (update event) and reading ADC channels under
/* USER CODE BEGIN 2 */
HAL_TIM_Base_Start_IT(&htim3);
HAL_ADC_Start_IT(&hadc1);
HAL_ADC_Start_IT(&hadc2);
HAL_ADC_Start_IT(&hadc3);
/* USER CODE END 2 */
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
{
UNUSED(hadc);
adc_val1 = HAL_ADC_GetValue(&hadc1);
//HAL_GPIO_TogglePin(L5_GPIO_Port, L5_Pin);
}
adc_val1 = HAL_ADC_GetValue(&hadc1); will read only 1 channel and 1 ADC. I want to read 4 channels of ADC1 and likewise for ADC2 and ADC3 under same interrupt.
