I have been having a hard time to use the DspIir2Lq function from dsplib.
I notice that the header definition shows it returns s_int32, but when I look at the dis-assembly of my program it seems to return only a 16 bit value in A0, so I cast it to a s_int16.
I am calling it like this:
Code: Select all
// declare variables s_int16 mem; __y struct DSP_IIR2COEFF16 cf; // setup coefficients for unity gain, no filter cf.b0 = 8191; cf.b1 = 0; cf.b2 = 0; cf.a1 = 0; cf.a2 = 0; // then in the loop for processing samples: lr = (s_int16)DspIir2Lq(lr,&cf,mem);