Timer/Pulse-Width Modulator (S08TPMV3)
MC9S08QL8 MCU Series Reference Manual, Rev. 1
NXP Semiconductors
213
When BDM is active, the timer counter is frozen (this is the value you read). The coherency mechanism
is frozen so the buffer latches remain in the state they were in when the BDM became active, even if one
or both counter halves are read while BDM is active. This assures that if you were in the middle of reading
a 16-bit register when BDM became active, it reads the appropriate value from the other half of the 16-bit
value after returning to normal execution.
In BDM mode, writing any value to TPMxSC, TPMxCNTH, or TPMxCNTL registers resets the read
coherency mechanism of the TPMxCNTH:TPMxCNTL registers, regardless of the data involved in the
write.
15.3.3
TPM 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 0x0000 at the next clock, 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 0x0000
that results in a free running timer counter (modulo disabled).
Writes to any of the registers TPMxMODH and TPMxMODL actually writes to buffer registers and the
registers are updated with the value of their write buffer according to the value of CLKSB:CLKSA bits:
•
If CLKSB and CLKSA are cleared, the registers are updated when the second byte is written
•
If CLKSB and CLKSA are not cleared, the registers are updated after both bytes were written, and
the TPM counter changes from (TPMxMODH:TPMxMODL – 1) to
(TPMxMODH:TPMxMODL). If the TPM counter is a free-running counter, the update is made
when the TPM counter changes from 0xFFFE to 0xFFFF
The latching mechanism is manually reset by writing to the TPMxSC address (whether BDM is active or
not).
When BDM is active, the coherency mechanism is frozen (unless reset by writing to TPMxSC register) so
the buffer latches remain in the state they were in when the BDM became active, even if one or both halves
of the modulo register are written while BDM is active. Any write to the modulo registers bypasses the
buffer latches and directly writes to the modulo register while BDM is active.
7
6
5
4
3
2
1
0
R
TPMxCNT[7:0]
W
Any write to TPMxCNTL clears the 16-bit counter
Reset
0
0
0
0
0
0
0
0
Figure 15-8. TPM Counter Register Low (TPMxCNTL)
7
6
5
4
3
2
1
0
R
TPMxMOD[15:8]
W
Reset
0
0
0
0
0
0
0
0
Figure 15-9. TPM Counter Modulo Register High (TPMxMODH)
Содержание MC9S08QL4
Страница 4: ...MC9S08QL8 MCU Series Reference Manual Rev 1 4 NXP Semiconductors...
Страница 24: ...Chapter 2 Pins and Connections MC9S08QL8 MCU Series Reference Manual Rev 1 24 NXP Semiconductors...
Страница 36: ...Chapter 3 Modes of Operation MC9S08QL8 MCU Series Reference Manual Rev 1 36 NXP Semiconductors...
Страница 56: ...Chapter 4 Memory MC9S08QL8 MCU Series Reference Manual Rev 1 56 NXP Semiconductors...
Страница 120: ...Analog Comparator S08ACMPVLPV1 MC9S08QL8 MCU Series Reference Manual Rev 1 120 NXP Semiconductors...
Страница 148: ...Analog to Digital Converter S08ADC12V1 MC9S08QL8 MCU Series Reference Manual Rev 1 148 NXP Semiconductors...
Страница 162: ...Internal Clock Source S08ICSV3 MC9S08QL8 MCU Series Reference Manual Rev 0 162 NXP Semiconductors...
Страница 172: ...Modulo Timer S08MTIMV1 MC9S08QL8 MCU Series Reference Manual Rev 1 172 NXP Semiconductors...
Страница 200: ...Serial Communications Interface S08SCIV4 MC9S08QL8 MCU Series Reference Manual Rev 1 200 NXP Semiconductors...
Страница 224: ...Timer Pulse Width Modulator S08TPMV3 MC9S08QL8 MCU Series Reference Manual Rev 1 224 NXP Semiconductors...
Страница 238: ...Development Support MC9S08QL8 MCU Series Reference Manual Rev 1 238 NXP Semiconductors...
Страница 239: ......