SLAAEB8 February   2024 MSPM0G1505 , MSPM0G1506 , MSPM0G1507 , MSPM0G3505 , MSPM0G3505-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1

 

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

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.