diff --git a/Source/portable/GCC/ARM_CM3/port.c b/Source/portable/GCC/ARM_CM3/port.c index 2ae103319..8aa6fb227 100644 --- a/Source/portable/GCC/ARM_CM3/port.c +++ b/Source/portable/GCC/ARM_CM3/port.c @@ -262,12 +262,12 @@ void xPortPendSVHandler( void ) void xPortSysTickHandler( void ) { - vTaskIncrementTick(); - /* If using preemption, also force a context switch. */ #if configUSE_PREEMPTION == 1 *(portNVIC_INT_CTRL) |= portNVIC_PENDSVSET; #endif + + vTaskIncrementTick(); } /*-----------------------------------------------------------*/ diff --git a/Source/portable/IAR/ARM_CM3/port.c b/Source/portable/IAR/ARM_CM3/port.c index be91fdfb3..2f91cb25f 100644 --- a/Source/portable/IAR/ARM_CM3/port.c +++ b/Source/portable/IAR/ARM_CM3/port.c @@ -184,12 +184,12 @@ void vPortExitCritical( void ) void xPortSysTickHandler( void ) { - vTaskIncrementTick(); - /* If using preemption, also force a context switch. */ #if configUSE_PREEMPTION == 1 *(portNVIC_INT_CTRL) |= portNVIC_PENDSVSET; #endif + + vTaskIncrementTick(); } /*-----------------------------------------------------------*/ diff --git a/Source/portable/RVDS/ARM_CM3/port.c b/Source/portable/RVDS/ARM_CM3/port.c index 091addde9..a8efbe82e 100644 --- a/Source/portable/RVDS/ARM_CM3/port.c +++ b/Source/portable/RVDS/ARM_CM3/port.c @@ -243,12 +243,12 @@ sv_disable_interrupts void xPortSysTickHandler( void ) { - vTaskIncrementTick(); - /* If using preemption, also force a context switch. */ #if configUSE_PREEMPTION == 1 *(portNVIC_INT_CTRL) |= portNVIC_PENDSVSET; #endif + + vTaskIncrementTick(); } /*-----------------------------------------------------------*/