From: richardbarry Date: Thu, 6 Jan 2011 10:50:31 +0000 (+0000) Subject: Replace the function that returns the current run time counter value with a macro... X-Git-Tag: V6.1.1~25 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e17011e987775f23d4e90ac5c59f809a557eddc1;p=freertos Replace the function that returns the current run time counter value with a macro for easier inlining. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1232 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Demo/Cortex_STM32L152_IAR/FreeRTOSConfig.h b/Demo/Cortex_STM32L152_IAR/FreeRTOSConfig.h index a7d59f1ea..74acd4674 100644 --- a/Demo/Cortex_STM32L152_IAR/FreeRTOSConfig.h +++ b/Demo/Cortex_STM32L152_IAR/FreeRTOSConfig.h @@ -125,8 +125,12 @@ is included from an asm file. */ #endif /* __ICCARM__ */ #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats() -#define portGET_RUN_TIME_COUNTER_VALUE() ( ( ulTIM6_OverflowCount << 16UL ) | ( unsigned long ) TIM6->CNT ) - +#define portALT_GET_RUN_TIME_COUNTER_VALUE( ulCountValue ) \ + { \ + TIM_Cmd( TIM6, DISABLE ); \ + ulCountValue = ( ( ulTIM6_OverflowCount << 16UL ) | ( unsigned long ) TIM6->CNT ); \ + TIM_Cmd( TIM6, ENABLE ); \ + } #endif /* FREERTOS_CONFIG_H */ diff --git a/Demo/Cortex_STM32L152_IAR/RTOSDemo.ewd b/Demo/Cortex_STM32L152_IAR/RTOSDemo.ewd index cf5aac8e7..91555229d 100644 --- a/Demo/Cortex_STM32L152_IAR/RTOSDemo.ewd +++ b/Demo/Cortex_STM32L152_IAR/RTOSDemo.ewd @@ -845,14 +845,14 @@ ARM - 0 + 1 C-SPY 2 22 1 - 0 + 1