Configuration

Informative

A worked MCU configuration, using the YAML configuration model (the toolchain and file format are implementation-defined). The full property tables are in Configuration Reference; the binding rule is CHI-MCU-MUST-13.

Clock settings

The McuDrv configuration is small: a General section and a ConfigSet holding a list of clock settings. Each clock setting is applied by Mcu_InitClock(clockId), where clockId is the setting’s index in the list.

general:
  enable_development_error_reporting: true

config_set:
  - config_set_name: "McuCfg"
    clock_settings:
      # clockId 0 — e.g. the main run-mode clock
      - # ClockSetting content is implementation-defined (tightly HW-dependent):
        # PLL/oscillator sources, dividers, target frequencies, distribution, ...
      # clockId 1 — e.g. a low-frequency fallback
      - # ...

Notes

  • ``ClockSetting`` is implementation-defined. Its contents depend heavily on the MCU hardware (clock sources, dividers, PLL/FLL stabilisation, peripheral clock distribution). The specification only mandates that the driver support a list of at least one clock setting selectable by id.

  • ``clockId`` is the list index. Mcu_InitClock(0) applies the first clock setting, Mcu_InitClock(1) the second, and so on; an out-of-range id is a development error.