AN2848 Freescale Semiconductor / Motorola, AN2848 Datasheet - Page 7

no-image

AN2848

Manufacturer Part Number
AN2848
Description
Programming the eTPU
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
The second step is to select a channel mode appropriate for the task. The eTPU provides 13
preprogrammed modes for channel operation. Detailed instructions on selection and using these modes are
the subject for a future application note, but the following summary may help in system design:
Details of these modes can be found in the eTPU Reference Manual.
4
A C compiler for the eTPU is available from Byte Craft, Ltd. of Waterloo, Ontario. Byte Craft has posted
and maintains a web page with frequently asked questions (FAQ) that can be a valuable resource for eTPU
users. The URL for the FAQ is:
http://www.bytecraft.com/public/etpuc/downloads/etpuc_faq.chm
The C compiler is designed to be compliant with a proposed ISO Standard for C for Embedded Systems.
This standard allows significant new features in the C language which have been found critically important
in dealing with the eTPU. The new language and the new eTPU have inspired a number of significant
compiler advances found in the Byte Craft product.
Freescale Semiconductor
required by the eTPU engine to service one of the edges and reset the channel for the third edge is
highly dependent on the configuration and activity in the rest of the eTPU system. However, even
with no other eTPU activity, this time cannot be reduced to less than 10 CPU clock cycles.
When it is necessary to port a function from the TPU, the sm_st (SingleMatchSingleTransition)
mode is the TPU compatible mode.
If multiple matches are desired, the engineer must decide how the matches are to be related. The
em_ (EitherMatch) modes allow either match to occur and both matches can request service.
The em_ modes can be either b_ (Blocking) or nb_ (NonBlocking), which determines whether or
not the first match will block the second.
The bm_ (BothMatches) modes require both matches to occur before the channel requests service.
The both match modes may be further designated o_ (Ordered), which requires that MatchA
occurs before MatchB will be recognized.
In m2_ (Match2) modes, MatchA does not request service but enables MatchB, after which
MatchB e and will block a subsequent MatchA
All of these modes can be further designated _st (SingleTransition) or _dt (DoubleTransition).
The only difference between these is that single transition will request service after the first output
transition and double transition will request service after the second transition. Note that although
all modes are either _st or _dt, the user has the option of disabling the transition on the match for
an input-only function.
There is also an enhanced mode, sm_st_e, where a transition can be interlocked by a match.
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.
Function Development – Tools
Programming the eTPU, Rev. 0
Function Development – Tools
7

Related parts for AN2848