Skip to content

Commit

Permalink
Merge pull request #2053 from AlessandroA/guard_svc_priority_set
Browse files Browse the repository at this point in the history
RTOS: Only set the SVC priority if uVisor is not present
  • Loading branch information
sg- authored Jun 29, 2016
2 parents 76be7c1 + e22280e commit dff2c31
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rtos/rtx/TARGET_CORTEX_M/rt_HAL_CM.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,11 @@ __inline static void rt_svc_init (void) {
if (prigroup >= sh) {
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);
#endif /* !(defined(FEATURE_UVISOR) && defined(TARGET_UVISOR_SUPPORTED)) */
#endif
}

Expand Down

0 comments on commit dff2c31

Please sign in to comment.