Rev. 1.00
6�
��ne ��� �01�
Rev. 1.00
63
��ne ��� �01�
HT66FM5440
Brushless DC Motor A/D Flash MCU
HT66FM5440
Brushless DC Motor A/D Flash MCU
TM Interrupts
The 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 has one TM input pin, with the label TCKn. The PTMn input pin, TCKn, is
essentially a clock source for the PTMn and is selected using the PTnCK2~PTnCK0 bits in the
PTMnC0 register. This external TM input pin allows an external clock source to drive the internal
TM. The TCKn input pin can be chosen to have either a rising or falling active edge.
T
he TCKn pin
is also used as the external trigger input pin in single pulse output mode.
The TMs each have two output pin with the label TPn_0 and TPn_1. 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.
T
he external TPn_0 and TPn_1 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 function must first be setup
using relevant pin-shared function selection bits described in the Pin-shared Function section.
The TCKn and TPn_0 pins are also 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
PTnIO1~PTnIO0 bits in the PTMnC1 register. The capture input coming from TCKn or TPn_0 is
determined by the PTnCAPTS bit in the PTMnC1 register.
PTM0
PTM1
PTM2
PTM3
Input
Output
Input
Output
Input
Output
Input
Output
TCK0�
TP0_0
TP0_0�
TP0_1
TCK1�
TP1_0
TP1_0�
TP1_1
TCK��
TP�_0
TP�_0�
TP�_1
TCK3�
TP3_0
TP3_0�
TP3_1
TM External Pins
TM Input/Output Pin Selection
Selecting to have a TM input/output or whether to retain its other shared function is implemented
using the relevant pin-shared function selection registers, with the corresponding selection bits in
each pin-shared function register corresponding to a TM input/output pin. Configuring the selection
bits correctly will setup the corresponding pin as a TM input/output. The details of the pin-shared
function selection are described in the pin-shared function section.
TCKn
TPn_0
CCR o�tp�t
TPn_1
PTMn
PTM Function Pin Block Diagram (n=0~3)