cancel
Showing results for 
Search instead for 
Did you mean: 

Injected ADC on PWM timer (Timer1)

snehadakhare01
Associate III

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 

snehadakhare01_0-1741257626872.pngsnehadakhare01_1-1741257644532.pngsnehadakhare01_2-1741257660108.pngsnehadakhare01_3-1741257673470.pngsnehadakhare01_4-1741257705855.png

this is setting for injected ADC ioc file

snehadakhare01_5-1741257815268.png

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);
}

 

 

0 REPLIES 0