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
Hall Sensor Interrupts
The Hall sensor interrupts are contained within the multi-function interrupt 0 thus sharing the same
interrupt number. They are controlled by signal transistions on the Hall sensor noise filter output
signals, FHA, FHB and FHC. After being configured with a desired interrupt priority level, a Hall
sensor interrupt request will take place when the Hall sensor interrupt request flag, HALAF, HALBF
or HALCF, and the corresponding interrupt priority request flag are set, which will occur when
a transition appears on the Hall sensor noise filter outputs. To allow the program to branch to its
prespective interrupt vector address, the global interrupt enable bit, EMI, the Hall sensor interrupt
enable bit, HALAE, HALBE or HALCE, and the relevant interrupt priority enable bit, Int_prinE,
must first be set. Additionally the correct interrupt edge type must be selected using the INTEG0
register. If the Hall noise filter inputs are selected to come from the external input pins, H1, H2
and H3, which are pin-shared with I/O pins, they should be configured as an external Hall sensor
input pins using the corresponding pin-shared control bits before the Hall sensor interrupt functions
are enabled. When the interrupt is enabled, the stack is not full and either one of the Hall sensor
interrupts occurs, a subroutine call to the relevant interrupt vector will take place. When the interrupt
is serviced, the EMI bit will be automatically cleared to disable other interrupts and the related
interrupt priority request flag, Int_prinF, will be automatically reset, but the Hall sensor interrupt
request flags, HALAF, HALBF and HALCF, must be manually cleared by the application program.
The INTEG0 register is used to select the type of active edge that will trigger the Hall sensor
interrupt. A choice of either rising or falling or both edge types can be chosen to trigger a Hall
sensor interrupt. Note that the INTEG0 register can also be used to disable the Hall sensor interrupt
functions.
External Interrupt 1
The external interrupt 1 has its own independent interrupt number and is controlled by signal
transitions on the INT1 pin. After being configured with a desired interrupt priority level, an external
interrupt request will take place when its interrupt priority request flag, Int_prinF, is set, which will
occur when a transition, whose type is chosen by the edge select bits in the INTEG1 register, appears
on the external interrupt 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 interrupt pin is pin-shared with I/O pin,
it
can only be configured
as external interrupt pin if its interrupt priority enable bit has been set and the external 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 external interrupt pin, a subroutine call
to the external 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 external interrupt pin will
remain valid even if the pin is used as an external interrupt input.
The INTEG
1
register is used to select the type of active edge that will trigger the external interrupt.
A choice of either rising or falling or both edge types can be chosen to trigger an external interrupt.
Note that the INTEG
1
register can also be used to disable the external interrupt function.