37 #if defined( RTCC_COUNT ) && ( RTCC_COUNT == 1 )
57 #if defined(_SILICON_LABS_GECKO_INTERNAL_SDID_84) \
58 || defined(_SILICON_LABS_GECKO_INTERNAL_SDID_89)
61 #define ERRATA_FIX_RTCC_E203
64 #if defined(_SILICON_LABS_GECKO_INTERNAL_SDID_84)
67 #define ERRATA_FIX_RTCC_E204
208 #if defined(_RTCC_CTRL_BUMODETSEN_MASK)
211 bool enaBackupModeSet;
260 #if defined(_RTCC_CTRL_BUMODETSEN_MASK)
261 #define RTCC_INIT_DEFAULT \
275 #define RTCC_INIT_DEFAULT \
290 #define RTCC_CH_INIT_COMPARE_DEFAULT \
292 rtccCapComChModeCompare, \
293 rtccCompMatchOutActionPulse, \
298 rtccDayCompareModeMonth \
302 #define RTCC_CH_INIT_CAPTURE_DEFAULT \
304 rtccCapComChModeCapture, \
305 rtccCompMatchOutActionPulse, \
310 rtccDayCompareModeMonth \
314 #define RTCC_CH_VALID( ch ) ( ( ch ) < 3 )
333 return RTCC->CC[ ch ].CCV;
349 RTCC->CC[ ch ].CCV = value;
365 return RTCC->CC[ ch ].DATE;
381 RTCC->CC[ ch ].DATE = date;
399 return RTCC->CC[ ch ].TIME;
415 RTCC->CC[ ch ].TIME = time;
427 return RTCC->COMBCNT;
579 return RTCC->IF & tmp;
606 #if defined(ERRATA_FIX_RTCC_E203)
609 uint32_t lfeReg =
CMU->LFECLKEN0;
615 CMU->LFECLKEN0 = 0x0;
618 #if defined(ERRATA_FIX_RTCC_E203)
620 CMU->LFECLKEN0 = lfeReg;
649 RTCC->PRECNT = preCntVal;
663 #if !defined(ERRATA_FIX_RTCC_E204)
723 #if defined(ERRATA_FIX_RTCC_E203)
726 uint32_t lfeReg =
CMU->LFECLKEN0;
732 CMU->LFECLKEN0 = 0x0;
735 #if defined(ERRATA_FIX_RTCC_E203)
737 CMU->LFECLKEN0 = lfeReg;
RTCC_CntMode_TypeDef cntMode
#define CMU_LOCK_LOCKKEY_LOCKED
void RTCC_StatusClear(void)
Clear STATUS register.
Emlib peripheral API "assert" implementation.
#define _RTCC_CTRL_CNTPRESC_DIV1024
RTCC_PrescMode_TypeDef prescMode
#define RTCC_LOCK_LOCKKEY_LOCK
void RTCC_Init(const RTCC_Init_TypeDef *init)
Initialize RTCC.
RTCC_InEdgeSel_TypeDef inputEdgeSel
#define _RTCC_CC_CTRL_PRSSEL_PRSCH8
void RTCC_Enable(bool enable)
Enable/disable RTCC.
#define _RTCC_CC_CTRL_ICEDGE_BOTH
__STATIC_INLINE uint32_t RTCC_ChannelDateGet(int ch)
Get the calendar DATE register content for selected channel.
#define _RTCC_CC_CTRL_MODE_INPUTCAPTURE
__STATIC_INLINE uint32_t RTCC_TimeGet(void)
Get TIME register value.
#define _RTCC_CC_CTRL_PRSSEL_PRSCH2
#define _RTCC_CTRL_CNTPRESC_DIV64
#define _RTCC_CC_CTRL_CMOA_CLEAR
#define _RTCC_CC_CTRL_PRSSEL_PRSCH10
#define _RTCC_CC_CTRL_ICEDGE_RISING
__STATIC_INLINE uint32_t RTCC_CounterGet(void)
Get RTCC counter value.
__STATIC_INLINE void RTCC_DateSet(uint32_t date)
Set RTCC DATE register.
CMSIS Cortex-M Peripheral Access Layer for Silicon Laboratories microcontroller devices.
#define _RTCC_CC_CTRL_PRSSEL_PRSCH5
#define _RTCC_CTRL_CNTPRESC_DIV128
__STATIC_INLINE void RTCC_ChannelCCVSet(int ch, uint32_t value)
Set RTCC capture/compare register value (CCV) for selected channel.
#define _RTCC_CTRL_CNTPRESC_DIV2048
#define RTCC_LOCK_LOCKKEY_UNLOCK
__STATIC_INLINE uint32_t RTCC_IntGetEnabled(void)
Get enabled and pending RTCC interrupt flags.
#define _RTCC_CTRL_CNTPRESC_DIV32
#define _RTCC_CC_CTRL_PRSSEL_PRSCH1
#define _RTCC_CC_CTRL_DAYCC_WEEK
__STATIC_INLINE void RTCC_Unlock(void)
Unlock RTCC registers.
__STATIC_INLINE void RTCC_TimeSet(uint32_t time)
Set RTCC TIME register.
#define _RTCC_CTRL_CNTPRESC_DIV16
#define _RTCC_CC_CTRL_MODE_OUTPUTCOMPARE
__STATIC_INLINE void RTCC_ChannelTimeSet(int ch, uint32_t time)
Set the calendar TIME register for selected channel.
RTCC_CompMatchOutAction_TypeDef compMatchOutAction
RTCC_DayCompareMode_TypeDef
#define CMU_LOCK_LOCKKEY_UNLOCK
RTCC_CntPresc_TypeDef presc
RTCC_DayCompareMode_TypeDef dayCompMode
__STATIC_INLINE uint32_t RTCC_ChannelTimeGet(int ch)
Get the calendar TIME register content for selected channel.
__STATIC_INLINE uint32_t RTCC_CombinedCounterGet(void)
Get the combined CNT/PRECNT register content.
#define CMU_LOCK_LOCKKEY_LOCK
RTCC_CapComChMode_TypeDef
#define _RTCC_CTRL_CNTTICK_PRESC
#define _RTCC_CC_CTRL_PRSSEL_PRSCH3
__STATIC_INLINE void RTCC_IntClear(uint32_t flags)
Clear one or more pending RTCC interrupts.
void RTCC_ChannelInit(int ch, RTCC_CCChConf_TypeDef const *confPtr)
Configure the selected capture/compare channel of the RTCC.
void RTCC_Reset(void)
Restore RTCC to its reset state.
#define _RTCC_CC_CTRL_MODE_OFF
#define _RTCC_CTRL_CNTTICK_CCV0MATCH
RTCC_PRSSel_TypeDef prsSel
#define _RTCC_CC_CTRL_CMOA_PULSE
#define _RTCC_CTRL_CNTPRESC_DIV8
__STATIC_INLINE void RTCC_PreCounterSet(uint32_t preCntVal)
Set RTCC pre-counter value.
__STATIC_INLINE uint32_t RTCC_IntGet(void)
Get pending RTCC interrupt flags.
__STATIC_INLINE void RTCC_ChannelDateSet(int ch, uint32_t date)
Set the calendar DATE register for selected channel.
#define _RTCC_CTRL_CNTPRESC_DIV16384
#define _RTCC_CC_CTRL_PRSSEL_PRSCH0
__STATIC_INLINE void RTCC_IntSet(uint32_t flags)
Set one or more pending RTCC interrupts from SW.
#define _RTCC_CC_CTRL_COMPBASE_CNT
#define _RTCC_CTRL_CNTPRESC_DIV4
#define _RTCC_CC_CTRL_CMOA_SET
RTCC_CapComChMode_TypeDef chMode
__STATIC_INLINE uint32_t RTCC_ChannelCCVGet(int ch)
Get RTCC capture/compare register value (CCV) for selected channel.
#define RTCC_POWERDOWN_RAM
#define RTCC_CH_VALID(ch)
#define RTCC_SYNCBUSY_CMD
#define _RTCC_CC_CTRL_COMPBASE_PRECNT
__STATIC_INLINE uint32_t RTCC_PreCounterGet(void)
Get RTCC pre-counter value.
#define _RTCC_CC_CTRL_PRSSEL_PRSCH6
RTCC_CompMatchOutAction_TypeDef
__STATIC_INLINE uint32_t RTCC_StatusGet(void)
Get STATUS register value.
#define _RTCC_CTRL_CNTPRESC_DIV4096
#define _RTCC_CTRL_CNTPRESC_DIV256
#define _RTCC_CTRL_CNTPRESC_DIV8192
#define RTCC_EM4WUEN_EM4WU
#define _RTCC_CC_CTRL_PRSSEL_PRSCH4
#define _RTCC_CC_CTRL_DAYCC_MONTH
#define _RTCC_CC_CTRL_ICEDGE_NONE
#define _RTCC_CC_CTRL_CMOA_TOGGLE
#define _RTCC_CTRL_CNTPRESC_DIV32768
__STATIC_INLINE void RTCC_Lock(void)
Lock RTCC registers.
__STATIC_INLINE void RTCC_IntEnable(uint32_t flags)
Enable one or more RTCC interrupts.
__STATIC_INLINE void RTCC_RetentionRamPowerDown(void)
Power down the retention ram.
#define _RTCC_CC_CTRL_PRSSEL_PRSCH11
#define _RTCC_CTRL_CNTPRESC_DIV1
__STATIC_INLINE uint32_t RTCC_DateGet(void)
Get DATE register value.
#define _RTCC_CC_CTRL_ICEDGE_FALLING
#define _RTCC_CTRL_CNTPRESC_DIV512
#define _RTCC_CTRL_CNTPRESC_DIV2
#define _RTCC_CC_CTRL_PRSSEL_PRSCH9
RTCC_CompBase_TypeDef compBase
__STATIC_INLINE void RTCC_CounterSet(uint32_t value)
Set RTCC CNT counter.
#define _RTCC_CC_CTRL_PRSSEL_PRSCH7
__STATIC_INLINE void RTCC_EM4WakeupEnable(bool enable)
Enable/disable EM4 wakeup capability.
__STATIC_INLINE void RTCC_IntDisable(uint32_t flags)
Disable one or more RTCC interrupts.