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.

IQmath in DSP28335

Hi all,

I am currently building my control system in DSP 28335. Most of the calculation is based on FPU, and I would like to include some function defined well in IQmath. But I have encountered a problem with _IQsat() function when I included the line below in my code,

Error= _IQsat(Error,_IQ21(0.3), _IQ21(-0.3));

I want to limit my error within the range of [-0.3,0.3]. But this function give me some very big value which I have no idea where it come from. I have double checked I have included the IQmathLib.h in my project, so anyone has an idea why I cannot call this function in my program and how I can fix the problem?

all best,

yang