English
Language : 

MC9S08GB60 Datasheet, PDF (163/290 Pages) Motorola, Inc – Microcontrollers
TPM Registers and Control Bits
When background mode is active, the timer counter and the coherency mechanism are frozen such that the
buffer latches remain in the state they were in when the background mode became active even if one or
both bytes of the counter are read while background mode is active.
10.7.3 Timer x Counter Modulo Registers (TPMxMODH:TPMxMODL)
The read/write TPM modulo registers contain the modulo value for the TPM counter. After the TPM
counter reaches the modulo value, the TPM counter resumes counting from $0000 at the next clock
(CPWMS = 0) or starts counting down (CPWMS = 1), and the overflow flag (TOF) becomes set. Writing
to TPMxMODH or TPMxMODL inhibits the TOF bit and overflow interrupts until the other byte is
written. Reset sets the TPM counter modulo registers to $0000, which results in a free-running timer
counter (modulo disabled).
Bit 7
6
5
4
3
3
2
Bit 0
Read:
Bit 15
14
13
12
11
10
Write:
9
Bit 8
Reset: 0
0
0
0
0
0
0
0
Figure 10-8. Timer x Counter Modulo Register High (TPMxMODH)
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-9. Timer x Counter Modulo Register Low (TPMxMODL)
It is good practice to wait for an overflow interrupt so both bytes of the modulo register can be written well
before a new overflow. An alternative approach is to reset the TPM counter before writing to the TPM
modulo registers to avoid confusion about when the first counter overflow will occur.
10.7.4 Timer x Channel n Status and Control Register (TPMxCnSC)
TPMxCnSC contains the channel interrupt status flag and control bits that are used to configure the
interrupt enable, channel configuration, and pin function.
Bit 7
6
5
4
3
2
1
Bit 0
Read:
0
0
CHnF CHnIE MSnB MSnA ELSnB ELSnA
Write:
Reset: 0
0
0
0
0
0
0
0
= Unimplemented or Reserved
Figure 10-10. Timer x Channel n Status and Control Register (TPMxCnSC)
MC9S08GB/GT Data Sheet, Rev. 2.3
Freescale Semiconductor
163