29#ifndef __SYSTIMING_H__
30#define __SYSTIMING_H__
36#define CPU_CLK 120000000
42#ifndef _CLEARCORE_SAMPLE_RATE_HZ
43#define _CLEARCORE_SAMPLE_RATE_HZ (5000)
49#define MS_TO_SAMPLES (_CLEARCORE_SAMPLE_RATE_HZ / 1000)
53#define CYCLES_PER_INTERRUPT (CPU_CLK / _CLEARCORE_SAMPLE_RATE_HZ)
57#define SAMPLE_PERIOD_MICROSECONDS (1000000UL / _CLEARCORE_SAMPLE_RATE_HZ)
61#define CYCLES_PER_MICROSECOND (CPU_CLK / 1000000)
65#define CYCLES_PER_MILLISECOND (CPU_CLK / 1000)
69#define CYCLES_PER_SECOND (CPU_CLK)
91#ifndef HIDE_FROM_DOXYGEN
102 void GetIsrLoading(uint32_t &minSlot, uint32_t &maxSlot);
184#ifndef HIDE_FROM_DOXYGEN
198 bool SysTickPeriodMicroSec(uint32_t microseconds = 1000);
202 uint32_t m_isrStartCycle;
203 uint32_t m_isrMinCycles;
204 uint32_t m_isrMaxCycles;
205 uint32_t m_isrLastCycles;
206 uint32_t m_msTickCnt;
207 uint8_t m_fractMsTick;
208 uint32_t m_lastIsrStartCnt;
210 uint32_t m_microAdjHigh;
211 uint32_t m_microAdjLow;
212 uint32_t m_microAdjHighRemainder;
213 uint32_t m_microAdjLowRemainder;
void Delay_ms(uint32_t ms)
Blocks operations for ms milliseconds.
Definition SysTiming.h:287
#define _CLEARCORE_SAMPLE_RATE_HZ
Definition SysTiming.h:43
#define CYCLES_PER_MILLISECOND
Definition SysTiming.h:65
void Delay_us(uint32_t usec)
Blocks for operations usec microseconds.
Definition SysTiming.h:296
#define CYCLES_PER_MICROSECOND
Definition SysTiming.h:61
uint32_t Microseconds(void)
Number of microseconds since the ClearCore was initialized.
void Delay_cycles(uint64_t cycles)
Blocks for operations cycles CPU cycles.
uint32_t Milliseconds(void)
Number of milliseconds since the ClearCore was initialized.
ClearCore Board Supervisory System Manager.
Definition SysManager.h:58
ClearCore system timing class.
Definition SysTiming.h:87
uint32_t Microseconds()
Number of microseconds elapsed since the ClearCore was initialized.
volatile const uint32_t & Milliseconds()
Number of milliseconds elapsed since the ClearCore was initialized.
Definition SysTiming.h:166
Namespace to encompass the ClearCore board API.
Definition AdcManager.h:36
const uint16_t SampleRateHz
Definition SysTiming.h:79