35 #if defined(BURTC_PRESENT)
68 __STATIC_INLINE uint32_t divToLog2(uint32_t div)
73 EFM_ASSERT((div > 0) && (div <= 32768));
76 log2 = (31 - __CLZ(div));
90 __STATIC_INLINE
void regSync(uint32_t mask)
102 while (
BURTC->SYNCBUSY & mask)
138 EFM_ASSERT((burtcInit->
clkDiv >= 1) && (burtcInit->
clkDiv <= 128));
143 EFM_ASSERT((burtcInit->
enable ==
false) ||
144 ((burtcInit->
enable ==
true)
155 presc = divToLog2(burtcInit->
clkDiv);
209 EFM_ASSERT(comp == 0);
216 BURTC->COMP0 = value;
231 EFM_ASSERT(comp == 0);
void BURTC_Reset(void)
Restore BURTC to reset state.
#define BURTC_SYNCBUSY_LPMODE
#define _BURTC_CTRL_PRESC_DIV1
#define _BURTC_CTRL_LPCOMP_SHIFT
#define _BURTC_CTRL_DEBUGRUN_SHIFT
#define BURTC_CTRL_CLKSEL_LFXO
__STATIC_INLINE unsigned int BUS_RegBitRead(volatile const uint32_t *addr, unsigned int bit)
Perform a single-bit read operation on a peripheral register.
void BURTC_Init(const BURTC_Init_TypeDef *burtcInit)
Initialize BURTC.
#define _RMU_CTRL_BURSTEN_SHIFT
uint32_t SystemLFXOClockGet(void)
Get low frequency crystal oscillator clock frequency for target system.
#define _BURTC_CTRL_PRESC_SHIFT
#define _BURTC_CTRL_PRESC_MASK
BURTC_ClkSel_TypeDef clkSel
BURTC_LP_TypeDef lowPowerMode
#define _BURTC_CTRL_RSTEN_SHIFT
#define BURTC_SYNCBUSY_COMP0
uint32_t BURTC_CompareGet(unsigned int comp)
Get BURTC compare value.
uint32_t SystemULFRCOClockGet(void)
Get ultra low frequency RC oscillator clock frequency for target system.
#define BURTC_CTRL_CLKSEL_NONE
__STATIC_INLINE void BURTC_IntClear(uint32_t flags)
Clear one or more pending BURTC interrupts.
Backup Real Time Counter (BURTC) peripheral API.
#define BURTC_FREEZE_REGFREEZE
#define _BURTC_CTRL_BUMODETSEN_SHIFT
#define _BURTC_CTRL_CLKSEL_MASK
uint32_t SystemLFRCOClockGet(void)
Get low frequency RC oscillator clock frequency for target system.
#define BURTC_CTRL_CLKSEL_ULFRCO
__STATIC_INLINE void BURTC_FreezeEnable(bool enable)
Freeze register updates until enabled.
__STATIC_INLINE void BURTC_Enable(bool enable)
Enable or Disable BURTC peripheral reset and start counter.
__STATIC_INLINE void BUS_RegBitWrite(volatile uint32_t *addr, unsigned int bit, unsigned int val)
Perform a single-bit write operation on a peripheral register.
#define BURTC_CTRL_CLKSEL_LFRCO
uint32_t BURTC_ClockFreqGet(void)
Get clock frequency of the BURTC.
void BURTC_CounterReset(void)
Reset counter.
#define _BURTC_CTRL_COMP0TOP_SHIFT
void BURTC_CompareSet(unsigned int comp, uint32_t value)
Set BURTC compare channel.