Chapter 2 Software
2-3
INT0R and INT1R registers enable MKY36 to set enable/disable of interrupt and to check the status of interrupt
occurrence.
The internal driver has registers called interrupt factor register which retains the information in lower 8 bit of INT0R
and INT1R at interrupt occurrence and interrupt count register which retains the interrupt occurrence count of each
INT0R and INT1R. The internal driver process the following procedure using these registers at interrupt occurrence.
(For instance, below describes when interrupt occurred at INT0.)
2.4.2 Interrupt handling
An API function is provided to obtain and clear the information from interrupt factor register and interrupt count
register.
① Set the interrupt factor information in interrupt factor register.
(Previous interrupt factor remains until be cleared by interrupt factor register from user application.)
② Increment the value of interrupt count register.
③ Clear interrupt factor by writing "1" to the bit which is set "1" in 0-7 bit of INT0R.
(1) A function which returns the value of interrupt count register (HlsbGetInt0Counter, HlsbGetInt1Counter)
The internal driver retains interrupt count of each INT0, INT1 registers from MKY36#1/#2. This function
returns the count value.
(2) Clear function of interrupt count register (HlsClearInt0Counter, HlsbClearInt1Counter)
Clears interrupt count register
(3) A function which returns the value of interrupt factor register (HlsbGetInt0StatusInfo, lsbGetInt1StatusInfo)
The internal driver retains interrupt factor of each INT0, INT1 registers from MKY36#1/#2.
This function returns the information from interrupt factor register.
(4) Clear function of interrupt factor register (HlsbClearInt0StatusInfo, HlsbClearInt1StatusInfo)
Clears the interrupt factor register
On user application, check the interrupt count from MKY36#1/#2 and interrupt factor using these
functions.