2025-03-06 2:49 AM
Hello community
Please help me, i am facing issue related to injected ADC on PWM timer
MCU : stm32f103, working on motor control for BLDC motor
Excepted : When motor is running that means it generated PWM, at that time Injected ADC value must be shore.
This is my ioc setting for PWM timer that is timer
this is setting for injected ADC ioc file
code
to state
HAL_ADCEx_Calibration_Start(&hadc1);
HAL_ADC_Start_DMA(&hadc1, (uint32_t*) Measured.rawADCValues, 4);
HAL_ADCEx_InjectedStart_IT(&hadc1);
void HAL_ADCEx_InjectedConvCpltCallback(ADC_HandleTypeDef* hadc){
Measured.phaseADCValues[0]=HAL_ADCEx_InjectedGetValue(hadc, ADC_INJECTED_RANK_1);
}