03.08.2013 Views

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Function GDFLIB_FilterIIR2Init_F16<br />

}<br />

f32trMyIIR2.trFiltCoeff.f32B0 = FRAC32 (0.066122101544579/8);<br />

f32trMyIIR2.trFiltCoeff.f32B1 = FRAC32 (0.0);<br />

f32trMyIIR2.trFiltCoeff.f32B2 = FRAC32 (-0.066122101544579/8);<br />

f32trMyIIR2.trFiltCoeff.f32A1 = FRAC32 (-1.776189018043779/8);<br />

f32trMyIIR2.trFiltCoeff.f32A2 = FRAC32 (0.867755796910841/8);<br />

// output should be 0x021DAC18 ~ FRAC32(0.0165305)<br />

GDFLIB_FilterIIR2Init_F32 (&f32trMyIIR2);<br />

f32Out = GDFLIB_FilterIIR2_F32 (f32In, &f32trMyIIR2);<br />

// output should be 0x021DAC18 ~ FRAC32(0.0165305)<br />

GDFLIB_FilterIIR2Init (&f32trMyIIR2, Define F32);<br />

f32Out = GDFLIB_FilterIIR2 (f32In, &f32trMyIIR2, Define F32);<br />

// ##############################################################<br />

// Available only if 32-bit fractional implementation selected<br />

// as default<br />

// ##############################################################<br />

// output should be 0x021DAC18 ~ FRAC32(0.0165305)<br />

GDFLIB_FilterIIR2Init (&f32trMyIIR2);<br />

f32Out = GDFLIB_FilterIIR2 (f32In, &f32trMyIIR2);<br />

4.15 Function GDFLIB_FilterIIR2Init_F16<br />

This function initializes the Second order IIR filter buffers.<br />

4.15.1 Declaration<br />

void GDFLIB_FilterIIR2Init_F16(GDFLIB_FILTER_IIR2_T_F16 *const pParam);<br />

4.15.2 Arguments<br />

Table 4-15. GDFLIB_FilterIIR2Init_F16 arguments<br />

Type Name Direction Description<br />

GDFLIB_FILTER_IIR2_<br />

T_F16 *const<br />

4.15.3 Return<br />

Function returns no value.<br />

pParam input,<br />

output<br />

Pointer to the filter structure with a filter buffer <strong>and</strong> filter<br />

parameters.<br />

<strong>Embedded</strong> <strong>Software</strong> <strong>and</strong> <strong>Motor</strong> <strong>Control</strong> <strong>Libraries</strong> <strong>for</strong> <strong>PXR40xx</strong>, Rev. 1.0<br />

186 Freescale Semiconductor, Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!