Hello,
I have a question on InstaSPIN Projects and Labs.
Specifically it is on Lab10c-An Example in Space Vector Over Modulation, with fpu32.
I have some questions on the file of user.c as follows.
----------------------------------------------------------------------------------------------------
1. The First question.
In the file of user.c the following #ifdef statement is listed:
#ifdef __TMS320C28XX_FPU32__
It seems that the symbol of __TMS320C28XX_FPU32__ has been defined somewhere in the project because the C statements next to this line are asserted.
However I am not able to find the place where the symbol __TMS320C28XX_FPU32__ is defined.
Furthermore the symbol is not listed in the Predefined Symbols window of the Project Properties.
Where has the symbol __TMS320C28XX_FPU32__ been defined?
2. The second question
It is stated in the file of user.c as follows:
// when calling EST_ functions that return a float, and fpu32 is enabled, an integer is needed as a return
// so that the compiler reads the returned value from the accumulator instead of fpu32 registers
What is the problem if the compiler reads the returned value from the fpu32 registers?
3. The third question
The following C statements are listed in the file of user.c
#else
Ls_d = EST_getLs_d_H(obj->estHandle);
Ls_q = EST_getLs_q_H(obj->estHandle);
Rs = EST_getRs_Ohm(obj->estHandle);
#endif
In this case, the compiler seems to read the returned value from the fpu32 registers. Isn't it?
For example, the prototype for the function EST_getLs_d_H() is given in the file est.h as follows:
extern float_t EST_getLs_d_H(EST_Handle handle);
----------------------------------------------------------------------------------------------
Thank you for your guidance.
With regards,
JS Yoo