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.
Dear TI's experts,
I'm using TMS320F28069 device.
In my project, I use soft lib floating point with runtime support lib without FPU.
I'm trying to use IQ math but I got an error with _IQdiv API:
float a = 0.5f; float b = 0.3f; float c = 0.0f; _iq30 tmp = _IQ30div(_IQ30(a),_IQ30(b)); c = _IQ30toF(tmp);
but when I debug it, I just saw that value of tmp is not correct
tmp long 0.5412080726 (Q-Value(30))
As per I know, it should be 0.5/0.3 = 1.66666
Any recommendation for fixing this issue?
Regards,
Fitz
Hi Gautam,
Thank for your replying.
This just an example that could reproduce my issue in simple way.
I my code, a, b is floating point variable. and there is a division expression. I do want to improve calculation speed so I tried IQ math instead FPU32.
Is there any problem with me code? Because I saw in IQ math manual that I could cast floating point number to IQN base.
Could you suggest other solution? This solution might not be ok for my case.
Regards,
Fitz
Fitz,
I tried your code on my 28069 and it works fine. Do you by any chance have one of the motion control variants of the device, i.e. F28069M??
The IQ math tables are in a different location in boot ROM on those devices.
FPUTABLES : origin = 0x3FD590, length = 0x0006A0 /* FPU Tables in Boot ROM */ IQTABLES : origin = 0x3FDC30, length = 0x000B50 /* IQ Math Tables in Boot ROM */ IQTABLES2 : origin = 0x3FE780, length = 0x00008C /* IQ Math Tables in Boot ROM */ IQTABLES3 : origin = 0x3FE80C, length = 0x0000AA /* IQ Math Tables in Boot ROM */
You will find the correct linker command files for these devices in the motorware packages, specifically C:\ti\motorware\motorware_1_01_00_16\sw\ide\ccs\cmd\f2806x