English
Language : 

MC9S08RG60 Datasheet, PDF (142/232 Pages) Motorola, Inc – Microcontrollers
Timer/PWM (TPM) Module
Setting ELSnB:ELSnA to 0:0 configures the related timer pin as a general-purpose I/O pin unrelated
to any timer channel functions. This function is typically used to temporarily disable an input capture
channel or to make the timer pin available as a general-purpose I/O pin when the associated timer
channel is set up as a software timer that does not require the use of a pin. This is also the setting
required for channel 0 when the TPM1CH0 pin is used as an external clock input.
10.7.5 Timer x Channel Value Registers (TPM1CnVH:TPM1CnVL)
These read/write registers contain the captured TPM counter value of the input capture function or the
output compare value for the output compare or PWM functions. The channel value registers are cleared
by reset.
Bit 7
6
5
4
3
2
Read:
Bit 15
14
13
12
11
10
Write:
Reset: 0
0
0
0
0
0
1
Bit 0
9
Bit 8
0
0
Figure 10-11 Timer x Channel Value Register High (TPM1CnVH)
Bit 7
6
5
4
3
2
1
Bit 0
Read:
Bit 7
6
5
4
3
2
1
Bit 0
Write:
Reset: 0
0
0
0
0
0
0
0
Figure 10-12 Timer x Channel Value Register Low (TPM1CnVL)
In input capture mode, reading either byte (TPM1CnVH or TPM1CnVL) latches the contents of both bytes
into a buffer where they remain latched until the other byte is read. This latching mechanism also resets
(becomes unlatched) when the TPM1CnSC register is written.
In output compare or PWM modes, writing to either byte (TPM1CnVH or TPM1CnVL) latches the value
into a buffer. When both bytes have been written, they are transferred as a coherent 16-bit value into the
timer channel value registers. This latching mechanism may be manually reset by writing to the
TPM1CnSC register.
This latching mechanism allows coherent 16-bit writes in either order, which is friendly to various
compiler implementations.
142
MC9S08RC/RD/RE/RG
Freescale Semiconductor