aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/inline.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/asm/inline.rs b/asm/inline.rs
index ef203cd..a7898c5 100644
--- a/asm/inline.rs
+++ b/asm/inline.rs
@@ -55,7 +55,7 @@ pub unsafe fn __delay(cyc: u32) {
// The loop will normally take 3 to 4 CPU cycles per iteration, but superscalar cores
// (eg. Cortex-M7) can potentially do it in 2, so we use that as the lower bound, since delaying
// for more cycles is okay.
- let real_cyc = cyc / 2;
+ let real_cyc = 1 + cyc / 2;
asm!(
// Use local labels to avoid R_ARM_THM_JUMP8 relocations which fail on thumbv6m.
"1:",