SLAAEB8A February   2024  – August 2025 MSPM0G1106 , MSPM0G1107 , MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G1518 , MSPM0G1519 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3505 , MSPM0G3505-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1 , MSPM0G3518 , MSPM0G3518-Q1 , MSPM0G3519 , MSPM0G3519-Q1

 

  1.   1
  2. 1Description
  3. 2Required Peripherals
  4. 3Design Steps
  5. 4Design Considerations
  6. 5Software Flow Chart
  7. 6Application Code
  8. 7Additional Resources
  9. 8E2E
  10. 9Revision History
  11.   Trademarks

Design Steps

  1. Determine the desired corner frequency and filter response.
  2. Set the ADC sampling frequency. This must be at least twice the expected bandwidth of the signal.
  3. Calculate the desired coefficients and filter order. The filter coefficients are rational numbers which, combined with the sampling frequency, determine the pass and rejection bands of the filter.
    1. There are different methods and tools for FIR filter coefficient calculation, which is not discussed in this document.
  4. Convert the filter coefficients to fixed point values.
    1. In the example code, a Q16 (16 fractional bits) representation is used. Perform this conversion using the IQMath library or by multiplying the coefficients by 2n where n is the desired number of fractional bits. Verify that the selected data type can hold these values without overflowing.
    2. The filter coefficients are constant values, and as a result, can be contained in flash to save room in SRAM if desired.