General Purpose Timer Module (GPT)
MCF52110 ColdFire® Integrated Microcontroller Reference Manual, Rev. 1
20-20
Freescale Semiconductor
Preliminary
Table 20-23. GPT Settings and Pin Functions
GPTEN DDR
1
1
When DDR sets the pin as input (0), reading the data register returns the state of the pin. When DDR set the pin as output
(1), reading the data register returns the content of the data latch. Pin conditions such as rising or falling edges can trigger
an input capture on a pin configured as an input.
GPTIOS
EDGx
[B:A]
OMx/
OLx
2
2
OM
n
/OL
n
bit pairs select the output action to be taken as a result of a successful output compare. When OM
n
or OL
n
is set
and the IOS
n
bit is set, the pin is an output regardless of the state of the corresponding DDR bit.
OC3Mx
3
3
Setting an OC3M bit configures the corresponding PORTT
n
pin to be output. OC3M
n
makes the PORTT
n
pin an output
regardless of the data direction bit when the pin is configured for output compare (IOS
n
= 1). The OC3M
n
bits do not change
the state of the PORTT
n
DDR bits.
Pin
Data
Dir.
Pin
Driven
by
Pin
Function
Comments
0
0
X
4
4
X = Don’t care
X
X
X
In
Ext.
Digital input
GPT disabled by GPTEN = 0
0
1
X
X
X
X
Out
Data reg.
Digital output GPT disabled by GPTEN = 0
1
0
0 (IC)
0 (IC
disabled)
X
0
In
Ext.
Digital input
Input capture disabled by EDG
n
setting
1
1
0
0
X
0
Out
Data reg.
Digital output Input capture disabled by EDG
n
setting
1
0
0
<> 0
X
0
In
Ext.
IC and
digital input
Normal settings for input capture
1
1
0
<> 0
X
0
Out
Data reg.
Digital output Input capture of data driven to output
pin by CPU
1
0
0
<> 0
X
1
In
Ext.
IC and
digital input
OC3M setting has no effect because
IOS = 0
1
1
0
<> 0
X
1
Out
Data reg.
Digital output OC3M setting has no effect because
IOS = 0; input capture of data driven
to output pin by CPU
1
0
1 (OC)
X
(3)
0
5
5
An output compare overrides the data direction bit of the output compare pin but does not change the state of the data
direction bit. Enabling output compare disables data register drive of the pin.
0
In
Ext.
Digital input
Output compare takes place but
does not affect the pin because of
the OM
n
/OL
n
setting
1
1
1
X
0
0
Out
Data reg.
Digital output Output compare takes place but
does not affect the pin because of
the OM
n
/OL
n
setting
1
0
1
X
<> 0
0
Out
OC action
Output
compare
Pin readable only if DDR = 0
(5)
1
1
1
X
<> 0
0
Out
OC action
Output
compare
Pin driven by OC action
(5)
1
0
1
X
X
1
Out
OC action/
OC3D
n
Output
compare
(ch 3)
Pin readable only if DDR = 0
6
1
1
1
X
X
1
Out
OC action/
OC3D
n
Output
compare/
OC3D
n
(ch 3)
Pin driven by channel OC action and
OC3D
n
via channel 3 OC
(6)