fix:pendsv trigger for cortex-m SOC:some cpu will not enter pendsv when set the flag,and we need dsb and isb to fix this
This commit is contained in:
parent
5d8e3802b6
commit
bc31d46e42
|
@ -111,6 +111,8 @@ HalTaskSchedule
|
||||||
LDR R0, =OS_NVIC_INT_CTRL
|
LDR R0, =OS_NVIC_INT_CTRL
|
||||||
LDR R1, =OS_NVIC_PENDSVSET
|
LDR R1, =OS_NVIC_PENDSVSET
|
||||||
STR R1, [R0]
|
STR R1, [R0]
|
||||||
|
DSB
|
||||||
|
ISB
|
||||||
BX LR
|
BX LR
|
||||||
|
|
||||||
HalPendSV
|
HalPendSV
|
||||||
|
|
|
@ -142,6 +142,8 @@ HalTaskSchedule:
|
||||||
ldr r0, =OS_NVIC_INT_CTRL
|
ldr r0, =OS_NVIC_INT_CTRL
|
||||||
ldr r1, =OS_NVIC_PENDSVSET
|
ldr r1, =OS_NVIC_PENDSVSET
|
||||||
str r1, [r0]
|
str r1, [r0]
|
||||||
|
dsb
|
||||||
|
isb
|
||||||
bx lr
|
bx lr
|
||||||
.fnend
|
.fnend
|
||||||
|
|
||||||
|
|
|
@ -145,6 +145,8 @@ HalTaskSchedule:
|
||||||
ldr r1, =OS_NVIC_PENDSVSET
|
ldr r1, =OS_NVIC_PENDSVSET
|
||||||
str r1, [r0]
|
str r1, [r0]
|
||||||
bx lr
|
bx lr
|
||||||
|
dsb
|
||||||
|
isb
|
||||||
.fnend
|
.fnend
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -124,6 +124,8 @@ HalTaskSchedule
|
||||||
LDR R0, =OS_NVIC_INT_CTRL
|
LDR R0, =OS_NVIC_INT_CTRL
|
||||||
LDR R1, =OS_NVIC_PENDSVSET
|
LDR R1, =OS_NVIC_PENDSVSET
|
||||||
STR R1, [R0]
|
STR R1, [R0]
|
||||||
|
DSB
|
||||||
|
ISB
|
||||||
BX LR
|
BX LR
|
||||||
|
|
||||||
HalPendSV
|
HalPendSV
|
||||||
|
|
|
@ -142,6 +142,8 @@ HalTaskSchedule:
|
||||||
ldr r0, =OS_NVIC_INT_CTRL
|
ldr r0, =OS_NVIC_INT_CTRL
|
||||||
ldr r1, =OS_NVIC_PENDSVSET
|
ldr r1, =OS_NVIC_PENDSVSET
|
||||||
str r1, [r0]
|
str r1, [r0]
|
||||||
|
dsb
|
||||||
|
isb
|
||||||
bx lr
|
bx lr
|
||||||
.fnend
|
.fnend
|
||||||
|
|
||||||
|
|
|
@ -124,6 +124,8 @@ HalTaskSchedule
|
||||||
LDR R0, =OS_NVIC_INT_CTRL
|
LDR R0, =OS_NVIC_INT_CTRL
|
||||||
LDR R1, =OS_NVIC_PENDSVSET
|
LDR R1, =OS_NVIC_PENDSVSET
|
||||||
STR R1, [R0]
|
STR R1, [R0]
|
||||||
|
DSB
|
||||||
|
ISB
|
||||||
BX LR
|
BX LR
|
||||||
|
|
||||||
HalPendSV
|
HalPendSV
|
||||||
|
|
Loading…
Reference in New Issue