Timer/Pulse-Width Modulator (S08TPMV3)
MC9S08QL8 MCU Series Reference Manual, Rev. 1
NXP Semiconductors
219
When either half of the 16-bit capture register is read, the other half is latched into a buffer to support
coherent 16-bit accesses in big-endian or little-endian order. The coherency sequence can be manually
reset by writing to TPMxCnSC.
An input capture event sets a flag bit (CHnF) that optionally generates a CPU interrupt request.
While in BDM, the input capture function works as configured. When an external event occurs, the TPM
latches the contents of the TPM counter (frozen because of the BDM mode) into the channel value registers
and sets the flag bit.
15.4.2.2
Output Compare Mode
With the output compare function, the TPM can generate timed pulses with programmable position,
polarity, duration, and frequency. When the counter reaches the value in TPMxCnVH:TPMxCnVL
registers of an output compare channel, the TPM can set, clear, or toggle the channel pin.
Writes to any of TPMxCnVH and TPMxCnVL registers actually write to buffer registers. In output
compare mode, the TPMxCnVH:TPMxCnVL registers are updated with the value of their write buffer
only after both bytes were written and 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 at the next change of the TPM
counter (end of the prescaler counting) after the second byte is written.
The coherency sequence can be manually reset by writing to the channel status/control register
(TPMxCnSC).
An output compare event sets a flag bit (CHnF) that optionally generates a CPU interrupt request.
15.4.2.3
Edge-Aligned PWM Mode
This type of PWM output uses the normal up-counting mode of the timer counter (CPWMS=0) and can
be used when other channels in the same TPM are configured for input capture or output compare
functions. The period of this PWM signal is determined by the value of the modulus register
(TPMxMODH:TPMxMODL) plus 1. The duty cycle is determined by the value of the timer channel
register (TPMxCnVH:TPMxCnVL). The polarity of this PWM signal is determined by ELSnA bit. 0% and
100% duty cycle cases are possible.
The time between the modulus overflow and the channel match value (TPMxCnVH:TPMxCnVL) is the
pulse width or duty cycle (
). If ELSnA is cleared, the counter overflow forces the PWM signal
high, and the channel match forces the PWM signal low. If ELSnA is set, the counter overflow forces the
PWM signal low, and the channel match forces the PWM signal high.
Содержание 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: ......