diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-10-31 11:47:57 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-10-31 11:47:57 -0400 |
commit | 233a90ce8bb5e920be0fea327409c189b4391630 (patch) | |
tree | 151fb3bfa2348c4204aea55707578b80cf5a45b5 /src/sam3x8e/main.c | |
parent | 41ef0bd98cb31c7f73b784f580d3f5ae926b4824 (diff) | |
download | kutter-233a90ce8bb5e920be0fea327409c189b4391630.tar.gz kutter-233a90ce8bb5e920be0fea327409c189b4391630.tar.xz kutter-233a90ce8bb5e920be0fea327409c189b4391630.zip |
sam3x8e: Clear all bits of PSR register when clearing IRQ status
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/sam3x8e/main.c')
-rw-r--r-- | src/sam3x8e/main.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/sam3x8e/main.c b/src/sam3x8e/main.c index ca002c91..3cf1b97c 100644 --- a/src/sam3x8e/main.c +++ b/src/sam3x8e/main.c @@ -43,8 +43,7 @@ clear_active_irq(void) // Shutdown did not occur in an irq - nothing to do. return; // Clear active irq status - psr &= ~0x1ff; - psr |= 1<<24; // T-bit + psr = 1<<24; // T-bit uint32_t temp; asm volatile( " push { %1 }\n" @@ -53,7 +52,7 @@ clear_active_irq(void) " push { r0, r1, r2, r3, r12, lr }\n" " bx %2\n" "1:\n" - : "=&r"(temp) : "r"(psr), "r"(0xfffffff9)); + : "=&r"(temp) : "r"(psr), "r"(0xfffffff9) : "cc"); } DECL_SHUTDOWN(clear_active_irq); |