Rev. 1.00
190
September 11, 2018
Rev. 1.00
191
September 11, 2018
HT45F4050
A/D NFC Flash MCU
HT45F4050
A/D NFC Flash MCU
Interrupts
Interrupts are an important part of any microcontroller system. When an external event or an
internal function such as a Timer Module or an A/D converter requires microcontroller attention,
their corresponding interrupt will enforce a temporary suspension of the main program allowing the
microcontroller to direct attention to their respective needs. The device contains several external
interrupt and internal interrupts functions. The external interrupt is generated by the action of the
external INTn pin, while the internal interrupts are generated by various internal functions including
TMs, Comparator, Time Bases, LVD, EEPROM, SIM, UART, NFC and the A/D converter.
Interrupt Registers
Overall interrupt control, which basically means the setting of request flags when certain
microcontroller conditions occur and the setting of interrupt enable bits by the application program,
is controlled by a series of registers, located in the Special Purpose Data Memory, as shown in the
accompanying table. The first is the INTC0~INTC
3
registers which setup the primary interrupts,
the second is the MFI0~MFI2 registers which setup the Multi-function interrupts. Finally there is an
INTEG register to setup the external interrupt trigger edge type.
Each register contains a number of enable bits to enable or disable individual registers as well as
interrupt flags to indicate the presence of an interrupt request. The naming convention of these
follows a specific pattern. First is listed an abbreviated interrupt type, then the (optional) number of
that interrupt followed by either an "E" for enable/ disable bit or "F" for request flag.
Function
Enable Bit
Request Flag
Notes
Global
EMI
—
—
INTn Pin
INTnE
INTnF
n=0 or 1
Comparator
CPE
CPF
—
Multi-function
MFnE
MFnF
n=0~2
A/D Converter
ADE
ADF
—
Time Base
TBnE
TBnF
n=0 or 1
SIM
SIME
SIMF
—
UART
URE
URF
—
LVD
LVE
LVF
—
EEPROM
DEE
DEF
—
NFC
NFCE
NFCF
—
CTM
CTMPE
CTMPF
—
CTMAE
CTMAF
STM
STMPE
STMPF
—
STMAE
STMAF
PTM
PTMPE
PTMPF
—
PTMAE
PTMAF
Interrupt Register Bit Naming Conventions