From b161a69e98eed93d23737b3910a581d1b828f80e Mon Sep 17 00:00:00 2001
From: Kevin O'Connor <kevin@koconnor.net>
Date: Fri, 16 Nov 2018 17:16:50 -0500
Subject: [PATCH] timer_irq: Increase maximum busy wait time to 2us

Increase the amount of time to "busy wait" in the timer dispatch loop
to 2 micro-seconds.  This, in practice, causes stepper step and unstep
events to occur within a single hardware interrupt.  Doing that helps
stabilize the single active stepper performance benchmarks.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
---
 src/generic/timer_irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/generic/timer_irq.c b/src/generic/timer_irq.c
index 0b4c3c8dc..f7e255e69 100644
--- a/src/generic/timer_irq.c
+++ b/src/generic/timer_irq.c
@@ -33,7 +33,7 @@ static uint32_t timer_repeat_until;
 #define TIMER_IDLE_REPEAT_TICKS timer_from_us(500)
 #define TIMER_REPEAT_TICKS timer_from_us(100)
 
-#define TIMER_MIN_TRY_TICKS timer_from_us(1)
+#define TIMER_MIN_TRY_TICKS timer_from_us(2)
 #define TIMER_DEFER_REPEAT_TICKS timer_from_us(5)
 
 // Invoke timers - called from board irq code.