Rev. 1.00
1��
��ne ��� �01�
Rev. 1.00
1�9
��ne ��� �01�
HT66FM5440
Brushless DC Motor A/D Flash MCU
HT66FM5440
Brushless DC Motor A/D Flash MCU
UART Interrupt
The UART interrupt is contained within the multi-function interrupt 7 sharing the same interrupt
number with other interrupt sources in the same group. Several individual UART conditions can
generate a UART interrupt. These conditions are a transmitter data register empty, transmitter
idle, receiver data available, receiver overrun, address detect and an RX pin wake-up. After being
configured with the desired interrupt priority level, an UART interrupt request will take place when
the UART interrupt request flag and the associated interrupt priority request flag are set, which
happens when one of these conditions occurs. To allow the program to branch to the respective
interrupt vector addresses, the global interrupt enable bit, EMI, interrupt priority enable bit, Int_
prinE and UART interrupt enable bit, UARTE, must first be set. When the interrupt is enabled, the
stack is not full and any of these conditions are created, a subroutine call to the respective interrupt
vector, will take place. When the UART interrupt is serviced, the EMI bit will be automatically
cleared to disable other interrupts, however only the interrupt priority request flag will be also
automatically cleared. As the UARTF flag will not be automatically cleared, it has to be cleared by
the application program. However, the USR register flags will be cleared automatically when certain
actions are taken by the UART, the details of which are given in the UART section.
I
2
C Interrupt
The I
2
C interrupt is contained within the multi-function interrupt 7 sharing the same interrupt
number with other interrupt sources in the same group. After being configured with the desired
interrupt priority level, an I
2
C Interrupt request will take place when the I
2
C Interrupt request flag,
IICF, and the associated interrupt priority request flag are set, which occurs when a byte of data
has been received or transmitted by the I
2
C interface, I
2
C address match or I
2
C time-out occurs. To
allow the program to branch to its respective interrupt vector address, the global interrupt enable
bit, EMI, and the I
2
C Interface Interrupt enable bit, IICE, and the realted interrupt priority enable
bit must first be set. When the interrupt is enabled, the stack is not full and any of these situations
occurs, a subroutine call to the I
2
C Interrupt vector, will take place. When the I
2
C Interface Interrupt
is serviced, the interrupt priority request flag will be automatically reset and the EMI bit will be
cleared to disable other interrupts. However, the interrupt request flag, IICF, has to be cleared by the
application program.
Time Base Interrupt
The function of the Time Base Interrupt is to provide regular time signal in the form of an internal
interrupt. It is controlled by the overflow signal from
its
timer function. The Time Base interrupt
is contained within the multi-function interrupt 7 which means it shares the same interrupt number
with other interrupt sources in the same group. After being configured with the desired interrupt
priority level, a Time Base interrupt request will take place when the Time Base interrupt request
flag, TBF, and the associated interrupt priority request flag are set, which occurs when the overflow
condition happens. To allow the program to branch to
its
interrupt vector address, the global
interrupt enable bit, EMI, the Time Base enable bit, TBE, and the relevant interrupt priority enble
bit must first be set. When the interrupt is enabled, the stack is not full and the Time Base overflows,
a subroutine call to
its
vector location 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 cleared
to disable other interrupts. However, the interrupt request flag, TBF, must be cleared manually by
application program.