
Rev. 1.10
124
March 02, 2020
Rev. 1.10
125
March 02, 2020
BS83A02L/BS83B04L
Ultra-Low Power Touch Key Flash MCU
BS83A02L/BS83B04L
Ultra-Low Power Touch Key Flash MCU
Multi-function Interrupt
Within the BS83B04L there are two Multi-function interrupts. Unlike the other independent
interrupts, these interrupts have no independent source, but rather are formed from other existing
interrupt sources, namely the touch key TKRCOV interrupt, touch key threshold TKTH interrupt
and TM interrupts.
A Multi-function interrupt request will take place when any of the Multi-function interrupt request
flags, MFnF are set. The Multi-function interrupt flags will be set when any of their included
functions generate an interrupt request flag. To allow the program to branch to its respective interrupt
vector address, when the Multi-function interrupt is enabled and the stack is not full, and either one
of the interrupts contained within each of Multi-function interrupt occurs, a subroutine call to one of
the Multi-function interrupt vectors will take place. When the interrupt is serviced, the related Multi-
Function request flag will be automatically reset and the EMI bit will be automatically cleared to
disable other interrupts.
However, it must be noted that, although the Multi-function Interrupt flags will be automatically
reset when the interrupt is serviced, the request flags from the original source of the Multi-function
interrupts will not be automatically reset and must be manually reset by the application program.
Touch Key TKRCOV Interrupt
For the BS83A02L, the Touch Key TKRCOV Interrupt is an individual interrupt source with its
own interrupt vector. A Touch Key TKRCOV Interrupt request will take place when the Touch Key
TKRCOV Interrupt request flag, TKRCOVF, is set, which occurs when the touch key time slot
counter overflow flag is set high. To allow the program to branch to its respective interrupt vector
address, the global interrupt enable bit, EMI, Touch Key TKRCOV Interrupt enable bit, TKRCOVE,
must first be set. When the interrupt is enabled, the stack is not full and the touch key time slot
counter overflows or all the scan operations are completed, a subroutine call to its interrupt vector,
will take place. When the interrupt is serviced, the Touch Key TKRCOV Interrupt request flag,
TKRCOVF, will be automatically cleared. The EMI bit will also be automatically cleared to disable
other interrupts.
For the BS83B04L, the Touch Key TKRCOV Interrupt is contained within the Multi-function
Interrupt. A Touch Key TKRCOV Interrupt request will take place when the Touch Key TKRCOV
Interrupt request flag, TKRCOVF, is set, which occurs when the touch key time slot counter
overflows or all the scan operations are completed. To allow the program to branch to its respective
interrupt vector address, the global interrupt enable bit, EMI, Touch Key TKRCOV Interrupt enable
bit, TKRCOVE, and associated Multi-function interrupt enable bit, must first be set. When the
interrupt is enabled, the stack is not full and the touch key time slot counter overflows, a subroutine
calls to the Multi-function Interrupt vector, will take place. When the Touch Key TKRCOV Interrupt
is serviced, the EMI bit will be automatically cleared to disable other interrupts, however only the
Multi-function interrupt request flag will be also automatically cleared. As the TKRCOVF flag will
not be automatically cleared, it has to be cleared by the application program.
Touch Key Threshold TKTH Interrupt
For the BS83A02L, the Touch Key Threshold TKTH Interrupt is an individual interrupt source with
its own interrupt vector. A Touch Key Threshold TKTH Interrupt request will take place when the
Touch Key Threshold TKTH Interrupt request flag, TKTHF, is set, which occurs when the Touch
Key Module 0 16-bit C/F counter is less than the lower threshold if M0KnTHS=0, or larger than the
upper threshold if M0KnTHS=1. To allow the program to branch to its respective interrupt vector
address, the global interrupt enable bit, EMI, Touch Key Threshold TKTH Interrupt enable bit,
TKTHE, must first be set. When the interrupt is enabled, the stack is not full and any of the above