Datasheet

Table Of Contents
Section 3 Exception Handling
Rev. 2.00 Jul. 04, 2007 Page 54 of 692
REJ09B0309-0200
3.5.2 Notes on Rewriting Port Mode Registers
When a port mode register is rewritten to switch the functions of external interrupt pins and when
the value of the ECPWME bit in AEGSR is rewritten to switch between selection and non-
selection of IRQAEC, the following points should be observed.
When a pin function is switched by rewriting a port mode register that controls an external
interrupt pin (IRQ4, IRQ3, IRQ1, IRQ0, or WKP7 to WKP0), the interrupt request flag is set to 1
at the time the pin function is switched, even if no valid interrupt is input at the pin. Be sure to
clear the interrupt request flag to 0 after switching the pin function. When the value of the
ECPWME bit in AEGSR that sets selection or non-selection of IRQAEC is rewritten, the interrupt
request flag may be set to 1, even if a valid edge has not arrived on the selected IRQAEC or
IECPWM (PWM output for the AEC). Therefore, be sure to clear the interrupt request flag to 0
after switching the pin function.
Table 3.3 shows the conditions under which interrupt request flags are set to 1.