aboutsummaryrefslogtreecommitdiff
path: root/examples/extern_binds.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/extern_binds.rs')
-rw-r--r--examples/extern_binds.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/extern_binds.rs b/examples/extern_binds.rs
index e445f4ec..c2186cb7 100644
--- a/examples/extern_binds.rs
+++ b/examples/extern_binds.rs
@@ -40,10 +40,11 @@ mod app {
rtic::pend(Interrupt::UART0);
- debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
-
loop {
cortex_m::asm::nop();
+ // Exit moved after nop to ensure that rtic::pend gets
+ // to run before exiting
+ debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator
}
}