Formula Student Electronics & Software
The code for the embedded software
Loading...
Searching...
No Matches
cycles64.h
Go to the documentation of this file.
1#pragma once
2/************************************************************************************
3 * Implements a 64bit extension of the cycle counter (ARM_DWT_CYCCNT). The extension
4 * only works if get() is called at least once per overflow period (~7s @600MHz).
5 * Thus, the code sets up the periodic interrupt of the SNVS module (Real Time Clock)
6 * to call get once per second automaticall.
7 *
8 * begin(): sets up the periodic RTC interrupt to update the counter
9 * get(): returns the 64bit cycle counter
10 *
11 * luni64 10-2020, Licence: MIT
12 ************************************************************************************/
13
14#include <cstdint>
15
16namespace cycles64
17{
18 extern void begin();
19 extern uint64_t get();
20}
uint64_t get()
Definition cycle64.cpp:23
void begin()
Definition cycle64.cpp:39