Clock Manager Architecture#

Core Components#

The Clock Manager implements the following two-part architecture designed for flexibility and hardware abstraction:

1. Initialization Component (clock_manager)#

  • Purpose: Handles device oscillators and clock tree setup during system boot

  • Configuration: Requires board-specific configuration files (sl_clock_manager_oscillator_config.h, sl_clock_manager_tree_config.h)

  • Integration: Automatically integrated by SL Main/SL System components, called early in initialization sequence

  • Initialization API: sl_clock_manager_init() - must be called before other clock operations

  • Compatibility: Incompatible with legacy device_init_clocks components

  • Component Usage: Should only be added by project files (.slcp) and not included as a dependency in other components (.slcc)

2. Runtime Component (clock_manager_runtime)#

  • Purpose: Provides runtime clock management APIs independent from initialization

  • Capabilities: Frequency queries, bus clock control, oscillator calibration, advanced timing features

  • Initialization API: sl_clock_manager_runtime_init() - can be used standalone

  • Independence: Can operate without the initialization component for applications that handle clock setup externally (e.g., using legacy device_init_clocks or custom initialization sequences)

Hardware Abstraction Layer (HAL)#

The Clock Manager uses a HAL pattern to support multiple device families:

HAL Interface Layer (sli_clock_manager_hal.h)

  • Defines common HAL function signatures for all device families

  • Abstracts hardware differences between Series 2, Series 3, and other variants

  • Provides consistent internal API regardless of underlying hardware

Device-Specific HAL Implementations

  • Series 2 HAL (sl_clock_manager_hal_s2.c): EFx32xG2x families

  • Series 3 HAL (sl_clock_manager_hal_s3.c): Sixx3xx families with enhanced features including SOCPLL support

API Layer Architecture#

Public API Layer (sl_clock_manager.h)

  • Customer-facing API functions with comprehensive input validation

  • Null pointer checks and parameter range validation

  • Delegates to HAL layer for actual implementation

  • Consistent error handling using sl_status_t return values

Dependencies#

The Clock Manager integrates with multiple platform components and hardware interfaces:

Hardware Dependencies#

Component

Function

Integration Details

Crystal Oscillators (HFXO/LFXO)

Precision timing

External crystals for high-precision clock sources, board-specific tuning parameters

Internal Oscillators (HFRCO/LFRCO)

Backup timing

RC oscillators for backup timing sources and low-power operation

Phase-Locked Loops (DPLL/SOCPLL)

Clock multiplication

Device-specific PLLs for clock frequency multiplication and precision enhancement

Clock Management Unit (CMU)

Clock distribution

Hardware clock tree and oscillator control registers

Power Domains

Power management

Integration with hardware power management units for oscillator power control

Software Dependencies#

Component

Dependency Level

Purpose

Device Manager

Required

Hardware abstraction and device-specific feature detection for clock branch mapping

Configuration Files

Required

Board-specific oscillator and clock tree configuration headers

SL Main/SL System

Recommended

Proper initialization sequencing and component lifecycle management

Power Manager

Recommended

Coordination for low-power clock management and sleep modes

Development Tool Dependencies#

  • Simplicity Studio: IDE integration for configuration and debugging

  • Universal Configurator: Visual clock tree configuration interface and parameter validation

  • Board Configuration Files: Device-specific timing parameters and crystal specifications for hardware setup