
iiiPeriPheraLModuLes1(systeM):interruPtControLLer(itC)
iii-2-38
ePson
s1C33L17teChniCaLManuaL
0x300280:keyinput,Portinput0–3interruptCauseFlagregister
(pint_Fk01_FP03)
name
address
registername
Bit
Function
setting
init. r/W
remarks
–
Fk1
Fk0
FP3
FP2
FP1
FP0
D7–6
D5
D4
D3
D2
D1
D0
reserved
Keyinput1
Keyinput0
Portinput3
Portinput2
Portinput1
Portinput0
–
X
–
R/W
0whenbeingread.
00300280
(B)
1 Occurred
0 Notoccurred
keyinput,
portinput0–3
interruptcause
flagregister
(pINT_FK01_FP03)
Each bit in this register is a cause-of-interrupt flag to indicate the interrupt cause occurrence status. The flag that
has been set can be reset by writing. (Default: indeterminate)
1 (R):
Cause of interrupt has occurred
0 (R):
No cause of interrupt has occurred
When written using the reset-only method (default)
1 (W):
Flag is reset
0 (W):
Has no effect
When written using the read/write method
1 (W):
Flag is set
0 (W):
Flag is reset
The cause-of-interrupt flag is set to 1 when a cause of interrupt occurs in each peripheral circuit.
If the following conditions are met at this time, an interrupt is generated to the CPU:
1. The corresponding bit of the interrupt enable register is set to 1.
2. No other interrupt request of higher priority has occurred.
3. The IE bit of the PSR is set to 1 (interrupt enabled).
4. The corresponding interrupt priority register is set to a level higher than the CPU's interrupt level (IL).
When using a cause of interrupt to request IDMA, note that even when the above conditions are met, no interrupt
request to the CPU is generated for the cause of interrupt that has occurred. If interrupts are enabled at the setting
of IDMA, an interrupt is generated under the above conditions after the data transfer by IDMA is completed.
The cause-of-interrupt flag is always set to 1 when a cause of interrupt occurs no matter how the interrupt enable
and interrupt priority registers are set.
In order for the next interrupt to be accepted after interrupt generation, the cause-of-interrupt flag must be reset
and the PSR must be set up again (by setting the IL below the level indicated by the interrupt priority register and
setting the IE bit to 1 or executing the reti instruction).
The cause-of-interrupt flag can only be reset by a write instruction in the software application. If the PSR is again
set up to accept interrupts (or the reti instruction is executed) without resetting the cause-of-interrupt flag, the same
interrupt may occur again. Note also that the value to be written to reset the flag is 1 when using the reset-only
method (RSTONLY (D0/0x30029F) = 1) and 0 when using the read/write method (RSTONLY (D0/0x30029F) = 0).
Be careful not to confuse these two conditions.
The cause-of-interrupt flag becomes indeterminate when initially reset, so be sure to reset the flag in the software
application.
note: EvenwhenamaskableinterruptrequestisacceptedbytheCPUandcontrolbranchesofftothe
interrupt processing routine, the cause-of-interrupt flag is not reset. Consequently, if control is
returnedfromtheinterruptprocessingroutinebytheretiinstructionwithoutresettingthecause-
of-interruptflaginaprogram,thesamecauseofinterruptoccursagain.