This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28377D: Question about IQ_math or FLOAT_math in using SFRA.

Part Number: TMS320F28377D
Other Parts Discussed in Thread: SFRA

My program is IQ_math and Float mixed, use 28377, rts2800_fpu32.lib, IQmath_fpu32. 

But the MATH_TYPE is 0, so the _IQ24(1.0) = 16777216. I want add the SFRA function to the program.

I think I have two choices, using the fix point version or the float point version of SFRA.

If I choose the fix point version, I have to change all float operations in my program. That's a lot work to do.

I try to use the float version. Because there is some part use the IQmath in the program, the MATH_TYPE is 0 in IQmathLib.h.

I didn't set the MATH_TYPE to 1 like the pdf said. I found there is a mistake in SFRA_F_COLLECT(&sfra_Out, &sfra_Fdbk) function.

It seems like is the data format error, all data in OL_MagVect[], OL_PhaseVect[], is 2^31-1 = 2147483647. 

I am 100% sure that the data of sfra_Out, sfra_Fdbk is correct and is in float32 format. 

So I want to know if using the float version of SFRA , the MATH_TYPE  must be 1?  Can the lib support both IQ and float data? 

I have make sure the data type is collect, something like below: 

ADC data(IQ)---> SFRA_inject(float--->IQ)---------->voltage/current loop(IQ)--------->SFRA_collect(float) 

Thank you very much.