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
16
namespace
cycles64
17
{
18
extern
void
begin
();
19
extern
uint64_t
get
();
20
}
cycles64
Definition
cycle64.cpp:6
cycles64::get
uint64_t get()
Definition
cycle64.cpp:23
cycles64::begin
void begin()
Definition
cycle64.cpp:39
c1
include
cycles64.h
Generated by
1.9.8