From 00260de8bb38bccf9896e113cd19abb54866d111 Mon Sep 17 00:00:00 2001 From: schneider <schneider@blinkenlichts.net> Date: Sun, 28 Nov 2021 22:36:24 +0100 Subject: [PATCH] mp: Correctly mask interrupts --- pycardium/mphalport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pycardium/mphalport.c b/pycardium/mphalport.c index a45a8776..f8370ff1 100644 --- a/pycardium/mphalport.c +++ b/pycardium/mphalport.c @@ -169,7 +169,7 @@ static int64_t systick_get_us() * its value can jump to 0 before the interrupt is triggered. * Simply wait until it is not 0 and then read the count. */ do { - __set_PRIMASK(0); + __set_PRIMASK(1); val = SysTick->VAL; count = systick_count; __set_PRIMASK(irqsaved); -- GitLab