mirror of https://github.com/ARMmbed/mbed-os.git
RTOS: Only set the SVC priority if uVisor is not present
uVisor requires the SVCall to have priority 0, while RTX allows it to be the second lowest priority level in the system (after PendSV). This commit makes sure that the SVCall priority is not changed if uVisor is present. The PendSV priority is not affected.pull/2053/head
parent
ec1ec7c3e2
commit
e22280e684
|
@ -255,7 +255,11 @@ __inline static void rt_svc_init (void) {
|
||||||
if (prigroup >= sh) {
|
if (prigroup >= sh) {
|
||||||
sh = prigroup + 1U;
|
sh = prigroup + 1U;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Only change the SVCall priority if uVisor is not present. */
|
||||||
|
#if !(defined(FEATURE_UVISOR) && defined(TARGET_UVISOR_SUPPORTED))
|
||||||
NVIC_SYS_PRI2 = ((0xFEFFFFFFU << sh) & 0xFF000000U) | (NVIC_SYS_PRI2 & 0x00FFFFFFU);
|
NVIC_SYS_PRI2 = ((0xFEFFFFFFU << sh) & 0xFF000000U) | (NVIC_SYS_PRI2 & 0x00FFFFFFU);
|
||||||
|
#endif /* !(defined(FEATURE_UVISOR) && defined(TARGET_UVISOR_SUPPORTED)) */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue