]> git.sur5r.net Git - freertos/blobdiff - Demo/Cortex_STM32L152_IAR/FreeRTOSConfig.h
Replace the function that returns the current run time counter value with a macro...
[freertos] / Demo / Cortex_STM32L152_IAR / FreeRTOSConfig.h
index a7d59f1ea4b3572d4f16dd7b9213beb709410d29..74acd46741f10e4340d6a9aa90d3247a8b5e1ecb 100644 (file)
@@ -125,8 +125,12 @@ is included from an asm file. */
 #endif /* __ICCARM__ */\r
 \r
 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats()\r
-#define portGET_RUN_TIME_COUNTER_VALUE() ( ( ulTIM6_OverflowCount << 16UL ) | ( unsigned long ) TIM6->CNT )\r
-\r
+#define portALT_GET_RUN_TIME_COUNTER_VALUE( ulCountValue )                                                                     \\r
+       {                                                                                                                                                                               \\r
+               TIM_Cmd( TIM6, DISABLE );                                                                                                                       \\r
+               ulCountValue = ( ( ulTIM6_OverflowCount << 16UL ) | ( unsigned long ) TIM6->CNT );      \\r
+               TIM_Cmd( TIM6, ENABLE );                                                                                                                        \\r
+       }\r
 \r
 #endif /* FREERTOS_CONFIG_H */\r
 \r