Rev. 1.10
60
November 04, 2019
Rev. 1.10
61
November 04, 2019
HT45F5Q-3
Battery Charger Flash MCU
HT45F5Q-3
Battery Charger Flash MCU
TM Interrupts
The Compact and Standard 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 input pin with the label xTCK while the Standard
type TM has another input pin with the label STPI. The xTM input pin, xTCK, is essentially a clock
source for the xTM and is selected using the xTCK2~xTCK0 bits in the xTMC0 register. This
external TM input pin allows an external clock source to drive the internal TM. The xTCK input pin
can be chosen to have either a rising or falling active edge. The STCK pin is also used as the external
trigger input pin in single pulse output mode. The other STM input pin, STPI, is the capture input
whose active edge can be a rising edge, a falling edge or both rising and falling edges and the active
edge transition type is selected using the STIO1~STIO0 bits in the STMC1 register.
The TMs each have two output pins with the label xTP and xTPB. 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 pins are also the
pins where the TM generates the PWM output waveform.
As the TM input and output pins are pin-shared with other functions, the TM input and output
functions must first be setup using relevant pin-shared function selection register. The details of the
pin-shared function selection are described in the pin-shared function section.
CTM
STM
Input
Output
Input
Output
CTCK
CTP, CTPB
STCK, STPI
STP, STPB
TM External Pins
CTM
CTCK
CTP
CCR output
CTPB
CTM Function Pin Block Diagram
STCK
STP
CCR output
STM
STPI
STPB
STM Function Pin Block Diagram