Hi,
I am using the C2000 Resolver Kit (TMDRSLVR). In the initialization there is a routine that calculates the sine and cosine offset. In a for-loop with 32769 cylces mainly the following code is being executed:
rslvr.offsetS += _IQ20mpy((((int32)ADCResult.ADCRESULT0 << 9) - rslvrIn.offsetS), offsetWfT); rslvr.offsetC += _IQ20mpy((((int32)ADCResult.ADCRESULT1 << 9) - rslvrIn.offsetC), offsetWfT);
Can anyone tell me what is happening there ? Why is there a left shift of 9 bits and a multiplication with the "offset filter constant" ?
Thanks in advance !
- Brian