diff --git a/Source/portable/GCC/ARM_CM3/port.c b/Source/portable/GCC/ARM_CM3/port.c index 2ae1033199..8aa6fb2272 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 be91fdfb30..2f91cb25f9 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 091addde9b..a8efbe82ef 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(); } /*-----------------------------------------------------------*/