AN2848 Freescale Semiconductor / Motorola, AN2848 Datasheet - Page 9

no-image

AN2848

Manufacturer Part Number
AN2848
Description
Programming the eTPU
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
There are three hard limits on the eTPU execution engine: program space, data store, and time. There are
methods to trade off between these three, and the strategy must be dictated by the particular system design.
However, there is nothing to be gained from unused program or data memory, while every cycle wasted
will affect the performance of all of the eTPU functions. Execution time then should be the primary focus
for algorithm optimization. If the sine function in the above example could be provided in a lookup table
and there is room for the table in the memory, the savings in code space and execution time will be
significant.
The strategy used to husband these resources must be dictated by the application, but a few guidelines will
help to plan a successful design:
Freescale Semiconductor
Make conservative decisions in partitioning the function between the host and the eTPU. If an
operation can be placed in either machine, put it in the host. For example, if the requirement is to
return the frequency of an input waveform, the eTPU can measure the period directly. The
frequency is a scaled reciprocal of the period. When the host requires the frequency, it is trivial to
do the math using the more powerful processor. Partitioning the calculation into the eTPU
increases the execution time in the eTPU and requires a parameter to store the value.
Figure 4. Sine Modulated PWM Waveform
Programming the eTPU, Rev. 0
Function Design – Software
9

Related parts for AN2848