AN2372 Freescale Semiconductor / Motorola, AN2372 Datasheet - Page 7

no-image

AN2372

Manufacturer Part Number
AN2372
Description
Using the Output Compare TPU Function (OC) with the MPC500Family
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
4.2
OFFSET contains the count value from a reference time value that indicates when the next match event will
occur. In host-initiated pulse mode, the CPU writes this parameter. In continuous pulse mode, OFFSET
determines the pulse width and is calculated by the TPU when a link is received as
OFFSET = (REF_ADDR2) * RATIO
where () indicates the data pointed to by the specified address. This parameter must always be less than
0x8000.
4.3
RATIO is an 8-bit fractional parameter (0.xxxxxxxx) that scales the contents indicated by REF_ADDR2 in
the calculation of the OFFSET parameter when operating in the continuous pulse mode. The actual fraction
used by the TPU is RATIO/0xFF. Thus, a value of 0x80 in RATIO represents the fraction 0x80/0xFF, which
is approximately equal to 1/2. Similarly, a value of 0xFF in RATIO represents a ratio of 1/1.
4.4
REF_ADDR1 is a pointer into the parameter RAM map. When REF_ADDR1 is used as a pointer, the upper
16 bits of the 24-bit address are assumed to be 0xYFFF, where Y can be %0111 or %1111 (the default is
%1111). For example, if the value in REF_ADDR1 is 0x3A, then REF_ADDR1 points to the fifth parameter
location for channel 3. In host-initiated pulse mode, REF_ADDR1 points to a reference value that is added
to OFFSET, forming a new match. In continuous pulse mode, REF_ADDR1 points to a synchronization
reference value used whenever a link is received subsequent to the first link after initialization.
REF_ADDR1 can point to either a value updated by the linking channel or to the most recent match event
value. It should not point to a static constant.
MOTOROLA
8 7 6 5
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
0 1 x x
1 x x x
TBS
OFFSET
RATIO
REF_ADDR1
4 3 2
0 0 0
0 0 1
0 1 0
0 1 1
1 x x
PAC
Freescale Semiconductor, Inc.
Table 2. OC CHANNEL_CONTROL Options
For More Information On This Product,
Using the Output Compare TPU Function
PSC
1 0
0 0
0 1
1 0
1 1
Go to: www.freescale.com
Do Not Detect Transition
Do Not Change PAC
Do Not Change TBS
Detect Falling Edge
Detect Rising Edge
Detect Either Edge
Input
Force Pin as Specified by PAC Latches
Action
Do Not Change Pin State on Match
Capture TCR1, Match TCR1
Capture TCR1, Match TCR2
Capture TCR2, Match TCR1
Capture TCR2, Match TCR2
Do Not Force Any State
Do Not Change PAC
Do Not Change TBS
Output Channel
Toggle on Match
Force Pin High
High on Match
Force Pin Low
Low on Match
Output
OFFSET
7

Related parts for AN2372