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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

}<br />

f16trMyIIR2.trFiltCoeff.f16B0 = FRAC16 (0.066122101544579/8);<br />

f16trMyIIR2.trFiltCoeff.f16B1 = FRAC16 (0.0);<br />

f16trMyIIR2.trFiltCoeff.f16B2 = FRAC16 (-0.066122101544579/8);<br />

f16trMyIIR2.trFiltCoeff.f16A1 = FRAC16 (-1.776189018043779/8);<br />

f16trMyIIR2.trFiltCoeff.f16A2 = FRAC16 (0.867755796910841/8);<br />

// output should be 0x021D ~ FRAC16(0.01651)<br />

GDFLIB_FilterIIR2Init_F16 (&f16trMyIIR2);<br />

f16Out = GDFLIB_FilterIIR2_F16 (f16In, &f16trMyIIR2);<br />

// output should be 0x021D ~ FRAC16(0.01651)<br />

GDFLIB_FilterIIR2Init (&f16trMyIIR2, Define F16);<br />

f16Out = GDFLIB_FilterIIR2 (f16In, &f16trMyIIR2, Define F16);<br />

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

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

// as default<br />

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

// output should be 0x021D ~ FRAC16(0.01651)<br />

GDFLIB_FilterIIR2Init (&f16trMyIIR2);<br />

f16Out = GDFLIB_FilterIIR2 (f16In, &f16trMyIIR2);<br />

4.17 Function GDFLIB_FilterIIR2Init_FLT<br />

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

4.17.1 Declaration<br />

void GDFLIB_FilterIIR2Init_FLT(GDFLIB_FILTER_IIR2_T_FLT *const pParam);<br />

4.17.2 Arguments<br />

Table 4-17. GDFLIB_FilterIIR2Init_FLT arguments<br />

Type Name Direction Description<br />

GDFLIB_FILTER_IIR2_<br />

T_FLT *const<br />

4.17.3 Return<br />

Function returns no value.<br />

pParam input,<br />

output<br />

Chapter 4 API References<br />

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

parameters. Arguments of the structure contain single<br />

precision floating point values.<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 />

Freescale Semiconductor, Inc. 191

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

Saved successfully!

Ooh no, something went wrong!