RSBJEUM0001-0101 Rev. 1.01
28
4.10 PWM Run Calculation Processing
g_OutputMode=M_TURNON
g_MotTheta=0
s_DltCnt < preset value?
CalPWMRun
g_Stage = s_ReloadStg?
g_Stage =0?
No
Yes
Yes
No
(Int3ic!=0)
CalPWMDuty Processing
s_ReloadStg= 1
Int_counter=0
Int3ic=0
Yes
Yes
No
s_1
No
Int_1
Int_counter=2?
g_Stage =1?
Yes
(Int5ic!=0)
CalPWMDuty Processing
s_ReloadStg= 2
Int_counter=0
Int5ic=0
Yes
No
Int_1
Int_counter=2?
1
No
Yes
No
No
Int4ic=0
Int5ic=0
Yes
Int4ic=0
Int3ic=0
2
idb0 = 0x3f
idb1 = 0x3f // stop PWM output
pfcr = 0x3f // enable PWM output pins
int4ic &= 0x00
int3ic &= 0x00
int5ic &= 0x00// clear interrupt request
RTS