
Rev. 1.20
66
November 20, 2019
Rev. 1.20
67
November 20, 2019
HT66F2740
12V High Current Flash MCU
HT66F2740
12V High Current Flash MCU
TM Interrupts
The Compact, Standard and Periodic type TMs each have two internal interrupts, one for each of
the internal comparator A or comparator P, which generate a TM interrupt when a compare match
condition occurs. When a TM interrupt is generated it can be used to clear the counter and also to
change the state of the TM output pin.
TM External Pins
Each of the TMs, irrespective of what type, has one TM input pin, with the label xTCK. The TM
input pin, xTCK, is essentially a clock source for the TM and is selected using the xTCK2~xTCK0
bits in the xTMC0 register. This xTCK input pin allows an external clock source to drive the internal
TM. The xTCK pin can be chosen to have either a rising or falling active edge. The STCK/PTCK
pin is also used as the external trigger input pin in single pulse output mode for the STM/PTM.
The other xTM input pin, STPI or PTPI pin, is the capture input pin whose active edge can be a
rising edge, a falling edge or both rising and falling edges. The active edge transition type is selected
using the xTIO1~xTIO0 bits in the xTMC1 register. For the PTM, there is another capture input,
PTCK, for PTM capture input mode, which can be used as the external trigger input source except
for the PTPI pin.
The TMs each has two output pins, named xTP and xTPB. The xTPB pin outputs the inverted signal
of the xTP. When the TM is in the Compare Match Output Mode, these pins can be controlled
by the TM to switch to a high or low level or to toggle when a compare match situation occurs.
The external xTP and xTPB output pin is also the pin where the TM generates the PWM output
waveform.
As the TM input or output pins are pin-shared with other functions, the TM external pin function
must first be setup using registers. The corresponding bits in the Pin-shared Function Selection
Registers determines if its associated pin is to be used as an external TM pin or if it is to have
another function. The details of the pin-shared function selection are described in the pin-shared
function section.
CTM
STM
PTM
Input
Output
Input
Output
Input
Output
CTCK
CTP, CTPB
STCK, STPI
STP, STPB
PTCK, PTPI
PTP, PTPB
TM External Pins
CTM
CTCK
CTP
CCR output
CTPB
Clock input
CTM Function Pin Block Diagram