HFXO Manager is a platform service module intended to manage the High Frequency Crystal Oscillator (HFXO) module and offer related functionalities and services. For the moment, this module is only supported on Silicon Labs series 2 devices. Among others, it handles the HFXO startup failures. This is to support sleepy crystals (crystals where the ESR value could change unexpectedly up to 5 times its value during the startup). In case of a failure during the HFXO startup, the HFXO Manager will retry the startup process with more aggressive settings (sleepy crystal settings) to try waking up the crystal from its sleepy state so that the ESR value can fall back to normal values. Once the crystal is out of its sleepy state, the module will put back the normal settings ensuring the right oscillation frequency. This feature can be enabled/disabled via the configuration define SL_HFXO_MANAGER_SLEEPY_CRYSTAL_SUPPORT. The module catches startup failures through interrupts using the HFXO interrupt handler. If your application also needs the HFXO interrupt handler, the configuration define SL_HFXO_MANAGER_CUSTOM_HFXO_IRQ_HANDLER can be used to remove the HFXO interrupt handler definition from the HFXO Manager so that it can be defined in your application. In that case, your definition of the HFXO Interrupt Handler will need to call the sl_hfxo_manager_irq_handler() function so that HFXO Manager can continue to work properly. The HFXO Manager is also required by the Power Manager module for some internal features and therefore becomes mandatory every time the Power Manager is present.
Two functions are required to initialize the module. sl_hfxo_manager_init_hardware() is to initialize the HFXO interrupts and must therefore be called before any other HFXO initialization functions like the emlib CMU_HFXOInit() or device_init function sl_device_init_hfxo(). The second initialization function sl_hfxo_manager_init() is required for internal use and needs to be called before going to sleep.
|Sleepy Crystal settings. |
|HFXO Manager module hardware specific initialization. |
|Initialize HFXO Manager module. |
|sl_status_t||sl_hfxo_manager_update_sleepy_xtal_settings (sl_hfxo_manager_sleepy_xtal_settings_t *settings)|
|Updates Sleepy Crystal settings. |
|When this callback function is called, it means that HFXO failed twice in a row to start with normal configurations. |
|HFXO Manager HFXO interrupt handler. |
HFXO Manager module hardware specific initialization.
Initialize HFXO Manager module.
- Status Code.
|sl_status_t sl_hfxo_manager_update_sleepy_xtal_settings||(||sl_hfxo_manager_sleepy_xtal_settings_t *||)|
Updates Sleepy Crystal settings.
Pointer to settings structure
- Status Code.
- Those settings are temporarily used to force oscillation on sleepy crystal. Default values should be enough to wake-up sleepy crystals. Otherwise, this function can be used.
When this callback function is called, it means that HFXO failed twice in a row to start with normal configurations.
This may mean that there is a bad crystal. When getting this callback, HFXO is running but its properties (frequency, precision) are not guaranteed. This should be considered as an error situation.
HFXO Manager HFXO interrupt handler.
- This function must be called by the HFXO interrupt handler in order to support the HFXO Manager module. This function handles the HFXO_IF_RDY, HFXO_IF_DNSERR and HFXO_XTALCTRL_SKIPCOREBIASOPT interrupt flags.