Hello,
Can you please help answer these questions for my customer?
I’m trying to figure out the cause of noisy spikes on motor current in one of our products. The motor control processor on this product is TMS320F2812. When I dive into the motor control part of the code, I’ve noticed that the motor control code is based on TI’s reference code designed by TI’s Digital Control System Group. I was able to find the corresponding reference sprc177.zip on your web site. However, I’ve some questions regarding your C2000 motor control reference code. In the function F281X_EV1_QEP_NO_INDEX_Calc() of f281xqep_no_index.c, what does __qmpy32by16(p->MechScaler, p->RawTheta, 31) really do?
In addition, I also have some questions regarding IQMath as following:
1. Both inputs A and B to the function _IQ15mpy(A, B) in IQMath Library should be in _iq15 format according to the document. What will be the consequence if both of the inputs are not actually _iq15 format (for example, A is in _iq30 format, B is an int32)?
2. What will be the data format of the result by adding two different _iq format numbers together (for example, _iq15 (IQ17.15) and _iq30 (IQ2.30))? Will it generate a result of _iq15(IQ17.15) format?
I would really appreciate if you could provide some answer to these questions.
Thanks