FreeRTOS: Common I/O
AWS IoT Common I/O library
Return to main page ↑
PerfCounter HAL APIs

The perf counter is generally used to measure the cycles (usually processor clock cycles ) taken between 2 places in code. perfcounters can be implemented using cycle counters if the processor supports, or any generic timer that is granular enough to measure the time between 2 points in code. More...

Functions

void iot_perfcounter_open (void)
 iot_perfcounter_open is used to Initialize the performance counter.
 
uint64_t iot_perfcounter_get_value (void)
 iot_perfcounter_get_value is used to get the current performance counter value. More...
 
uint32_t iot_perfcounter_get_frequency (void)
 iot_perfcounter_get_frequency is used to get the current frequency performance counters are running at. This can be used to determine the time delta between two perfcounter values returned by valling iot_perfcounter_get_value() More...
 
void iot_perfcounter_close (void)
 iot_perfcounter_close is used to de-initialize the perfcounter. It may reset the counter value in perfcounter.
 

Detailed Description

The perf counter is generally used to measure the cycles (usually processor clock cycles ) taken between 2 places in code. perfcounters can be implemented using cycle counters if the processor supports, or any generic timer that is granular enough to measure the time between 2 points in code.

Function Documentation

◆ iot_perfcounter_get_value()

uint64_t iot_perfcounter_get_value ( void  )

iot_perfcounter_get_value is used to get the current performance counter value.

Returns
returns performance counter value as uint64 value.

◆ iot_perfcounter_get_frequency()

uint32_t iot_perfcounter_get_frequency ( void  )

iot_perfcounter_get_frequency is used to get the current frequency performance counters are running at. This can be used to determine the time delta between two perfcounter values returned by valling iot_perfcounter_get_value()

Returns
returns the frequency of the performance counter as a uint32 value. This can be used to deterime the period between perfcounter increments.