Tool/software: Code Composer Studio
dear all:
hetmax value is 2000. When the maximum is greater than 1990, Pwm can not output???
#define hetmax 1982
U=hetmax * SinTab1024[MotorAngle]>>14;
V=hetmax * SinTab1024[(MotorAngle+341)&0x3FF]>>14;
W=hetmax * SinTab1024[(MotorAngle-341)&0x3FF]>>14;
U= (U+2000)/2;
V= (V+2000)/2;
W= (W+2000)/2;
hetRAM1->Instruction[pHET_BUFDCA_0 + 0].Data = U;
hetRAM1->Instruction[pHET_BUFDCA_0 + 1].Data = V;
hetRAM1->Instruction[pHET_BUFDCA_0 + 2].Data = W;