
Rev. 1.20
168
November 20, 2019
Rev. 1.20
169
November 20, 2019
HT66F2740
12V High Current Flash MCU
HT66F2740
12V High Current Flash MCU
external interrupt request flags, INT0F~INT1F, 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 pins will remain valid even if the pin is used as an external interrupt input.
The INTEG 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 register can also be used to disable the external interrupt function.
Over Voltage Protection Interrupt
The OVP Interrupt is controlled by detecting the OVP input voltage. An OVP Interrupt request will
take place when the OV
P Interrupt request flag, O
VPF, is set, which occurs when the Over Voltage
Protection circuit detects an over voltage condition. To allow the program to branch to its respective
interrupt vector address, the global interrupt enable bit, EMI, and OVP Interrupt enable bit, OVPE,
must first be set. When the interrupt is enabled, the stack is not full and an over
voltage is detected, a
subroutine call to the OVP Interrupt vector, will take place. When the interrupt is serviced, the OVP
Interrupt flag, O
VPF, will be automatically cleared. The EMI bit will also be automatically cleared
to disable other interrupts.
USIM Interrupt
The Universal Serial Interface Module Interrupt, also known as the USIM interrupt, will take place
when the USIM Interrupt request flag, USIMF, is set. As the USIM interface can operate in three
modes which are SPI mode, I
2
C mode and UART mode, the USIMF flag can be set by different
conditions depending on the selected interface mode.
If the SPI or I
2
C mode is selected, the USIM interrupt can be triggered when a byte of data has been
received or transmitted by the USIM SPI or I
2
C interface, or an I
2
C slave address match occurs,
or an I
2
C bus time-out occurs. If the UART mode is selected, several individual UART conditions
including a transmitter data register empty, transmitter idle, receiver data available, receiver overrun,
address detect and an RX pin wake-up, can generate an USIM interrupt with the USIMF flag bit set
high.
To allow the program to branch to its respective interrupt vector address, the global interrupt enable
bit, EMI, and the Universal Serial Interface Module Interrupt enable bit, USIME, must first be set.
When the interrupt is enabled, the stack is not full and any of the above described situations occurs,
a subroutine call to the respective Interrupt vector, will take place. When the interrupt is serviced,
the Universal Serial Interface Module Interrupt flag, USIMF, will be automatically cleared. The EMI
bit will also be automatically cleared to disable other interrupts.
Note that if the USIM interrupt is triggered by the UART interface, after the interrupt has been
serviced, the UUSR register flags will only be cleared when certain actions are taken by the UART,
the details of which are given in the UART section.
Standard and Periodic Type TM Interrupts
The Standard and Periodic Type TM each have two interrupts, one comes from the comparator A
match situation and the other comes from the comparator P match situation. All of the STM and
PTM interrupts have their own individual vector. There are two interrupt request flags and two
enable control bits. A TM interrupt request will take place when any of the TM request flags are set,
a situation which occurs when a TM comparator P or A match situation happens.
To allow the program to branch to its respective interrupt vector address, the global interrupt enable
bit, EMI, and respective TM Interrupt enable bit, must first be set. When the interrupt is enabled,
the stack is not full and a TM comparator match situation occurs, a subroutine call to the relevant