EXTERNAL INTERRUPTSChapter 4 External Interrupt Examples© Fujitsu Microelectronics Europe GmbH - 11 - MCU-AN -300203-E-V174.2.1 Sequence DiagramFigure 4-2: Sequence Diagram – Disturbed Input SignalSwitch to EI0 ISRbecause of Key Bounceduring Debounce TimeSwitch to EI0 ISR@ Key PressIRQHandler_EI0()Switch backfrom ISRSwitch to RLT0 ISR@ Debounce TimerExpirationEI0 interrupts re-enabledRLT0 interrupt flag cleared,RLT0 interrupts disabledClear RLT0 interrupt flag anddisable RLT0 interruptIRQHandler_RLT0() RLT0 InterruptDebouncedelayNo action sinceEI0 interruptsdisabled, butinterrupt flagremains setConsecutive risingedges at INT0 –debounce of keyReturnReturnRLT0 (key debounce timer)startedTrigger RLT0 andenable RLT0 interruptClear El0 interrupt flagand disable EI0 interrupt EI0 interrupt flag cleared,EI0 interrupts disabledIRQHandler_EI0()First risingedge at INT0 –Key pressWaiting forExternalinterruptExternal Interrupt channel0 is initialized for risingedge interruptsRLT0 is initialized toissue interrupt after0.26 secondsInitialize ExternalInterrupt channel 0Initialize RLT0InitRLT0()Drivermain () /Application HardwareInitExtInt0()Switch backfrom ISREnable EI0 interruptValid key press if key isstill pressed (i.e. ifEPSR07_PS0 =1) afterdebounce delayClear El0 interrupt flagSwitch backfrom ISREI0 interrupt flag clearedWaiting forExternalinterrupt