From 5b063d3030d718e1628eed2d47811b0330467159 Mon Sep 17 00:00:00 2001 From: wuyangyong Date: Sun, 17 Jul 2011 04:16:21 +0000 Subject: [PATCH] fix interrupt repeat bug. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1633 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- libcpu/arm/s3c24x0/trap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libcpu/arm/s3c24x0/trap.c b/libcpu/arm/s3c24x0/trap.c index c90222e47a..09f1c88bca 100644 --- a/libcpu/arm/s3c24x0/trap.c +++ b/libcpu/arm/s3c24x0/trap.c @@ -151,14 +151,15 @@ void rt_hw_trap_irq() if (intstat == INTGLOBAL) return; - /* clear pending register */ - ClearPending(1 << intstat); - /* get interrupt service routine */ isr_func = isr_table[intstat]; /* turn to interrupt service routine */ isr_func(intstat); + + /* clear pending register */ + /* note: must be the last, if not, may repeat*/ + ClearPending(1 << intstat); } void rt_hw_trap_fiq()