Other Parts Discussed in Thread: CONTROLSUITE
Tool/software: Code Composer Studio
Hi everyone,
I'm using the DRV8312-69M Kit to implement different estimators for an ACIM (LVACIMTR). I've started from project 11 of instaspin labs and replaced every call to the instaspin estimator with my own estimators. The estimators work, but I have to reduce the estimator frequency to <8kHz for the ISR to complete before the next ISR call.
My observer basically consists of 21 floating point multiplications, 18 sums and an atan2, for example:
obj->i_beta = z2/((float_t)USER_EST_FREQ_Hz) + (obj->a22*ibeta_old)+ (obj->a23*wmech_old* psialpha_old) + (obj->a24* psibeta_old) + (obj->b*ubeta_meas)+ ibeta_old
I noticed the f28069M has a floating point unit, but proj11 uses fixed point math and a floating point softlib, so now I want to use the fpu to make my observer faster.
Ideally I don't want to change all the iq-math in the modules (clarke, svgen,... ). I thought the IQmath_fpu32 library is what I'm looking for.
What I tried:
a) I selected the Runtime library "rts2800_fpu32.lib"
b) -- float_support is set to fpu32
c) IQmath_fpu32 is in the search path
d) In "sw/modules/math/src/32b/math.h" (and all modules e.g. "sw/modules/clarke", ...) I changed #include "sw/modules/iqmath/src/32b/IQmathLib.h" to #include "sw/modules/iqmath/src/float/IQmathLib.h"
Now some modules (such as clarke.h give me "expression must have integral type" errors. This is, I assume, because floating point cannot perform lshift and rshift operations.
So, to my questions:
1. Have I made a mistake or can the fpu not be used unless I modify the modules which use bit-shifting?
2. Is the above procedure generally correct if I want to use the fpu and can I expect my program to get faster then?
3. Are there "sw/modules" which can be used with floating point math or do I have to change them myself?
Thank you so much in advance