Rev. 1.00
1�4
��ne ��� �01�
Rev. 1.00
1�5
��ne ��� �01�
HT66FM5440
Brushless DC Motor A/D Flash MCU
HT66FM5440
Brushless DC Motor A/D Flash MCU
Noise Filter Input Interrupt
The external noise filter intput interrupt has its own independent interrupt number and is controlled
by signal transitions on the NFIN pin. After being configured with a desired interrupt priority level,
an external noise filtered intput interrupt request will take place when the relevant interrupt priority
request flag, Int_prinF, is set, which will occur when a transition, whose type is chosen by the edge
select bits NFIS1 and NFIS0 in the NF_VIL register, appears on the NFIN pin. To allow the program
to branch to its respective interrupt vector address, the global interrupt enable bit, EMI, and the
relevant interrupt priority enable bit, Int_prinE, must first be set. As the external noise filter interrupt
pin is pin-shared with I/O pin,
it
can only be configured as the noise filter interrupt pin if
its
interrupt
priority enable bit has been set and the noise filter interrupt pin is selected by the corresponding pin-
shared function selection bits. The pin must also be setup as an input by setting the corresponding
bit in the port control register. When the interrupt
is
enabled, the stack is not full and the correct
transition type appears on the noise filter interrupt pin, a subroutine call to the noise filter interrupt
vector will take place. When the interrupt is serviced, its interrupt priority request flag, Int_prinF,
will be automatically reset and the EMI bit will be automatically cleared to disable other interrupts.
Note that any pull-high resistor selections on the NFIN pin will remain valid even if the pin is used
as a noise filter interrupt input.
The NF_VIL register is used to select the type of active edge that will trigger the noise filter
interrupt. A choice of either rising or falling or both edge types can be chosen to trigger a noise filter
interrupt. Note that the NF_VIL register can also be used to disable the noise filter interrupt function.
Comparator Interrupt
The comparator interrupt has its own independent interrupt number and is controlled by the internal
comparator 0. After being configured with a desired interrupt priority level, a comparator interrupt
request will take place when the relevant interrupt priority request flag, Int_prinF,
is
set, a situation
that will occur when the comparator output changes state. To allow the program to branch to its
respective interrupt vector address, the global interrupt enable bit, EMI, and the relevant interrupt
priority enable bit, Int_prinE, must first be set. When the interrupt is enabled, the stack is not full and
the comparator inputs generate a comparator output transition, a subroutine call to the comparator
interrupt vector, will take place. When the interrupt is serviced, the relevant interrupt priority request
flag, Int_prinF, will be automatically reset and the EMI bit will be automatically cleared to disable
other interrupts.
CAPTM Interrupts
The CAPTM module has two interrupts and each has an independent interrupt number. These are
the capture overflow interrupt, CapTM_Over, and the compare match interrupt, CapTM_Cmp.
After being configured with a desired interrupt priority level, a CAPTM capture interrupt request
or compare match interrupt will take place when the relevant interrupt prioriy request flag, Int_
prinF, is set, which occurs when CAPTM capture overflows or compare matches. To allow the
program to branch to their respective interrupt vector address, the global interrupt enable bit, EMI,
and the relevant interrupt priority enable bit, Int_prinE, must first be set. When the interrupt is
enabled, the stack is not full and CAPTM capture overflows or compare matches, a subroutine
call to the respectivel interrupt vector will take place. When the CAPTM interrupt is serviced, the
relevant interrupt priority request flag, Int_prinF, will be automatically reset and the EMI bit will be
automatically cleared to disable other interrupts.