mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/rtos2-utils.git
synced 2025-08-03 02:11:53 +00:00
21 lines
406 B
C
21 lines
406 B
C
#include <sta/config.hpp>
|
|
#ifdef STA_RTOS_RUNTIME_STATS_TIM
|
|
|
|
#include <tim.h>
|
|
|
|
|
|
void configureTimerForRunTimeStats()
|
|
{
|
|
// Start timer base
|
|
HAL_TIM_Base_Start(&STA_RTOS_RUNTIME_STATS_TIM);
|
|
// Reset timer
|
|
__HAL_TIM_SET_COUNTER(&STA_RTOS_RUNTIME_STATS_TIM, 0);
|
|
}
|
|
|
|
unsigned long getRunTimeCounterValue()
|
|
{
|
|
return __HAL_TIM_GET_COUNTER(&STA_RTOS_RUNTIME_STATS_TIM);
|
|
}
|
|
|
|
#endif // STA_RTOS_RUNTIME_STATS_TIM
|