Functions | |
static void | AONRTCEnable (void) |
Enable the RTC. More... | |
static void | AONRTCDisable (void) |
Disable the RTC. More... | |
static void | AONRTCReset (void) |
Reset the RTC. More... | |
static bool | AONRTCActive (void) |
Check if the RTC is active (enabled). More... | |
static bool | AONRTCChannelActive (uint32_t ui32Channel) |
Check if an RTC channel is active (enabled). More... | |
static void | AONRTCDelayConfig (uint32_t ui32Delay) |
Configure Event Delay for the RTC. More... | |
static void | AONRTCCombinedEventConfig (uint32_t ui32Channels) |
Configure the source of the combined event. More... | |
static void | AONRTCEventClear (uint32_t ui32Channel) |
Clear event from a specified channel. More... | |
static bool | AONRTCEventGet (uint32_t ui32Channel) |
Get event status for a specified channel. More... | |
static uint32_t | AONRTCSecGet (void) |
Get integer part (seconds) of RTC free-running timer. More... | |
static uint32_t | AONRTCFractionGet (void) |
Get fractional part (sub-seconds) of RTC free-running timer. More... | |
static uint32_t | AONRTCSubSecIncrGet (void) |
Get the sub second increment of the RTC. More... | |
static void | AONRTCModeCh1Set (uint32_t ui32Mode) |
Set operational mode of channel 1. More... | |
static uint32_t | AONRTCModeCh1Get (void) |
Get operational mode of channel 1. More... | |
static void | AONRTCModeCh2Set (uint32_t ui32Mode) |
Set operational mode of channel 2. More... | |
static uint32_t | AONRTCModeCh2Get (void) |
Get operational mode of channel 2. More... | |
static void | AONRTCChannelEnable (uint32_t ui32Channel) |
Enable event operation for the specified channel. More... | |
static void | AONRTCChannelDisable (uint32_t ui32Channel) |
Disable event operation for the specified channel. More... | |
static void | AONRTCCompareValueSet (uint32_t ui32Channel, uint32_t ui32CompValue) |
Set the compare value for the given channel. More... | |
static uint32_t | AONRTCCompareValueGet (uint32_t ui32Channel) |
Get the compare value for the given channel. More... | |
static uint32_t | AONRTCCurrentCompareValueGet (void) |
Get the current value of the RTC counter in a format that matches RTC compare values. More... | |
uint64_t | AONRTCCurrent64BitValueGet (void) |
Get the current 64-bit value of the RTC counter. More... | |
static void | AONRTCIncValueCh2Set (uint32_t ui32IncValue) |
Set the channel 2 increment value when operating in continuous mode. More... | |
static uint32_t | AONRTCIncValueCh2Get (void) |
Get the channel2 increment value when operating in continuous mode. More... | |
static uint32_t | AONRTCCaptureValueCh1Get (void) |
Get the channel 1 capture value. More... | |
|
inlinestatic |
|
inlinestatic |
Get the channel 1 capture value.
Get the channel 1 capture value. The upper 16 bits of the returned value is the lower 16 bits of the integer part of the RTC timer. The lower 16 bits of the returned part is the upper 16 bits of the fractional part.
|
inlinestatic |
Check if an RTC channel is active (enabled).
ui32Channel | specifies the RTC channel to check status of. Parameter must be one (and only one) of the following: |
|
inlinestatic |
Disable event operation for the specified channel.
Disable the event generation for the specified channel.
ui32Channel | specifies one or more channels to disable: |
|
inlinestatic |
Enable event operation for the specified channel.
Enable the event generation for the specified channel.
ui32Channel | specifies one or more channels to enable: |
|
inlinestatic |
Configure the source of the combined event.
A combined delayed event can be generated from a combination of the three delayed events. Delayed events form the specified channels are OR'ed together to generate the combined event.
ui32Channels | specifies the channels that are to be used for generating the combined event. The parameter must be the bitwise OR of any of the following: |
Referenced by SetupTrimDevice().
|
inlinestatic |
Get the compare value for the given channel.
Get compare value for the specified channel.
ui32Channel | specifies a channel. The parameter must be one (and only one) of the following: |
|
inlinestatic |
Set the compare value for the given channel.
Set compare value for the specified channel.
The format of the compare value is a 16 bit integer and 16 bit fractional format <16 sec.16 subsec>. The current value of the RTC counter can be retrieved in a format compatible to the compare register using AONRTCCurrentCompareValueGet()
ui32Channel | specifies one or more channels to set compare value for: |
ui32CompValue | is the compare value to set for the specified channel.
|
uint64_t AONRTCCurrent64BitValueGet | ( | void | ) |
Get the current 64-bit value of the RTC counter.
Referenced by AONRTCCurrentCompareValueGet().
|
inlinestatic |
Get the current value of the RTC counter in a format that matches RTC compare values.
The compare value registers contains 16 integer and 16 fractional bits. This function will return the current value of the RTC counter in an identical format.
Referenced by OSCHF_AttemptToSwitchToXosc(), OSCHF_DebugGetCrystalAmplitude(), OSCHF_GetStartupTime(), OSCHF_SwitchToRcOscTurnOffXosc(), and OSCHF_TurnOnXosc().
|
inlinestatic |
Configure Event Delay for the RTC.
Each event from the three individual channels can generate a delayed event. The delay time for these events is set using this function. The delay is measured in clock cycles.
ui32Delay | specifies the delay time for delayed events. Parameter must be one of the following:
|
|
inlinestatic |
Disable the RTC.
Disable the AON Real Time Clock.
|
inlinestatic |
Enable the RTC.
Enable the AON Real Time Clock.
Referenced by SetupTrimDevice().
|
inlinestatic |
Clear event from a specified channel.
In case of an active event from the specified channel, the event will be cleared (de-asserted).
ui32Channel | clears the event from one or more RTC channels: |
|
inlinestatic |
Get event status for a specified channel.
In case of an active event from the specified channel, this call will return true
otherwise false
.
ui32Channel | specifies the channel from which to query the event state. The parameter must be one (and only one) of the following: |
true
if an event has occurred for the given channel, otherwise false
.
|
inlinestatic |
Get fractional part (sub-seconds) of RTC free-running timer.
Get the value of the fractional part of RTC free-running timer, i.e. the sub-second part.
|
inlinestatic |
Get the channel2 increment value when operating in continuous mode.
Get the channel 2 increment value, when channel 2 is operating in continuous mode. This value is automatically incremented to the channel 2 compare register, upon a channel 2 compare event. This allows channel 2 to generate a series of completely equidistant events.
|
inlinestatic |
Set the channel 2 increment value when operating in continuous mode.
Set the channel 2 increment value when operating in continuous mode. The specified value is automatically incremented to the channel 2 compare register, upon a channel 2 compare event. This allows channel 2 to generate a series of completely equidistant events.
ui32IncValue | is the increment value when operating in continuous mode. |
|
inlinestatic |
Get operational mode of channel 1.
Get the operational mode of channel 1. It can be capture or compare mode. In capture mode, an external event causes the value of the free running counter to be stored, to remember the time of the event.
|
inlinestatic |
Set operational mode of channel 1.
Set the operational mode of channel 1. It can be capture or compare mode. In capture mode, an external event causes the value of the free running counter to be stored, to remember the time of the event.
ui32Mode | specifies the mode for channel 1. The parameter must be one of the following: |
|
inlinestatic |
Get operational mode of channel 2.
Get the operational mode of channel 2. It can be in continuous compare mode or normal compare mode. In continuous mode, a value is automatically incremented to the channel 2 compare register, upon a channel 2 compare event. This allows channel 2 to generate a series of completely equidistant events. The increment value is set by the AONRTCIncValueCh2Set() call.
|
inlinestatic |
Set operational mode of channel 2.
Set the operational mode of channel 2. It can be in continuous compare mode or normal compare mode. In continuous mode, a value is automatically incremented to the channel 2 compare register, upon a channel 2 compare event. This allows channel 2 to generate a series of completely equidistant events. The increment value is set by the AONRTCIncValueCh2Set() call.
ui32Mode | specifies the mode for channel 2. The parameter must be one of the following: |
|
inlinestatic |
|
inlinestatic |
Get integer part (seconds) of RTC free-running timer.
Get the value in seconds of RTC free-running timer, i.e. the integer part. The fractional part is returned from a call to AONRTCFractionGet().
|
inlinestatic |
Get the sub second increment of the RTC.
Get the value of the sub-second increment which is added to the RTC absolute time on every clock tick.
#define AON_RTC_ACTIVE 0x8 |
#define AON_RTC_CH0 0x1 |
#define AON_RTC_CH1 0x2 |
#define AON_RTC_CH2 0x4 |
#define AON_RTC_CH_NONE 0x0 |
Referenced by AONRTCCombinedEventConfig().
#define AON_RTC_CONFIG_DELAY_1 1 |
#define AON_RTC_CONFIG_DELAY_112 11 |
#define AON_RTC_CONFIG_DELAY_128 12 |
#define AON_RTC_CONFIG_DELAY_144 13 |
Referenced by AONRTCDelayConfig().
#define AON_RTC_CONFIG_DELAY_16 5 |
#define AON_RTC_CONFIG_DELAY_2 2 |
#define AON_RTC_CONFIG_DELAY_32 6 |
#define AON_RTC_CONFIG_DELAY_4 3 |
#define AON_RTC_CONFIG_DELAY_48 7 |
#define AON_RTC_CONFIG_DELAY_64 8 |
#define AON_RTC_CONFIG_DELAY_8 4 |
#define AON_RTC_CONFIG_DELAY_80 9 |
#define AON_RTC_CONFIG_DELAY_96 10 |
#define AON_RTC_CONFIG_DELAY_NODELAY 0 |
#define AON_RTC_MODE_CH1_CAPTURE 1 |
Referenced by AONRTCModeCh1Set().
#define AON_RTC_MODE_CH1_COMPARE 0 |
Referenced by AONRTCModeCh1Set().
#define AON_RTC_MODE_CH2_CONTINUOUS 1 |
Referenced by AONRTCModeCh2Set().
#define AON_RTC_MODE_CH2_NORMALCOMPARE 0 |
Referenced by AONRTCModeCh2Set().
#define FACTOR_SEC_TO_COMP_VAL_FORMAT 0x00010000 |
Referenced by OSCHF_DebugGetCrystalAmplitude().