AnsweredAssumed Answered

a question about function u8 SVPWMEOCEvent(void) of FOC control based on the stm32

Question asked by yongfei.liu on Jun 12, 2014
       I, recently, doing the FOC control program based on the stm32 .  
      single shunt resistor.
Return false after first EOC, return true after second EOC" in the introduction of functions about u8 SVPWMEOCEvent(void)  .However,When the ADC sampling end for the first time??When the ADC sampling for the second time??

function prototype:
* Function Name  : SVPWMEOCEvent
* Description    :  Routine to be performed inside the end of conversion ISR
                        store the first sampled value and compute the bus voltage and temperature
                        sensor sampling  and disable the ext. adc triggering.
* Input           : None
* Output         : Return false after first EOC, return true after second EOC
* Return         : None
u8 SVPWMEOCEvent(void)
  if (bDistEnab == 1)
    // Diabling the Injectec conversion for ADC1

  // Store the Bus Voltage and temperature sampled values
  h_ADCTemp = ADC_GetInjectedConversionValue(ADC2,ADC_InjectedChannel_1);
  h_ADCBusvolt = ADC_GetInjectedConversionValue(ADC2,ADC_InjectedChannel_2);

  return ((u8)(1));