perf_counter v1.9.8
A dedicated performance counter for Cortex-M Systick. It shares the SysTick with users' original SysTick function(s) without interfering with it.
|
Functions | |
int64_t | get_system_ticks (void) |
get the elapsed cycles since perf_counter is initialised More... | |
int32_t | get_system_ms (void) |
get the elapsed milliseconds since perf_counter is initialised More... | |
void | start_cycle_counter (void) |
try to set a start pointer for the performance counter More... | |
int32_t | stop_cycle_counter (void) |
calculate the elapsed cycle count since the last start point More... | |
void | delay_us (int32_t nUs) |
delay specified time in microsecond More... | |
void | delay_ms (int32_t nMs) |
delay specified time in millisecond More... | |
void | init_cycle_counter (bool bIsSysTickOccupied) |
initialise cycle counter service More... | |
void | user_code_insert_to_systick_handler (void) |
a system timer handler inserted to the SysTick_Handler More... | |
void | update_perf_counter (void) |
update perf_counter as SystemCoreClock has been updated. More... | |
void delay_ms | ( | int32_t | nMs | ) |
delay specified time in millisecond
[in] | nMs | time in millisecond |
Definition at line 318 of file perf_counter.c.
References get_system_ticks().
void delay_us | ( | int32_t | nUs | ) |
delay specified time in microsecond
[in] | nUs | time in microsecond |
Definition at line 300 of file perf_counter.c.
References get_system_ticks().
int32_t get_system_ms | ( | void | ) |
get the elapsed milliseconds since perf_counter is initialised
Definition at line 384 of file perf_counter.c.
int64_t get_system_ticks | ( | void | ) |
get the elapsed cycles since perf_counter is initialised
Definition at line 373 of file perf_counter.c.
Referenced by delay_ms(), delay_us(), init_task_cycle_counter(), start_cycle_counter(), stop_cycle_counter(), and update_perf_counter().
void init_cycle_counter | ( | bool | bIsSysTickOccupied | ) |
initialise cycle counter service
[in] | bIsSysTickOccupied | A boolean value which indicates whether SysTick is already used by user application. |
Definition at line 226 of file perf_counter.c.
References update_perf_counter().
void start_cycle_counter | ( | void | ) |
try to set a start pointer for the performance counter
Definition at line 402 of file perf_counter.h.
References get_system_ticks().
int32_t stop_cycle_counter | ( | void | ) |
calculate the elapsed cycle count since the last start point
Definition at line 413 of file perf_counter.h.
References get_system_ticks().
void update_perf_counter | ( | void | ) |
update perf_counter as SystemCoreClock has been updated.
Definition at line 214 of file perf_counter.c.
References get_system_ticks().
Referenced by init_cycle_counter().
void user_code_insert_to_systick_handler | ( | void | ) |
a system timer handler inserted to the SysTick_Handler
Definition at line 196 of file perf_counter.c.