English
Language : 

PXR40RM Datasheet, PDF (1162/1434 Pages) Freescale Semiconductor, Inc – PXR40 Microcontroller
Decimation Filter
Coefficient
B0
B1
B2
B3
B4
Table 28-19. Computed Coefficient Values
Decimal Value
0.0221455
0.00445582948893748
0.0318517846509088
0.00445582948893748
0.0221455
Coefficient
A0
A1
A2
A3
A4
Decimal Value
-1.0
2.69772868375858
-3.234056294853
1.92028561712454
-0.47939080709495
Since the number range of the computed coefficients exceeds the range of the hardware, the coefficients
must be scaled, by at least a factor of 4. In this example, a factor of 8 is chosen. Table 28-20 below lists
the scaled values and their 24 bit signed fractional values, in hexadecimal notation.
Table 28-20. Coefficient Values for Decimation Filter
Computed Value
Scaled Value (SCAL=8)
Filter Coefficients
Decimal Value
Decimal Value
Hexadecimal Values
(24 bits)
DECFILT_x_COEF0 = B0/SCAL
0.0221455
DECFILT_x_COEF1 = B1/SCAL 0.00445582948893748
DECFILT_x_COEF2 = B2/SCAL 0.0318517846509088
DECFILT_x_COEF3 = B3/SCAL 0.00445582948893748
DECFILT_x_COEF4 = B4/SCAL
0.0221455
DECFILT_x_COEF5 = A1/SCAL 2.69772868375858
DECFILT_x_COEF6 = A2/SCAL –3.234056294853
DECFILT_x_COEF7 = A3/SCAL 1.92028561712454
DECFILT_x_COEF8 = A4/SCAL –0.47939080709495
0.00276815891266
0.00055694580078
0.00398147106171
0.00055694580078
0.00276815891266
0.33721613883972
–0.40425717830658
0.24003565311432
–0.05992400646210
0x005AB5
0x001240
0x008277
0x001240
0x005AB5
0x2B29E6
0xCC414E
0x1EB97D
0xF8546A
28.5.2 Initialization Procedure
Specific initialization for two different operating modes is provided in the use case sections that follow this
section. The general sequence of steps for initializing one Decimation Filter is:
1. Program the configuration registers DECFILT_x_MCR to configure the input data source and
output result destination.
2. Write all filter coefficient registers DECFILT_x_COEFn with values that define the filter
frequency response characteristics.
3. Execute a soft reset if the filter was previously configured, by writing DECFILT_x_MCR[SRES]
= 1.
28-48
PXR40 Microcontroller Reference Manual, Rev. 1
Freescale Semiconductor