AN2372 Freescale Semiconductor / Motorola, AN2372 Datasheet - Page 17
![no-image](/images/no-image-200.jpg)
AN2372
Manufacturer Part Number
AN2372
Description
Using the Output Compare TPU Function (OC) with the MPC500Family
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
1.AN2372.pdf
(24 pages)
Example D
8.4
8.4.1
This example uses OC in host-initiated pulse mode to generate a rising transition similar to that shown in
Figure 1b. The delay between the host service request and the rising edge is approximately 16.4 ms. Channel
0 is assigned the OC function.
CHANNEL_CONTROL is initialized as follows:
PSC field value is set to %11, so that no initial pin state is forced.
PAC field value is set to %001, so that the pin is driven high when a match occurs.
The previous pin level is assumed to be low.
OFFSET is initialized to 0x2000 TCR clock counts. This will be the duration of the delay to the transition.
REF_ADDR1 is initialized to 0xEC. This points it to the address 0x3041EC, which contains the most re-
cent value of TCR1.
The host service request field should be set to %01, for host-initiated pulse mode.
8.4.2
Load parameter RAM as shown.
9
The following description is provided as a guide only, to aid understanding of the function. The exact
sequence of operations in microcode may be different from that shown, in order to optimize speed and code
17
0X30412A
0X30412A
0x304120
0x304122
0x304124
0x304126
0x304128
0x304120
0x304122
0x304124
0x304126
0x304128
Example D
Function Algorithm
Description
Initialization
X
X
X
X
X
X
0
0
0
0
0
0
X
X
X
X
0
0
0
0
0
0
Freescale Semiconductor, Inc.
X
X
X
X
X
X
0
1
0
0
1
0
For More Information On This Product,
Using the Output Compare TPU Function
T a b l e 1 0 . O C C h a n n e l P a r a m e t e r R A M
T a b l e 1 1 . O C C h a n n e l P a r a m e t e r R A M
X
X
X
X
X
X
0
0
0
0
0
0
Go to: www.freescale.com
X
X
X
X
X
X
0
0
0
0
0
0
X
X
X
X
X
X
0
0
0
0
0
0
0
0
0
X
X
X
0
0
0
X
X
X
X
X
X
X
X
X
0
0
0
0
0
0
1
0
1
X
X
X
1
0
1
X
X
X
X
X
X
X
X
X
0
0
1
0
0
1
X
X
X
X
X
X
0
0
1
0
0
1
X
X
X
X
X
X
0
0
0
0
0
0
X
X
X
X
X
X
1
0
1
0
0
1
0
0
1
X
X
X
1
0
1
X
X
X
MOTOROLA
0
0
0
X
X
X
1
0
0
X
X
X
X
X
X
X
X
X
1
0
0
1
0
0