Other Parts Discussed in Thread: MOTORWARE, CONTROLSUITE
Hi All,
I have a question about following snippet, it seems to be implemented for IQmath, not FPU.
CTRL_angleDelayComp() in ctrl.h
uint32_t angleMask = ((uint32_t)0xFFFFFFFF >> (32 - GLOBAL_Q)); _iq angleTmp_pu; _iq angleComp_pu; // increment the angle angleTmp_pu = angleUncomp_pu + angleDeltaComp_pu; // mask the angle for wrap around // note: must account for the sign of the angle angleComp_pu = _IQabs(angleTmp_pu) & angleMask;
When I enabled IQmath_fpu32, I encountered following error.
"C:/ti/motorware/motorware_1_01_00_17/sw/modules/ctrl/src/32b/ctrl.h", line 2142: error #31: expression must have integral type
I think angleMask is used for removal of 8bit of MSB, but it is applicable for integer, not float value.
would you please let me know how to change this code for float ?
Best Regards,
Hae Ryong