AnsweredAssumed Answered

Question fo Motor Control Firmware of STM3210B-MCKIT_2.0 about 1shunt FOC technology

Question asked by shuai.chen.002 on Nov 19, 2014
Latest reply on Dec 12, 2014 by Gigi

Dear Gigi,

I am using a STM32103VEH7 and research on single shunt FOC technology of the Motor Control library V2.0.  Now Ihave some questions to consult.

First , I donot quite understand the function of SVPWM_1ShuntCalcDutyCycles (Volt_Components Stat_Volt_Input) in stm32f10x_svpwm_1shunt.C.For example the subfunction SVPWM_1PWMDutyAdj ,From Um0492 User manual ,I have a certain understanding of boundary1 boundary2 boundary3 . An ST patented technique for current sampling in the “Boundary” regions has been implemented in the firmware .From the preach PPT, I know an ST patented technique: when unable to sample a phase of the current, by insert a valid vector in vectorV7 to sample the current and keep a constant duty cycle.

  According to my understanding when the aim vector in the SECTOR_5 or SECTOR_6 ,we need to adjust the dvDutyValues.hTimePhB not dvDutyValues.hTimePhA, beasuse the dvDutyValues.hTimePhB is the least duty cycle in SECTOR_5 or SECTOR_6,so I have difficulty understanding the lib code. the code about BOUNDARY_2 also

Continue to look at the code , if (dvDutyValues.hTimePhA > 0xEFFF)  what is the 0XEFF mean and is how to get this value.

Continue dowm ,about the sample point in this application the tim1 is PWM1 mode in this lib, the first point is Compare match in up count ,the second point occurs in down count,  is this understanding correct ?


Part oft he lib code

else if (bStatorFluxPos == BOUNDARY_1) // Adjust the lower


        switch (bSector)

        {      case SECTOR_5:

               case SECTOR_6 :  

 bInverted_pwm_new = INVERT_A;

                        dvDutyValues.hTimePhA -=HTMIN;





if (dvDutyValues.hTimePhA > 0xEFFF)

          dvDutyValues.hTimePhA = DMABURSTMIN_A;