230 void ConfigureClocks();
246#include "../tests/TestIsolator.h"
264 return testIsolator_.GetStateForCurrentTest()->currentUs_ / 1000;
266 static uint32_t
GetUs()
268 return testIsolator_.GetStateForCurrentTest()->currentUs_;
272 return testIsolator_.GetStateForCurrentTest()->currentTick_;
276 return testIsolator_.GetStateForCurrentTest()->tickFreqHz_;
280 static void SetTickForUnitTest(uint32_t tick)
282 testIsolator_.GetStateForCurrentTest()->currentTick_ = tick;
285 static void SetUsForUnitTest(uint32_t us)
287 testIsolator_.GetStateForCurrentTest()->currentUs_ = us;
290 static void SetTickFreqForUnitTest(uint32_t freqInHz)
292 testIsolator_.GetStateForCurrentTest()->tickFreqHz_ = freqInHz;
298 uint32_t currentTick_ = 0;
299 uint32_t currentUs_ = 0;
300 uint32_t tickFreqHz_ = 0;
302 static TestIsolator<SystemState> testIsolator_;
Definition leddriver.h:33
System()
Definition system.h:96
void Init(const Config &config)
static uint32_t GetPClk1Freq()
static uint32_t GetTick()
static uint32_t GetSysClkFreq()
const Config & GetConfig() const
Definition system.h:209
BootloaderMode
Definition system.h:159
@ DAISY
Definition system.h:161
@ DAISY_SKIP_TIMEOUT
Definition system.h:162
@ STM
Definition system.h:160
@ DAISY_INFINITE_TIMEOUT
Definition system.h:163
static uint32_t GetTickFreq()
static uint32_t GetHClkFreq()
static void DelayUs(uint32_t delay_us)
static void Delay(uint32_t delay_ms)
static MemoryRegion GetMemoryRegion(uint32_t address)
static uint32_t GetPClk2Freq()
~System()
Definition system.h:97
static void DelayTicks(uint32_t delay_ticks)
MemoryRegion
Definition system.h:63
@ SRAM_D1
Definition system.h:67
@ SRAM_D2
Definition system.h:68
@ QSPI
Definition system.h:71
@ SRAM_D3
Definition system.h:69
@ ITCMRAM
Definition system.h:65
@ SDRAM
Definition system.h:70
@ DTCMRAM
Definition system.h:66
@ INTERNAL_FLASH
Definition system.h:64
@ INVALID_ADDRESS
Definition system.h:72
static MemoryRegion GetProgramMemoryRegion()
static void InitBackupSram()
static BootInfo::Version GetBootloaderVersion()
static constexpr uint32_t kQspiBootloaderOffset
Definition system.h:227
static void ResetToBootloader(BootloaderMode mode=BootloaderMode::STM)
Hardare timer peripheral support.
Definition tim.h:39
Hardware defines and helpers for daisy field platform.
Definition index.h:2
volatile daisy::System::BootInfo boot_info
Type
Definition system.h:79
Version
Definition system.h:87
enum daisy::System::BootInfo::Type status
uint32_t data
Definition system.h:85
enum daisy::System::BootInfo::Version version
SysClkFreq cpu_freq
Definition system.h:55
SysClkFreq
Definition system.h:26
bool use_icache
Definition system.h:57
bool skip_clocks
Definition system.h:58
void Boost()
Definition system.h:47
bool use_dcache
Definition system.h:56
void Defaults()
Definition system.h:35