summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwuyangyong <[email protected]>2011-07-17 04:16:21 +0000
committerwuyangyong <[email protected]>2011-07-17 04:16:21 +0000
commit5b063d3030d718e1628eed2d47811b0330467159 (patch)
tree76ab3b8ec6bfb28acc4fa76b94db8fd61a929e18
parentc9a5379a0c60814f071cf2a1cda59533d18f8668 (diff)
fix interrupt repeat bug.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1633 bbd45198-f89e-11dd-88c7-29a3b14d5316
-rw-r--r--libcpu/arm/s3c24x0/trap.c7
1 files 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()