RSBJEUM0001-0101 Rev. 1.01
24
4.6Turn-on Processing
g_PWMDuty=M_INI_PWM_DUTY
Set timer values
Timer A4 register = timer value
Timer A1 register = timer value
Timer A2 register = timer value
TurnonPWM
g_PWMDuty> M_Max_PWM _duty
g_PWMDuty= M_Max_PWM_duty
g_PWMDuty< M_Min_PWM_duty
g_PWMDuty= M_Min_PWM_duty
No
No
Yes
Yes
g_Stage = g_MotTheta/ 60 degree
IDB0 = 0x3f
IDB1 = 0x00 // generate 3-phase PWM
PFCR = PFCRTbl [g_Stage]
Timer value =M_CARR_CNT –
((g_PWMDuty*(SINT_32)M_CARR_CNT)
>>15)
Rotation speed command >0?
g_MotTheta = M_SM_Start_Hz
×
M_CNTL_TS
No
Yes
1