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: FPU FIR32.asm sample delay

Part Number: TMS320F28377D
Other Parts Discussed in Thread: CONTROLSUITE

I am attempting to use the FIR_32.asm files for a 18 tap filter.  However when I run the filter the first time I get back a response of zero.  Subsequent iterations of the filter return the results that match my Matlab based example but they seem to be one sample iteration delayed.  

I compiled and executed the example code from here C:\ti\controlSUITE\libs\dsp\FPU\v1_50_00_00\examples\filter\2837x_fir and this also seems to be delayed by one iteration returning zero on the first call to filter.calc()   

Can someone guide me to where I can change the results to not have the sample delay.  

Thanks, 

Len 

  • Len,

    When I run the example I also see the first output in the result array is zero. In this case, the result is being calculated from:
    xn = 0.5*sin(Rad) + 0.5*sin(Rad2);

    Both "Rad" and "Rad2" are zero on the first call, so assuming the filter delay line is initialized to zero, a zero first result would be expected even if there is a direct feed-through in the filter.

    Keep in mind there is a difference in array indexing between Matlab and the C language: Matlab uses 1 for the first element whereas C will always start from 0. Could that account for the difference?

    Regards,

    Richard