64 #include <inc/hw_types.h>
65 #include <inc/hw_memmap.h>
66 #include <inc/hw_ddi.h>
67 #include <inc/hw_ddi_0_osc.h>
88 #define OSCClockSourceSet NOROM_OSCClockSourceSet
89 #define OSCClockSourceGet NOROM_OSCClockSourceGet
90 #define OSCInterfaceEnable NOROM_OSCInterfaceEnable
98 #define LOW_POWER_XOSC 1
99 #define HIGH_POWER_XOSC 0
106 #define OSC_SRC_CLK_HF 0x00000001
107 #define OSC_SRC_CLK_MF 0x00000002
108 #define OSC_SRC_CLK_LF 0x00000004
110 #define OSC_RCOSC_HF 0x00000000
111 #define OSC_XOSC_HF 0x00000001
112 #define OSC_RCOSC_LF 0x00000002
113 #define OSC_XOSC_LF 0x00000003
115 #define SCLK_HF_RCOSC_HF 0
116 #define SCLK_HF_XOSC_HF 1
118 #define SCLK_MF_RCOSC_HF 0
119 #define SCLK_MF_XOSC_HF 1
121 #define SCLK_LF_FROM_RCOSC_HF 0
122 #define SCLK_LF_FROM_XOSC_HF 1
123 #define SCLK_LF_FROM_RCOSC_LF 2
124 #define SCLK_LF_FROM_XOSC_LF 3
430 #if !defined(DRIVERLIB_NOROM) && !defined(DOXYGEN)
432 #ifdef ROM_OSCClockSourceSet
433 #undef OSCClockSourceSet
434 #define OSCClockSourceSet ROM_OSCClockSourceSet
436 #ifdef ROM_OSCClockSourceGet
437 #undef OSCClockSourceGet
438 #define OSCClockSourceGet ROM_OSCClockSourceGet
440 #ifdef ROM_OSCInterfaceEnable
441 #undef OSCInterfaceEnable
442 #define OSCInterfaceEnable ROM_OSCInterfaceEnable
static void AONWUCAuxWakeupEvent(uint32_t ui32Mode)
Control the wake up procedure of the AUX domain.
void DDI16BitWrite(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, uint32_t ui32WrData)
Write a single bit using a 16-bit maskable write.
static void OSCHfSourceSwitch(void)
Switch the high frequency clock.
#define HapiHFSourceSafeSwitch()
static void OSCClockLossEventEnable(void)
Enables OSC clock loss event detection.
#define AUX_WUC_OSCCTRL_CLOCK
uint32_t OSCClockSourceGet(uint32_t ui32SrcClk)
Get the source clock settings.
void DDI16BitfieldWrite(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, uint32_t ui32Shift, uint16_t ui32Data)
Write a bitfield via the DDI using 16-bit maskable write.
void AUXWUCClockDisable(uint32_t ui32Clocks)
Disable clocks for peripherals in the AUX domain.
void OSCInterfaceEnable(void)
Enable System CPU access to the OSC_DIG module.
uint32_t OSCHF_GetStartupTime(uint32_t timeUntilWakeupInMs)
Returns maximum startup time (in microseconds) of XOSC_HF.
bool OSCHF_AttemptToSwitchToXosc(void)
Switch to XOSC_HF if XOSC_HF is ready.
static bool OSCHfSourceReady(void)
Check if the HF clock source is ready to be switched.
static void OSCClockLossEventDisable(void)
Disables OSC clock loss event detection.
#define AONWUC_AUX_ALLOW_SLEEP
uint16_t DDI16BitfieldRead(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Mask, uint32_t ui32Shift)
Read a bitfield via the DDI using 16-bit read.
static void OSCXHfPowerModeSet(uint32_t ui32Mode)
Set Power Mode for High Frequency XTAL Oscillator.
void OSCHF_SwitchToRcOscTurnOffXosc(void)
Switch to RCOSC_HF and turn off XOSC_HF.
void OSCClockSourceSet(uint32_t ui32SrcClk, uint32_t ui32Osc)
Configure the oscillator input to the a source clock.
void OSCHF_TurnOnXosc(void)
Turns on XOSC_HF (but without switching to XOSC_HF).
static void OSCInterfaceDisable(void)
Disable System CPU access to the OSC_DIG module.