#include "../inc/hw_types.h"#include "../inc/hw_ccfg.h"#include "../inc/hw_fcfg1.h"#include "aon_batmon.h"#include "aon_rtc.h"#include "osc.h"#include "setup_rom.h"Data Structures | |
| struct | OscHfGlobals_t |
| struct | insertion_t |
Macros | |
| #define | RTC_CV_TO_MS(x) (( 1000 * ( x )) >> 16 ) |
| #define | RTC_CV_TO_US(x) (( 1000000 * ( x )) >> 16 ) |
| #define | D1OFFSET_p25C -24 |
| #define | D2OFFSET_p85C -36 |
| #define | D3OFFSET_m40C 18 |
| #define | P3_POLYNOMIAL -47 |
| #define | N_INSERTIONS 3 |
Functions | |
| void | OSCClockSourceSet (uint32_t ui32SrcClk, uint32_t ui32Osc) |
| Configure the oscillator input to the a source clock. More... | |
| uint32_t | OSCClockSourceGet (uint32_t ui32SrcClk) |
| Get the source clock settings. More... | |
| uint32_t | OSCHF_GetStartupTime (uint32_t timeUntilWakeupInMs) |
| Returns maximum startup time (in microseconds) of XOSC_HF. More... | |
| void | OSCHF_TurnOnXosc (void) |
| Turns on XOSC_HF (but without switching to XOSC_HF). More... | |
| bool | OSCHF_AttemptToSwitchToXosc (void) |
| Switch to XOSC_HF if XOSC_HF is ready. More... | |
| void | OSCHF_SwitchToRcOscTurnOffXosc (void) |
| Switch to RCOSC_HF and turn off XOSC_HF. More... | |
| void | OSC_AdjustXoscHfCapArray (int32_t capArrDelta) |
| Adjust the XOSC HF cap array relative to the factory setting. More... | |
| static void | InitializeMeasurmentSet (insertion_t *pInsertion, uint32_t registerAddress, int32_t deltaOffset, int32_t p3PolOffset) |
| static void | FindPolynomialsAndUpdateGlobals (insertion_t *pMeasurment) |
| void | OSC_HPOSC_Debug_InitFreqOffsetParams (HposcDebugData_t *pDebugData) |
| Debug function to calculate the HPOSC polynomials for experimental data sets. More... | |
| void | OSC_HPOSCInitializeFrequencyOffsetParameters (void) |
| HPOSC initialization function. Must always be called before using HPOSC. More... | |
| int32_t | OSC_HPOSCRelativeFrequencyOffsetGet (int32_t tempDegC) |
| Calculate the temperature dependent relative frequency offset of HPOSC. More... | |
| int16_t | OSC_HPOSCRelativeFrequencyOffsetToRFCoreFormatConvert (int32_t HPOSC_RelFreqOffset) |
| Converts the relative frequency offset of HPOSC to the RF Core parameter format. More... | |
| void | OSC_HPOSCRtcCompensate (int32_t relFreqOffset) |
| Compensate the RTC increment based on the relative frequency offset of HPOSC. More... | |
| uint32_t | OSCHF_DebugGetCrystalAmplitude (void) |
| Get crystal amplitude (assuming crystal is running). More... | |
| uint32_t | OSCHF_DebugGetExpectedAverageCrystalAmplitude (void) |
| Get the expected average crystal amplitude. More... | |
Variables | |
| static int16_t | _hpOscPolynomials [4] |
| static OscHfGlobals_t | oscHfGlobals |
| #define D1OFFSET_p25C -24 |
Referenced by OSC_HPOSCInitializeFrequencyOffsetParameters().
| #define D2OFFSET_p85C -36 |
Referenced by OSC_HPOSCInitializeFrequencyOffsetParameters().
| #define D3OFFSET_m40C 18 |
Referenced by OSC_HPOSCInitializeFrequencyOffsetParameters().
| #define N_INSERTIONS 3 |
Referenced by FindPolynomialsAndUpdateGlobals().
| #define P3_POLYNOMIAL -47 |
Referenced by FindPolynomialsAndUpdateGlobals(), and OSC_HPOSCInitializeFrequencyOffsetParameters().
| #define RTC_CV_TO_MS | ( | x | ) | (( 1000 * ( x )) >> 16 ) |
Referenced by OSCHF_GetStartupTime().
| #define RTC_CV_TO_US | ( | x | ) | (( 1000000 * ( x )) >> 16 ) |
Referenced by OSCHF_AttemptToSwitchToXosc(), and OSCHF_GetStartupTime().
|
static |
Referenced by OSC_HPOSC_Debug_InitFreqOffsetParams(), and OSC_HPOSCInitializeFrequencyOffsetParameters().
|
static |
Referenced by OSC_HPOSC_Debug_InitFreqOffsetParams(), and OSC_HPOSCInitializeFrequencyOffsetParameters().
|
static |
Referenced by FindPolynomialsAndUpdateGlobals(), and OSC_HPOSCRelativeFrequencyOffsetGet().
|
static |