Skip to content

Commit

Permalink
RTX5: Moved SVC/PendSV handler priority setup from osKernelInitialize…
Browse files Browse the repository at this point in the history
… to osKernelStart

User Priority Grouping can be updated after osKernelInitialize but before osKernelStart.
  • Loading branch information
RobertRostohar committed Oct 30, 2017
1 parent 30e0577 commit 6d4b699
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CMSIS/DoxyGen/RTOS2/src/cmsis_os2.txt
Expand Up @@ -156,6 +156,7 @@ File/Folder | Content
<tr>
<td>V5.2.3</td>
<td>
- Moved SVC/PendSV handler priority setup from osKernelInitialize to osKernelStart (User Priority Grouping can be updated after osKernelInitialize but before osKernelStart).
- Corrected SysTick and PendSV handlers for ARMv8-M Baseline.
- Corrected memory allocation for stack and data when "Object specific Memory allocation" configuration is used.
</td>
Expand Down
4 changes: 2 additions & 2 deletions CMSIS/RTOS2/RTX/Source/rtx_core_ca.h
Expand Up @@ -338,8 +338,8 @@ __STATIC_INLINE t __svc##f (t1 a1, t2 a2, t3 a3, t4 a4) { \

extern uint8_t IRQ_PendSV;

/// Initialize SVC and PendSV System Service Calls (not needed on Cortex-A)
__STATIC_INLINE void SVC_Initialize (void) {
/// Setup SVC and PendSV System Service Calls (not needed on Cortex-A)
__STATIC_INLINE void SVC_Setup (void) {
}

/// Get Pending SV (Service Call) Flag
Expand Down
4 changes: 2 additions & 2 deletions CMSIS/RTOS2/RTX/Source/rtx_core_cm.h
Expand Up @@ -349,8 +349,8 @@ __STATIC_INLINE t __svc##f (t1 a1, t2 a2, t3 a3, t4 a4) { \

// ==== Core Peripherals functions ====

/// Initialize SVC and PendSV System Service Calls
__STATIC_INLINE void SVC_Initialize (void) {
/// Setup SVC and PendSV System Service Calls
__STATIC_INLINE void SVC_Setup (void) {
#if ((__ARM_ARCH_8M_MAIN__ == 1U) || (defined(__CORTEX_M) && (__CORTEX_M == 7U)))
uint32_t p, n;

Expand Down
6 changes: 3 additions & 3 deletions CMSIS/RTOS2/RTX/Source/rtx_kernel.c
Expand Up @@ -195,9 +195,6 @@ osStatus_t svcRtxKernelInitialize (void) {
}
#endif

// Initialize SVC and PendSV System Service Calls
SVC_Initialize();

osRtxInfo.kernel.state = osRtxKernelReady;

EvrRtxKernelInitializeCompleted();
Expand Down Expand Up @@ -263,6 +260,9 @@ osStatus_t svcRtxKernelStart (void) {
}
}

// Setup SVC and PendSV System Service Calls
SVC_Setup();

// Setup RTOS Tick
if (OS_Tick_Setup(osRtxConfig.tick_freq, OS_TICK_HANDLER) != 0U) {
return osError;
Expand Down

0 comments on commit 6d4b699

Please sign in to comment.