diff --git a/firmware/common/locking.h b/firmware/common/locking.h index 392b689de..5620f2f95 100644 --- a/firmware/common/locking.h +++ b/firmware/common/locking.h @@ -40,14 +40,14 @@ #else static inline uint32_t load_exclusive(volatile uint32_t* addr) { - __disable_irq(); + __asm volatile("cpsid i" ::: "memory"); return *addr; } static inline uint32_t store_exclusive(uint32_t val, volatile uint32_t* addr) { *addr = val; - __enable_irq(); + __asm volatile("cpsie i" ::: "memory"); return 0; } #endif