62 #include <inc/hw_types.h>
63 #include <inc/hw_memmap.h>
64 #include <inc/hw_aon_rtc.h>
82 #ifndef DRIVERLIB_GENERATE_ROM
83 #define AONRTCStatus NOROM_AONRTCStatus
84 #define AONRTCEventClear NOROM_AONRTCEventClear
85 #define AONRTCEventGet NOROM_AONRTCEventGet
86 #define AONRTCModeCh1Set NOROM_AONRTCModeCh1Set
87 #define AONRTCModeCh1Get NOROM_AONRTCModeCh1Get
88 #define AONRTCModeCh2Set NOROM_AONRTCModeCh2Set
89 #define AONRTCModeCh2Get NOROM_AONRTCModeCh2Get
90 #define AONRTCChannelEnable NOROM_AONRTCChannelEnable
91 #define AONRTCChannelDisable NOROM_AONRTCChannelDisable
92 #define AONRTCCompareValueSet NOROM_AONRTCCompareValueSet
93 #define AONRTCCompareValueGet NOROM_AONRTCCompareValueGet
102 #define AON_RTC_CH_NONE 0x0 // RTC No channel
103 #define AON_RTC_CH0 0x1 // RTC Channel 0
104 #define AON_RTC_CH1 0x2 // RTC Channel 1
105 #define AON_RTC_CH2 0x4 // RTC Channel 2
106 #define AON_RTC_ACTIVE 0x8 // RTC Active
113 #define AON_RTC_CONFIG_DELAY_NODELAY 0 // NO DELAY
114 #define AON_RTC_CONFIG_DELAY_1 1 // Delay of 1 clk cycle
115 #define AON_RTC_CONFIG_DELAY_2 2 // Delay of 2 clk cycles
116 #define AON_RTC_CONFIG_DELAY_4 3 // Delay of 4 clk cycles
117 #define AON_RTC_CONFIG_DELAY_8 4 // Delay of 8 clk cycles
118 #define AON_RTC_CONFIG_DELAY_16 5 // Delay of 16 clk cycles
119 #define AON_RTC_CONFIG_DELAY_32 6 // Delay of 32 clk cycles
120 #define AON_RTC_CONFIG_DELAY_48 7 // Delay of 48 clk cycles
121 #define AON_RTC_CONFIG_DELAY_64 8 // Delay of 64 clk cycles
122 #define AON_RTC_CONFIG_DELAY_80 9 // Delay of 80 clk cycles
123 #define AON_RTC_CONFIG_DELAY_96 10 // Delay of 96 clk cycles
124 #define AON_RTC_CONFIG_DELAY_112 11 // Delay of 112 clk cycles
125 #define AON_RTC_CONFIG_DELAY_128 12 // Delay of 128 clk cycles
126 #define AON_RTC_CONFIG_DELAY_144 13 // Delay of 144 clk cycles
127 #define AON_RTC_CONFIG_DELAY_160 14 // Delay of 160 clk cycles
128 #define AON_RTC_CONFIG_DELAY_176 15 // Delay of 176 clk cycles
136 #define AON_RTC_MODE_CH1_CAPTURE 1 // Capture mode
137 #define AON_RTC_MODE_CH1_COMPARE 0 // Compare Mode
145 #define AON_RTC_MODE_CH2_CONTINUOUS 1 // Continuous mode
146 #define AON_RTC_MODE_CH2_NORMALCOMPARE 0 // Normal compare mode
380 __STATIC_INLINE uint32_t
406 __STATIC_INLINE uint32_t
434 __STATIC_INLINE uint32_t
596 uint32_t ui32CompValue);
630 __STATIC_INLINE uint32_t
633 uint32_t ui32CurrentSec ;
634 uint32_t ui32CurrentSubSec ;
644 return (( ui32CurrentSec << 16 ) | ( ui32CurrentSubSec >> 16 ));
685 __STATIC_INLINE uint32_t
703 __STATIC_INLINE uint32_t
715 #ifndef DRIVERLIB_NOROM
717 #ifdef ROM_AONRTCStatus
719 #define AONRTCStatus ROM_AONRTCStatus
721 #ifdef ROM_AONRTCEventClear
722 #undef AONRTCEventClear
723 #define AONRTCEventClear ROM_AONRTCEventClear
725 #ifdef ROM_AONRTCEventGet
726 #undef AONRTCEventGet
727 #define AONRTCEventGet ROM_AONRTCEventGet
729 #ifdef ROM_AONRTCModeCh1Set
730 #undef AONRTCModeCh1Set
731 #define AONRTCModeCh1Set ROM_AONRTCModeCh1Set
733 #ifdef ROM_AONRTCModeCh1Get
734 #undef AONRTCModeCh1Get
735 #define AONRTCModeCh1Get ROM_AONRTCModeCh1Get
737 #ifdef ROM_AONRTCModeCh2Set
738 #undef AONRTCModeCh2Set
739 #define AONRTCModeCh2Set ROM_AONRTCModeCh2Set
741 #ifdef ROM_AONRTCModeCh2Get
742 #undef AONRTCModeCh2Get
743 #define AONRTCModeCh2Get ROM_AONRTCModeCh2Get
745 #ifdef ROM_AONRTCChannelEnable
746 #undef AONRTCChannelEnable
747 #define AONRTCChannelEnable ROM_AONRTCChannelEnable
749 #ifdef ROM_AONRTCChannelDisable
750 #undef AONRTCChannelDisable
751 #define AONRTCChannelDisable ROM_AONRTCChannelDisable
753 #ifdef ROM_AONRTCCompareValueSet
754 #undef AONRTCCompareValueSet
755 #define AONRTCCompareValueSet ROM_AONRTCCompareValueSet
757 #ifdef ROM_AONRTCCompareValueGet
758 #undef AONRTCCompareValueGet
759 #define AONRTCCompareValueGet ROM_AONRTCCompareValueGet
772 #endif // __AON_RTC_H__
uint32_t AONRTCModeCh1Get(void)
Get operational mode of channel 1.
void AONRTCCompareValueSet(uint32_t ui32Channel, uint32_t ui32CompValue)
Set the compare value for the given channel.
bool AONRTCEventGet(uint32_t ui32Channel)
Get event status for a specified channel.
uint32_t AONRTCCompareValueGet(uint32_t ui32Channel)
Get the compare value for the given channel.
__STATIC_INLINE void AONRTCReset(void)
Reset the RTC.
void AONRTCModeCh2Set(uint32_t ui32Mode)
Set operational mode of channel 2.
void AONRTCChannelDisable(uint32_t ui32Channel)
Disable event operation for the specified channel.
__STATIC_INLINE void AONRTCDelayConfig(uint32_t ui32Delay)
Configure Event Delay for the RTC.
__STATIC_INLINE uint32_t AONRTCSecGet(void)
Get nominal seconds of RTC free-running timer.
#define AON_RTC_CONFIG_DELAY_176
__STATIC_INLINE uint32_t AONRTCFractionGet(void)
Get fractional part of RTC free-running timer.
uint32_t AONRTCStatus(void)
Check if the AON Real Time Clock is running.
__STATIC_INLINE uint32_t AONRTCIncValueCh2Get(void)
Get the channel2 increment value when operating in continuous mode.
__STATIC_INLINE uint32_t AONRTCCaptureValueCh1Get(void)
Get the channel 1 capture value.
uint32_t AONRTCModeCh2Get(void)
Get operational mode of channel 2.
void AONRTCEventClear(uint32_t ui32Channel)
Clear event from a specified channel.
__STATIC_INLINE void AONRTCIncValueCh2Set(uint32_t ui32IncValue)
Set the channel 2 increment value when operating in continuous mode.
void AONRTCModeCh1Set(uint32_t ui32Mode)
Set operational mode of channel 1.
void AONRTCChannelEnable(uint32_t ui32Channel)
Enable event operation for the specified channel.
__STATIC_INLINE void AONRTCEnable(void)
Enable the RTC.
__STATIC_INLINE void AONRTCDisable(void)
Disable the RTC.
__STATIC_INLINE uint32_t AONRTCCurrentCompareValueGet(void)
Get the current value of the RTC counter in a format compatible to the compare registers.
__STATIC_INLINE void AONRTCCombinedEventConfig(uint32_t ui32Channels)
Configure the source of the combined event.
__STATIC_INLINE uint32_t AONRTCSubSecIncrGet(void)
Get the sub second increment of the RTC.