AN2848 Freescale Semiconductor / Motorola, AN2848 Datasheet

no-image

AN2848

Manufacturer Part Number
AN2848
Description
Programming the eTPU
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Freescale Semiconductor
Application Note
Programming the eTPU
by: Mike Pauwels
This is one part of a series of application notes intended
to help the microcontroller systems engineer to design
and implement code for the Enhanced Time Processor
Unit (eTPU). The notes are intended to suggest design
strategies, map techniques for common classes of
problems, and steer the user away from difficult
operations and algorithms. This first note provides an
overview of the programming project, with suggestions
on how to make partitioning and top level design
decisions and avoid common pitfalls and problems.
RESOURCES
Websites
Training
Publications
© Freescale Semiconductor, Inc., 2004. All rights reserved.
TECD Systems Engineering
www.ashware.com
www.bytecraft.com
www.eTPU.com
Programming the eTPU
Presented by Ash Ware and Freescale. See
www.ashware.com.
eTPU Reference Manual
1
2
3
4
5
6
7
8
Overview .............................................................2
Architecture .........................................................2
Function Design – Hardware ..............................6
Function Development – Tools ...........................7
Function Design – Software ................................8
Host Interface Design ........................................11
Simulating the eTPU Function ..........................12
Summary ...........................................................12
Table of Contents
Rev. 0, 09/2004
AN2848

Related parts for AN2848

AN2848 Summary of contents

Page 1

... Freescale Semiconductor, Inc., 2004. All rights reserved. Rev. 0, 09/2004 Table of Contents 1 Overview .............................................................2 2 Architecture .........................................................2 3 Function Design – Hardware ..............................6 4 Function Development – Tools ...........................7 5 Function Design – Software ................................8 6 Host Interface Design ........................................11 7 Simulating the eTPU Function ..........................12 8 Summary ...........................................................12 AN2848 ...

Page 2

... TPU, which has enjoyed one of the longest successes of any microcontroller peripheral. Despite its popularity in specific markets, widespread adoption of the TPU was hindered by a lack of high-level language support and limited availability of development tools. The eTPU was designed from the start to be supported by a high-level language compiler, and as such has become accessible to and adopted by a very wide range of customers even before the silicon had been qualified ...

Page 3

The input/output channels of the eTPU each have a pair of Match and Capture units interfaced to one of two timer/counter (TCR) registers. Logic in the channel enables the hardware to detect or drive pin transitions with a high degree ...

Page 4

Architecture The hardware associated with each channel is controlled by a number of registers, which determine actions associated with the input and output pins and eTPU service requests. These registers are accessed by a special purpose eTPU engine that can ...

Page 5

Let’s look at how this architecture works by considering a classic example; see a Pulse Width Modulated (PWM) output signal on one of the channel pins, he would need a TCR and comparator to cause the output to transition high ...

Page 6

Function Design – Hardware systems implemented. Along the way, a number of difficult problems posed by the unique nature of the eTPU have been discovered and solved. This application note contains some of the wisdom of prior experience for the ...

Page 7

... The compiler passes information to the host processor allowing a one-step make process, effectively linking the eTPU functions to the host code. The information passing is enabled through a number of post-processing macros available in the Byte Craft compiler. Details of these macros will be described in a future application note. Freescale Semiconductor Programming the eTPU, Rev. 0 Function Development – Tools 7 ...

Page 8

Function Design – Software • The host compiler and linker do not require special features to use the eTPU information. Information is provided in C compatible files and the subsequent compilation of the host project can provide all the information ...

Page 9

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 ...

Page 10

Function Design – Software • The Applications Programmers Interface (API) needs to be designed as part of the eTPU function. An eTPU function cannot be considered complete without the means to initialize and exchange data with the host. Remember that ...

Page 11

Optimize your source. The compiler has a sophisticated system of optimizers, but it cannot always rewrite inefficiently written code. We will try to provide specific examples of this in a separate application note. The design of an eTPU function ...

Page 12

Simulating the eTPU Function • Issue an initialization Host Service Request (HSR) to the channel. Note that a service request is necessary for an eTPU function thread to execute. No eTPU operation can occur until at least one HSR is ...

Page 13

THIS PAGE INTENTIONALLY LEFT BLANK Freescale Semiconductor Programming the eTPU, Rev ...

Page 14

THIS PAGE INTENTIONALLY LEFT BLANK 14 Programming the eTPU, Rev. 0 Freescale Semiconductor ...

Page 15

THIS PAGE INTENTIONALLY LEFT BLANK Freescale Semiconductor Programming the eTPU, Rev ...

Page 16

... Freescale Semiconductor was negligent regarding the design or manufacture of the part. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners.© Freescale Semiconductor, Inc. 2004. All rights reserved. AN2848 Rev. 0 09/2004 ...

Related keywords