From 2aed667897b433c3866c56774924c08536b32b33 Mon Sep 17 00:00:00 2001 From: Todd Fleming Date: Mon, 9 Jan 2017 13:06:42 -0500 Subject: [PATCH] Reduce jitter --- smoother/isr_init.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/smoother/isr_init.cpp b/smoother/isr_init.cpp index fabf36d..c6d81c7 100644 --- a/smoother/isr_init.cpp +++ b/smoother/isr_init.cpp @@ -22,9 +22,11 @@ void isr_init() { - // Set all interrupts to lowest priority + // Set all interrupts and system handlers to lowest priority for (auto &ip : NVIC->IP) - ip = 31; + ip = 31 << 3; + for (auto &shp : SCB->SHP) + shp = 31 << 3; // Stepper ISR needs highest priority NVIC->IP[TIMER1_IRQn] = 0;