Struct timer#
Defined in File timer.h
Struct Documentation#
-
struct timer#
Controls time and alarms
time is a 64 bit value indicating the time in usec since power-on
timeh is the top 32 bits of time & timel is the bottom 32 bits
to change time write to timelw before timehw
to read time read from timelr before timehr
An alarm is set by setting alarm_enable and writing to the corresponding alarm register
When an alarm is pending, the corresponding alarm_running signal will be high
An alarm can be cancelled before it has finished by clearing the alarm_enable
When an alarm fires, the corresponding alarm_irq is set and alarm_running is cleared
To clear the interrupt write a 1 to the corresponding alarm_irq
Public Functions
-
inline uint8_t get_ARMED_ARMED() volatile#
Get ARMED’s ARMED field.
-
inline void set_ARMED_ARMED(uint8_t value) volatile#
Set ARMED’s ARMED field.
-
inline bool get_DBGPAUSE_DBG0() volatile#
Get DBGPAUSE’s DBG0 bit.
Pause when processor 0 is in debug mode
-
inline void set_DBGPAUSE_DBG0() volatile#
Set DBGPAUSE’s DBG0 bit.
Pause when processor 0 is in debug mode
-
inline void clear_DBGPAUSE_DBG0() volatile#
Clear DBGPAUSE’s DBG0 bit.
Pause when processor 0 is in debug mode
-
inline void toggle_DBGPAUSE_DBG0() volatile#
Toggle DBGPAUSE’s DBG0 bit.
Pause when processor 0 is in debug mode
-
inline bool get_DBGPAUSE_DBG1() volatile#
Get DBGPAUSE’s DBG1 bit.
Pause when processor 1 is in debug mode
-
inline void set_DBGPAUSE_DBG1() volatile#
Set DBGPAUSE’s DBG1 bit.
Pause when processor 1 is in debug mode
-
inline void clear_DBGPAUSE_DBG1() volatile#
Clear DBGPAUSE’s DBG1 bit.
Pause when processor 1 is in debug mode
-
inline void toggle_DBGPAUSE_DBG1() volatile#
Toggle DBGPAUSE’s DBG1 bit.
Pause when processor 1 is in debug mode
-
inline void get_DBGPAUSE(bool &DBG0, bool &DBG1) volatile#
Get all of DBGPAUSE’s bit fields.
(read-write) Set bits high to enable pause when the corresponding debug ports are active
-
inline void set_DBGPAUSE(bool DBG0, bool DBG1) volatile#
Set all of DBGPAUSE’s bit fields.
(read-write) Set bits high to enable pause when the corresponding debug ports are active
-
inline bool get_PAUSE_PAUSE() volatile#
Get PAUSE’s PAUSE bit.
-
inline void set_PAUSE_PAUSE() volatile#
Set PAUSE’s PAUSE bit.
-
inline void clear_PAUSE_PAUSE() volatile#
Clear PAUSE’s PAUSE bit.
-
inline void toggle_PAUSE_PAUSE() volatile#
Toggle PAUSE’s PAUSE bit.
-
inline bool get_INTR_ALARM_0() volatile#
Get INTR’s ALARM_0 bit.
-
inline void set_INTR_ALARM_0() volatile#
Set INTR’s ALARM_0 bit.
-
inline void clear_INTR_ALARM_0() volatile#
Clear INTR’s ALARM_0 bit.
-
inline void toggle_INTR_ALARM_0() volatile#
Toggle INTR’s ALARM_0 bit.
-
inline bool get_INTR_ALARM_1() volatile#
Get INTR’s ALARM_1 bit.
-
inline void set_INTR_ALARM_1() volatile#
Set INTR’s ALARM_1 bit.
-
inline void clear_INTR_ALARM_1() volatile#
Clear INTR’s ALARM_1 bit.
-
inline void toggle_INTR_ALARM_1() volatile#
Toggle INTR’s ALARM_1 bit.
-
inline bool get_INTR_ALARM_2() volatile#
Get INTR’s ALARM_2 bit.
-
inline void set_INTR_ALARM_2() volatile#
Set INTR’s ALARM_2 bit.
-
inline void clear_INTR_ALARM_2() volatile#
Clear INTR’s ALARM_2 bit.
-
inline void toggle_INTR_ALARM_2() volatile#
Toggle INTR’s ALARM_2 bit.
-
inline bool get_INTR_ALARM_3() volatile#
Get INTR’s ALARM_3 bit.
-
inline void set_INTR_ALARM_3() volatile#
Set INTR’s ALARM_3 bit.
-
inline void clear_INTR_ALARM_3() volatile#
Clear INTR’s ALARM_3 bit.
-
inline void toggle_INTR_ALARM_3() volatile#
Toggle INTR’s ALARM_3 bit.
-
inline void get_INTR(bool &ALARM_0, bool &ALARM_1, bool &ALARM_2, bool &ALARM_3) volatile#
Get all of INTR’s bit fields.
(read-write) Raw Interrupts
-
inline void set_INTR(bool ALARM_0, bool ALARM_1, bool ALARM_2, bool ALARM_3) volatile#
Set all of INTR’s bit fields.
(read-write) Raw Interrupts
-
inline bool get_INTE_ALARM_0() volatile#
Get INTE’s ALARM_0 bit.
-
inline void set_INTE_ALARM_0() volatile#
Set INTE’s ALARM_0 bit.
-
inline void clear_INTE_ALARM_0() volatile#
Clear INTE’s ALARM_0 bit.
-
inline void toggle_INTE_ALARM_0() volatile#
Toggle INTE’s ALARM_0 bit.
-
inline bool get_INTE_ALARM_1() volatile#
Get INTE’s ALARM_1 bit.
-
inline void set_INTE_ALARM_1() volatile#
Set INTE’s ALARM_1 bit.
-
inline void clear_INTE_ALARM_1() volatile#
Clear INTE’s ALARM_1 bit.
-
inline void toggle_INTE_ALARM_1() volatile#
Toggle INTE’s ALARM_1 bit.
-
inline bool get_INTE_ALARM_2() volatile#
Get INTE’s ALARM_2 bit.
-
inline void set_INTE_ALARM_2() volatile#
Set INTE’s ALARM_2 bit.
-
inline void clear_INTE_ALARM_2() volatile#
Clear INTE’s ALARM_2 bit.
-
inline void toggle_INTE_ALARM_2() volatile#
Toggle INTE’s ALARM_2 bit.
-
inline bool get_INTE_ALARM_3() volatile#
Get INTE’s ALARM_3 bit.
-
inline void set_INTE_ALARM_3() volatile#
Set INTE’s ALARM_3 bit.
-
inline void clear_INTE_ALARM_3() volatile#
Clear INTE’s ALARM_3 bit.
-
inline void toggle_INTE_ALARM_3() volatile#
Toggle INTE’s ALARM_3 bit.
-
inline void get_INTE(bool &ALARM_0, bool &ALARM_1, bool &ALARM_2, bool &ALARM_3) volatile#
Get all of INTE’s bit fields.
(read-write) Interrupt Enable
-
inline void set_INTE(bool ALARM_0, bool ALARM_1, bool ALARM_2, bool ALARM_3) volatile#
Set all of INTE’s bit fields.
(read-write) Interrupt Enable
-
inline bool get_INTF_ALARM_0() volatile#
Get INTF’s ALARM_0 bit.
-
inline void set_INTF_ALARM_0() volatile#
Set INTF’s ALARM_0 bit.
-
inline void clear_INTF_ALARM_0() volatile#
Clear INTF’s ALARM_0 bit.
-
inline void toggle_INTF_ALARM_0() volatile#
Toggle INTF’s ALARM_0 bit.
-
inline bool get_INTF_ALARM_1() volatile#
Get INTF’s ALARM_1 bit.
-
inline void set_INTF_ALARM_1() volatile#
Set INTF’s ALARM_1 bit.
-
inline void clear_INTF_ALARM_1() volatile#
Clear INTF’s ALARM_1 bit.
-
inline void toggle_INTF_ALARM_1() volatile#
Toggle INTF’s ALARM_1 bit.
-
inline bool get_INTF_ALARM_2() volatile#
Get INTF’s ALARM_2 bit.
-
inline void set_INTF_ALARM_2() volatile#
Set INTF’s ALARM_2 bit.
-
inline void clear_INTF_ALARM_2() volatile#
Clear INTF’s ALARM_2 bit.
-
inline void toggle_INTF_ALARM_2() volatile#
Toggle INTF’s ALARM_2 bit.
-
inline bool get_INTF_ALARM_3() volatile#
Get INTF’s ALARM_3 bit.
-
inline void set_INTF_ALARM_3() volatile#
Set INTF’s ALARM_3 bit.
-
inline void clear_INTF_ALARM_3() volatile#
Clear INTF’s ALARM_3 bit.
-
inline void toggle_INTF_ALARM_3() volatile#
Toggle INTF’s ALARM_3 bit.
-
inline void get_INTF(bool &ALARM_0, bool &ALARM_1, bool &ALARM_2, bool &ALARM_3) volatile#
Get all of INTF’s bit fields.
(read-write) Interrupt Force
-
inline void set_INTF(bool ALARM_0, bool ALARM_1, bool ALARM_2, bool ALARM_3) volatile#
Set all of INTF’s bit fields.
(read-write) Interrupt Force
-
inline bool get_INTS_ALARM_0() volatile#
Get INTS’s ALARM_0 bit.
-
inline bool get_INTS_ALARM_1() volatile#
Get INTS’s ALARM_1 bit.
-
inline bool get_INTS_ALARM_2() volatile#
Get INTS’s ALARM_2 bit.
-
inline bool get_INTS_ALARM_3() volatile#
Get INTS’s ALARM_3 bit.
-
inline void get_INTS(bool &ALARM_0, bool &ALARM_1, bool &ALARM_2, bool &ALARM_3) volatile#
Get all of INTS’s bit fields.
(read-only) Interrupt status after masking & forcing
Public Members
-
uint32_t TIMEHW#
(read-write) Write to bits 63:32 of time
always write timelw before timehw
-
uint32_t TIMELW#
(read-write) Write to bits 31:0 of time
writes do not get copied to time until timehw is written
-
uint32_t TIMEHR#
(read-write) Read from bits 63:32 of time
always read timelr before timehr
-
uint32_t TIMELR#
(read-write) Read from bits 31:0 of time
-
uint32_t ALARM0#
(read-write) Arm alarm 0, and configure the time it will fire.
Once armed, the alarm fires when TIMER_ALARM0 == TIMELR.
The alarm will disarm itself once it fires, and can
be disarmed early using the ARMED status register.
-
uint32_t ALARM1#
(read-write) Arm alarm 1, and configure the time it will fire.
Once armed, the alarm fires when TIMER_ALARM1 == TIMELR.
The alarm will disarm itself once it fires, and can
be disarmed early using the ARMED status register.
-
uint32_t ALARM2#
(read-write) Arm alarm 2, and configure the time it will fire.
Once armed, the alarm fires when TIMER_ALARM2 == TIMELR.
The alarm will disarm itself once it fires, and can
be disarmed early using the ARMED status register.
-
uint32_t ALARM3#
(read-write) Arm alarm 3, and configure the time it will fire.
Once armed, the alarm fires when TIMER_ALARM3 == TIMELR.
The alarm will disarm itself once it fires, and can
be disarmed early using the ARMED status register.
-
uint32_t ARMED#
(read-write) Indicates the armed/disarmed status of each alarm.
A write to the corresponding ALARMx register arms the alarm.
Alarms automatically disarm upon firing, but writing ones here
will disarm immediately without waiting to fire.
-
uint32_t TIMERAWH#
(read-write) Raw read from bits 63:32 of time (no side effects)
-
uint32_t TIMERAWL#
(read-write) Raw read from bits 31:0 of time (no side effects)
-
uint32_t DBGPAUSE#
(read-write) Set bits high to enable pause when the corresponding debug ports are active
-
uint32_t PAUSE#
(read-write) Set high to pause the timer
-
uint32_t INTR#
(read-write) Raw Interrupts
-
uint32_t INTE#
(read-write) Interrupt Enable
-
uint32_t INTF#
(read-write) Interrupt Force
-
const uint32_t INTS = {}#
(read-only) Interrupt status after masking & forcing
Public Static Attributes
-
static constexpr std::size_t size = 68#
timer’s size in bytes.
-
inline uint8_t get_ARMED_ARMED() volatile#