diff --git a/Ports/ARM-Cortex-M/ARMv7-M/ARM/os_cpu_a.asm b/Ports/ARM-Cortex-M/ARMv7-M/ARM/os_cpu_a.asm index 352fb8e..9c1d849 100644 --- a/Ports/ARM-Cortex-M/ARMv7-M/ARM/os_cpu_a.asm +++ b/Ports/ARM-Cortex-M/ARMv7-M/ARM/os_cpu_a.asm @@ -361,7 +361,11 @@ OS_CPU_PendSVHandler MSR PSP, R0 ; Load PSP with new process SP MOV32 R2, #0 ; Restore BASEPRI priority level to 0 + CPSID I MSR BASEPRI, R2 + DSB + ISB + CPSIE I BX LR ; Exception return will restore remaining context ALIGN ; Removes warning[A1581W]: added of padding at
diff --git a/Ports/ARM-Cortex-M/ARMv7-M/CCS/os_cpu_a.asm b/Ports/ARM-Cortex-M/ARMv7-M/CCS/os_cpu_a.asm index 966c67f..81e244d 100644 --- a/Ports/ARM-Cortex-M/ARMv7-M/CCS/os_cpu_a.asm +++ b/Ports/ARM-Cortex-M/ARMv7-M/CCS/os_cpu_a.asm @@ -382,7 +382,11 @@ OS_CPU_PendSVHandler: MSR PSP, R0 ; Load PSP with new process SP MOV R2, #0 ; Restore BASEPRI priority level to 0 + CPSID I MSR BASEPRI, R2 + DSB + ISB + CPSIE I BX LR ; Exception return will restore remaining context .endasmfunc diff --git a/Ports/ARM-Cortex-M/ARMv7-M/GNU/os_cpu_a.S b/Ports/ARM-Cortex-M/ARMv7-M/GNU/os_cpu_a.S index bcc1a26..c7082f3 100644 --- a/Ports/ARM-Cortex-M/ARMv7-M/GNU/os_cpu_a.S +++ b/Ports/ARM-Cortex-M/ARMv7-M/GNU/os_cpu_a.S @@ -379,7 +379,11 @@ OS_CPU_PendSVHandler: MSR PSP, R0 @ Load PSP with new process SP MOV R2, #0 @ Restore BASEPRI priority level to 0 + CPSID I MSR BASEPRI, R2 + DSB + ISB + CPSIE I BX LR @ Exception return will restore remaining context .end diff --git a/Ports/ARM-Cortex-M/ARMv7-M/IAR/os_cpu_a.asm b/Ports/ARM-Cortex-M/ARMv7-M/IAR/os_cpu_a.asm index 36df763..13bf1a8 100644 --- a/Ports/ARM-Cortex-M/ARMv7-M/IAR/os_cpu_a.asm +++ b/Ports/ARM-Cortex-M/ARMv7-M/IAR/os_cpu_a.asm @@ -355,7 +355,11 @@ OS_CPU_PendSVHandler MSR PSP, R0 ; Load PSP with new process SP MOV32 R2, #0 ; Restore BASEPRI priority level to 0 + CPSID I MSR BASEPRI, R2 + DSB + ISB + CPSIE I BX LR ; Exception return will restore remaining context END