BSPACM  20150113
Board Support Package for ARM Cortex-M Microcontrollers
Data Fields
sBSPACMuptimeState Struct Reference

#include </prj/arm/bspacm/device/nrf51/include/bspacm/utility/uptime.h>

Data Fields

volatile unsigned int overflows
 
unsigned int last_overflows
 
hBSPACMuptimeAlarm volatile alarm [BSPACM_UPTIME_CC_COUNT]
 
bool enabled
 

Detailed Description

The current state of the uptime clock.

This is global to allow access to pieces of it from inline functions. User application should never inspect nor mutate any of these fields.

Field Documentation

hBSPACMuptimeAlarm volatile sBSPACMuptimeState::alarm[BSPACM_UPTIME_CC_COUNT]

Pointer to alarms that fire from the uptime clock.

bool sBSPACMuptimeState::enabled

True iff the timer has been initialized and is running

unsigned int sBSPACMuptimeState::last_overflows

Records the last read value of the RTC peripheral uptime overflow counter.

This reduces the counter+overflow read check to a single iteration in the common case where an overflow has not occurred since the last uptime read.

volatile unsigned int sBSPACMuptimeState::overflows

Counts number of times uptime RTC peripheral has overflowed.

LFCLK is always 32 KiHz, and we use a zero prescaler to preserve full resolution. The counter is 24 bits, so track overflows in a 32-bit external counter, giving us 56 bits for the full clock (span 2^41 seconds, roughly 69 thousand years).


The documentation for this struct was generated from the following file: