From e17011e987775f23d4e90ac5c59f809a557eddc1 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Thu, 6 Jan 2011 10:50:31 +0000 Subject: [PATCH] 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 --- Demo/Cortex_STM32L152_IAR/FreeRTOSConfig.h | 8 +- Demo/Cortex_STM32L152_IAR/RTOSDemo.ewd | 42 +++++------ Demo/Cortex_STM32L152_IAR/RTOSDemo.ewp | 74 +++++++++++-------- Demo/Cortex_STM32L152_IAR/main.c | 10 ++- .../settings/RTOSDemo.dbgdt | 26 +++---- .../settings/RTOSDemo.dni | 26 +++---- .../settings/RTOSDemo.wsdt | 4 +- 7 files changed, 104 insertions(+), 86 deletions(-) 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