cancel
Showing results for 
Search instead for 
Did you mean: 

How to do ADC scan-multi channels before run HAL_ADCEx_InjectedStart_IT()

Kenji1
Senior

Hi All

I have a problem to do ADC scan-multi channels before run HAL_ADCEx_Injected Start IT().

I work on BLDC motor control with FOC. 

I use Injected ADC mode to read current feedback signal. 

The ADC read timing is synchronized with the SVPWM signal that control the motor.

I want to read the current value before start spin the motor. This value will be the offset value.

I write some code using, HAL_ADCEx_InjectedStart() but I could't read the ADC value. Not returned from HAL_ADC_PollForConversion(). 

Also I used HAL_ADC_Start_DMA(), but after use this function, HAL_ADCEx_InjectedStart_IT() function not work. The interrupt operation could not be performed. 

Does anyone know how to read ADC scan-multi channels before run HAL_ADCEx_InjectedStart_IT()?

0 REPLIES 0