User`s guide

Preventing Memory Corruption When You Export C oefficients to Processor Memory
Caution Identify changes that require additional memory to store the
coefcients before you begin your export. Otherwise, exporting the new lter
coefcients may overwrite data in memory locations you did not allocate for
storing coefcients. Also, exporting lter coefcients to memory after you
change the lter order, structure, design algorithm, or data type can yield
unexpected res ults and corrupt memory.
Changing the lter design algorithm in FDATool, such as changing from
Butterworth to Max im ally Flat, often changes the number of lter coefcients
(the lter order), the number of sections, or both. Also, the coefcients from
the new design algorithm may not perform properly with your source code
lter implementation.
If you change the design algorithm, verify that your lter structure and
length are the same after y ou redesign your lter, and that the coefcients
will perform properly w ith t he lter you implemented.
If you change the number of sections or the lter order, your lter will not
perform properly unless your lter algorithm implementation accommodates
the changes.
Example: Changing Filter Coefficients Stored on Your
Processor
This example writes lter co ef cients to processor memory to replace the
existing coefcients. To perform this process, you need the names of the
variables in which your project stores the lter d ata.
Before you exp ort coefcients directly to memory, verify that your project
allocated enough m emo ry f or the new lter coefcients. If y our project
allocated eno ug h memory, you can modi fy your lte r in FDAT ool and then
follow the steps in this exampletoexporttheupdatedlter coefcients to
the allocated memory.
If your new lter requires additional memory space, use a C header le to
allocate mem ory on the processor and export the new coefcients as described
in “Exporting Filter Coefcients to Your Code Composer Studio Proje ct” on
page 5-9.
5-17