Performance Counter class for teensy 4.1 microcontrollers.
More...
#include <perf_counter.hpp>
|
| void | start () __attribute__((always_inline)) |
| | Start Measurement. More...
|
| |
| void | end () __attribute__((always_inline)) |
| | End measurement. More...
|
| |
| float | mean () |
| | Returns the mean number of cycles between start() and stop(). More...
|
| |
| uint32_t | last_duration () |
| | Returns the last recorded duration. More...
|
| |
| void | reset () __attribute__((always_inline)) |
| |
| void | output () __attribute__((always_inline)) |
| |
|
| static void | init () __attribute__((always_inline)) |
| | Set up the debug module for clock cycle counting. More...
|
| |
|
| uint32_t | Stack = 0 |
| | Stack for mean calculation. More...
|
| |
| uint32_t | Count = 0 |
| | Count for mean calculation. More...
|
| |
| uint32_t | Cycles = 0 |
| | Last recorded duration (difference in clock cycles recorded) More...
|
| |
| uint32_t | StartTime = 0 |
| | Stored starting time of the measurement. More...
|
| |
Performance Counter class for teensy 4.1 microcontrollers.
- Note
imxrt.h defines ARM_DWT_CYCCNT as (*(volatile uint32_t *)0xE0001004).
◆ end()
| void PerfCounter::end |
( |
| ) |
|
|
inline |
◆ init()
| static void PerfCounter::init |
( |
| ) |
|
|
inlinestatic |
Set up the debug module for clock cycle counting.
- Warning
- This function sets the registers globally and will affect all instances and also the overall performance.
◆ last_duration()
| uint32_t PerfCounter::last_duration |
( |
| ) |
|
|
inline |
Returns the last recorded duration.
◆ mean()
| float PerfCounter::mean |
( |
| ) |
|
|
inline |
Returns the mean number of cycles between start() and stop().
◆ output()
| void PerfCounter::output |
( |
| ) |
|
|
inline |
◆ reset()
| void PerfCounter::reset |
( |
| ) |
|
|
inline |
◆ start()
| void PerfCounter::start |
( |
| ) |
|
|
inline |
◆ Count
| uint32_t PerfCounter::Count = 0 |
Count for mean calculation.
◆ Cycles
| uint32_t PerfCounter::Cycles = 0 |
Last recorded duration (difference in clock cycles recorded)
◆ Stack
| uint32_t PerfCounter::Stack = 0 |
Stack for mean calculation.
◆ StartTime
| uint32_t PerfCounter::StartTime = 0 |
Stored starting time of the measurement.
The documentation for this class was generated from the following file: