diff options
Diffstat (limited to 'core/cortex-m/task.c')
-rw-r--r-- | core/cortex-m/task.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/cortex-m/task.c b/core/cortex-m/task.c index 67785d4366..bab5310245 100644 --- a/core/cortex-m/task.c +++ b/core/cortex-m/task.c @@ -90,12 +90,11 @@ void __idle(void) asm ( "cpsid i\n" /* Disable interrupt */ "push {r0-r5}\n" /* Save needed registers */ - "ldr r0, =0x100A8000\n" /* Set r0 to a valid RAM addr */ "wfi\n" /* Wait for int to enter idle */ - "ldm r0, {r0-r5}\n" /* Add a delay after WFI */ + "ldm %0, {r0-r5}\n" /* Add a delay after WFI */ "pop {r0-r5}\n" /* Restore regs before enabling ints */ "isb\n" /* Flush the cpu pipeline */ - "cpsie i\n" /* Enable interrupts */ + "cpsie i\n" :: "r" (0x100A8000) /* Enable interrupts */ ); #else /* |