summaryrefslogtreecommitdiff
path: root/src/FreeRTOS
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-06-19 22:11:21 +0200
committerJF <jf@codingfield.com>2020-06-19 22:11:21 +0200
commitb8f9d706673769b43c390eef1b34bb589da6643b (patch)
tree2b0bfd6d0f387b4d1e9cda5f53e5ab2bd160ce70 /src/FreeRTOS
parent238cda0b90c3ac4ae8acc7c298391b8d449d83a2 (diff)
Use PRIMASK instead of BASEPRI for critical sections in FreeRTOS. This is needed by NimBLE to be able to mask radio interrupt (which has priority 0).
Diffstat (limited to 'src/FreeRTOS')
-rw-r--r--src/FreeRTOS/portmacro_cmsis.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FreeRTOS/portmacro_cmsis.h b/src/FreeRTOS/portmacro_cmsis.h
index 3d2dee5c..0497538f 100644
--- a/src/FreeRTOS/portmacro_cmsis.h
+++ b/src/FreeRTOS/portmacro_cmsis.h
@@ -106,8 +106,8 @@ extern void vPortEnterCritical( void );
extern void vPortExitCritical( void );
#define portSET_INTERRUPT_MASK_FROM_ISR() ulPortRaiseBASEPRI()
#define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vPortSetBASEPRI(x)
-#define portDISABLE_INTERRUPTS() vPortRaiseBASEPRI()
-#define portENABLE_INTERRUPTS() vPortSetBASEPRI(0)
+#define portDISABLE_INTERRUPTS() __asm volatile ( " cpsid i " ::: "memory" )
+#define portENABLE_INTERRUPTS() __asm volatile ( " cpsie i " ::: "memory" )
#define portENTER_CRITICAL() vPortEnterCritical()
#define portEXIT_CRITICAL() vPortExitCritical()