Functions | |
__STATIC_INLINE void | AONRTCEnable (void) |
Enable the RTC. More... | |
__STATIC_INLINE void | AONRTCDisable (void) |
Disable the RTC. More... | |
uint32_t | AONRTCStatus (void) |
Check if the AON Real Time Clock is running. More... | |
__STATIC_INLINE void | AONRTCReset (void) |
Reset the RTC. More... | |
__STATIC_INLINE void | AONRTCDelayConfig (uint32_t ui32Delay) |
Configure Event Delay for the RTC. More... | |
__STATIC_INLINE void | AONRTCCombinedEventConfig (uint32_t ui32Channels) |
Configure the source of the combined event. More... | |
void | AONRTCEventClear (uint32_t ui32Channel) |
Clear event from a specified channel. More... | |
bool | AONRTCEventGet (uint32_t ui32Channel) |
Get event status for a specified channel. More... | |
__STATIC_INLINE uint32_t | AONRTCSecGet (void) |
Get nominal seconds of RTC free-running timer. More... | |
__STATIC_INLINE uint32_t | AONRTCFractionGet (void) |
Get fractional part of RTC free-running timer. More... | |
__STATIC_INLINE uint32_t | AONRTCSubSecIncrGet (void) |
Get the sub second increment of the RTC. More... | |
void | AONRTCModeCh1Set (uint32_t ui32Mode) |
Set operational mode of channel 1. More... | |
uint32_t | AONRTCModeCh1Get (void) |
Get operational mode of channel 1. More... | |
void | AONRTCModeCh2Set (uint32_t ui32Mode) |
Set operational mode of channel 2. More... | |
uint32_t | AONRTCModeCh2Get (void) |
Get operational mode of channel 2. More... | |
void | AONRTCChannelEnable (uint32_t ui32Channel) |
Enable event operation for the specified channel. More... | |
void | AONRTCChannelDisable (uint32_t ui32Channel) |
Disable event operation for the specified channel. More... | |
void | AONRTCCompareValueSet (uint32_t ui32Channel, uint32_t ui32CompValue) |
Set the compare value for the given channel. More... | |
uint32_t | AONRTCCompareValueGet (uint32_t ui32Channel) |
Get the compare value for the given channel. More... | |
__STATIC_INLINE uint32_t | AONRTCCurrentCompareValueGet (void) |
Get the current value of the RTC counter in a format compatible to the compare registers. More... | |
__STATIC_INLINE void | AONRTCIncValueCh2Set (uint32_t ui32IncValue) |
Set the channel 2 increment value when operating in continuous mode. More... | |
__STATIC_INLINE uint32_t | AONRTCIncValueCh2Get (void) |
Get the channel2 increment value when operating in continuous mode. More... | |
__STATIC_INLINE uint32_t | AONRTCCaptureValueCh1Get (void) |
Get the channel 1 capture value. More... | |
__STATIC_INLINE uint32_t AONRTCCaptureValueCh1Get | ( | void | ) |
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.
void AONRTCChannelDisable | ( | uint32_t | ui32Channel | ) |
Disable event operation for the specified channel.
Disable the event generation for the specified channel.
ui32Channel | specifies the channel from which to disable events. The parameter must be one of the following: |
void AONRTCChannelEnable | ( | uint32_t | ui32Channel | ) |
Enable event operation for the specified channel.
Enable the event generation for the specified channel.
ui32Channel | specifies the channel from which to enable events. The parameter must be one of the following: |
__STATIC_INLINE void AONRTCCombinedEventConfig | ( | uint32_t | ui32Channels | ) |
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: |
uint32_t AONRTCCompareValueGet | ( | uint32_t | ui32Channel | ) |
Get the compare value for the given channel.
Get compare value for the specified channel.
ui32Channel | specifies a channel. The parameter must be one of the following: |
void AONRTCCompareValueSet | ( | uint32_t | ui32Channel, |
uint32_t | ui32CompValue | ||
) |
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 a compare channel and must be one of the following: |
ui32CompValue | is the compare value to set for the specified channel.
|
__STATIC_INLINE uint32_t AONRTCCurrentCompareValueGet | ( | void | ) |
Get the current value of the RTC counter in a format compatible to the compare registers.
The compare value registers contains the 16 integer and 16 fractional bits. This function will return the current value of the RTC counter in an identical format.
Definition at line 631 of file aon_rtc.h.
Referenced by OSCHF_AttemptToSwitchToXosc(), OSCHF_GetStartupTime(), OSCHF_SwitchToRcOscTurnOffXosc(), and OSCHF_TurnOnXosc().
__STATIC_INLINE void AONRTCDelayConfig | ( | uint32_t | ui32Delay | ) |
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:
|
__STATIC_INLINE void AONRTCDisable | ( | void | ) |
Disable the RTC.
Disable the AON Real Time Clock.
__STATIC_INLINE void AONRTCEnable | ( | void | ) |
Enable the RTC.
Enable the AON Real Time Clock.
void AONRTCEventClear | ( | uint32_t | ui32Channel | ) |
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 (and only one) of the following channels: |
bool AONRTCEventGet | ( | uint32_t | ui32Channel | ) |
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
. __STATIC_INLINE uint32_t AONRTCFractionGet | ( | void | ) |
Get fractional part of RTC free-running timer.
Get the value of the fractional part of RTC free-running timer, i.e. the sub-second part.
__STATIC_INLINE uint32_t AONRTCIncValueCh2Get | ( | void | ) |
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.
__STATIC_INLINE void AONRTCIncValueCh2Set | ( | uint32_t | ui32IncValue | ) |
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. |
uint32_t AONRTCModeCh1Get | ( | void | ) |
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.
void AONRTCModeCh1Set | ( | uint32_t | ui32Mode | ) |
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: |
uint32_t AONRTCModeCh2Get | ( | void | ) |
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.
void AONRTCModeCh2Set | ( | uint32_t | ui32Mode | ) |
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: |
__STATIC_INLINE void AONRTCReset | ( | void | ) |
__STATIC_INLINE uint32_t AONRTCSecGet | ( | void | ) |
Get nominal 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().
uint32_t AONRTCStatus | ( | void | ) |
Check if the AON Real Time Clock is running.
Use this function to check if the RTC is enabled. This can be relevant when recovering from powerdown mode. In powerdown the AON domain is still active and therefore the configuration of the RTC is not lost. The application code can poll the RTC with this function to check if the RTC is active before trying to (re)configure the RTC.
__STATIC_INLINE uint32_t AONRTCSubSecIncrGet | ( | void | ) |
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 |
Definition at line 106 of file aon_rtc.h.
Referenced by AONRTCStatus().
#define AON_RTC_CH0 0x1 |
Definition at line 103 of file aon_rtc.h.
Referenced by AONRTCChannelDisable(), AONRTCChannelEnable(), AONRTCCombinedEventConfig(), AONRTCCompareValueGet(), AONRTCCompareValueSet(), AONRTCEventClear(), AONRTCEventGet(), and AONRTCStatus().
#define AON_RTC_CH1 0x2 |
Definition at line 104 of file aon_rtc.h.
Referenced by AONRTCChannelDisable(), AONRTCChannelEnable(), AONRTCCombinedEventConfig(), AONRTCCompareValueGet(), AONRTCCompareValueSet(), AONRTCEventClear(), AONRTCEventGet(), and AONRTCStatus().
#define AON_RTC_CH2 0x4 |
Definition at line 105 of file aon_rtc.h.
Referenced by AONRTCChannelDisable(), AONRTCChannelEnable(), AONRTCCombinedEventConfig(), AONRTCCompareValueGet(), AONRTCCompareValueSet(), AONRTCEventClear(), AONRTCEventGet(), and AONRTCStatus().
#define AON_RTC_CONFIG_DELAY_176 15 |
Definition at line 128 of file aon_rtc.h.
Referenced by AONRTCDelayConfig().
#define AON_RTC_MODE_CH1_CAPTURE 1 |
Definition at line 136 of file aon_rtc.h.
Referenced by AONRTCModeCh1Get(), and AONRTCModeCh1Set().
#define AON_RTC_MODE_CH1_COMPARE 0 |
Definition at line 137 of file aon_rtc.h.
Referenced by AONRTCModeCh1Get(), and AONRTCModeCh1Set().
#define AON_RTC_MODE_CH2_CONTINUOUS 1 |
Definition at line 145 of file aon_rtc.h.
Referenced by AONRTCModeCh2Get(), and AONRTCModeCh2Set().
#define AON_RTC_MODE_CH2_NORMALCOMPARE 0 |
Definition at line 146 of file aon_rtc.h.
Referenced by AONRTCModeCh2Get(), and AONRTCModeCh2Set().