Skip to main content
Senior
June 14, 2021
Question

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

  • June 14, 2021
  • 0 replies
  • 980 views

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()?

This topic has been closed for replies.