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.

question about implementing an IIR filter in the TMS32F028069.

Other Parts Discussed in Thread: CONTROLSUITE

From my customer -

I have a question about implementing an IIR filter in the TMS32F028069.

I am using the FixedPoint Library v1.01 and attempting to use the iir16 filter.

I computed the filter coefficients using the matlab script, and generally followed the implementation example in the controlSUITE folder.

As I learned from this discussion here: http://e2e.ti.com/support/microcontrollers/c2000/f/171/t/204289.aspx

There is a divide by 2 in the output of the filter, which otherwise appears undocumented. That aside, I was able to get answers that I would expect when running the code on the target with the debugger, but when I went to run without the debugger I was getting completely unreasonable values. I have allocated memory in .cmd file as outlined in the example for both the filter itself and the data buffer. Any ideas or threads to follow as to why I am getting a different response?

I can send code snippets etc. as needed.

  • Probably to do with the coefficients. In standalone, I normally load them to flash (in a named section) and then copy them to RAM at runtime.

    Or If they are global, be sure the .cinit section is in flash, if const - the .const section is in flash. If all of these are correct and you are still getting incorrect values please post a stripped down version of the code so that i can check out the filter.

  • Thank you Vishal, in fact I had competing named sections in flash that the coefficients were being pointed to, your note brought me to take a second look and I found my error.

    Much appreciated.