s32ct-clocks-info
Looks up what clocks, oscillators, PLLs, dividers, selectors, gates, peripheral clock outputs and power modes are configurable on a given MCU/RTD/package combination, and how each is configured in the
Files3
View on GitHubSKILL.mdskills/s32ct/s32ct-clocks-info/SKILL.md
GitHubS32CT Clocks Info
Look up what and how the clock tree of a specific
(MCU, RTD, package) combination can be configured in the S32
Configuration Tools Clocks tool, by parsing the XML data model shipped
with the installed Real-Time Drivers / Platform SDK. Read-only -
answers questions about clock sources, PLLs, dividers, selectors, gates,
peripheral clock outputs, register writes and power modes. Companion of
s32ct-pins-info and s32ct-peripherals-info for the Clocks tool.
When to use
- Use for: enumerating available clock sources, dividers, selectors,
gates, fractional dividers, peripheral clock outputs; discovering the
configurable attributes and legal values of a clock module; locating
the register / bit-field that the Clocks tool writes for a given
choice; mapping
clock_source -> selector -> divider -> gate -> peripheral_clock_output; diagnosing why a setting is missing; authoring or validating the<clocks>block of a.mex. - Do not use this skill for: modifying a
.mex(uses32ct-clocks-graft-mex,s32ct-generate-mex-config, or the Clocks CLI); generatingClock_Ip_Cfg.[ch]driver code (uses32ct-generate-codewithtool_name="Clocks"); pin or peripheral queries (uses32ct-pins-info/s32ct-peripherals-info).
Available Capabilities
This skill is read-only. The capabilities below only inspect the Clocks
data model; none of them modify a .mex, generate code, or execute a
CLI.
| Type | Name | Invocation |
|---|---|---|
| Query | Clock-tree overview | mcu="S32K312", package="S32K312_172HDQFP" |
| Query | Resolve a clock point / frequency | query="CAN_PE_CLK" |
| Reference | Full XML anatomy and filter schema | references/clock-inspection.md |
| Reference | Worked query examples | references/examples.md |
| Data | <S32DS>/eclipse/mcu_data/processors/<mcu>/<platform_sdk>/clocks/<package>/ |
The per-package XML data model consumed by this skill. |
Post 16->5 tool mapping
Write-side and CLI actions belong to the sibling skills listed below. They are documented here only so the agent knows where to hand off - this skill never invokes them.
| Sibling skill id | MCP call to use |
|---|---|
s32ct-cli |
nxp_s32ct_execute_action(action_name="s32ct.configure_cli", params={...}) |
s32ct-clocks-facade |
nxp_s32ct_execute_action(action_name="s32ct.configure_clocks", params={...}) |
s32ct-generate-code |
nxp_s32ct_execute_action(action_name="s32ct.generate_code", params={...}) |
Quickstart
Resolve paths from
mcu,package, andplatform_sdk(defaults to the sole subfolder undermcu_data/processors/<mcu>/when exactly one exists):<S32DS_INSTALL>/eclipse/mcu_data/processors/<mcu>/<platform_sdk>/clocks/<package>/Overview of the data model for a package:
{ "mcu": "S32K312", "package": "S32K312_172HDQFP", "include_register_writes": false }Returns the discovered XML files, clock sources, output-signal counts, power modes, and top-level
<configuration_element>entries.Modes and register writes for one module:
{ "mcu": "S32K312", "package": "S32K312_172HDQFP", "filter": { "module": "FXOSC" } }What feeds a peripheral clock:
{ "mcu": "S32K312", "package": "S32K312_172HDQFP", "filter": { "output": "LPUART2_CLK" } }Lookup by register bit-field:
{ "mcu": "S32K312", "package": "S32K312_172HDQFP", "filter": { "register": "FXOSC::CTRL", "bit_field": "OSCON" } }
More payloads in references/examples.md. Enumeration internals and the
XML/.mex mapping are in references/clock-inspection.md.
Configuration
| Name | Type | Required | Description |
|---|---|---|---|
mcu |
string | yes | Folder name under mcu_data/processors/. Case-sensitive. |
package |
string | yes | Folder name under clocks/. Case-sensitive. |
platform_sdk |
string | no | Defaults to the sole subfolder when exactly one exists. |
s32ds_install |
string | no | Override of the S32CT install root. MCP auto-discovers desktop or integrated_s32ds at startup - see s32ct-distributions. |
query |
string | no | Free-form question, fuzzy-matched. |
filter |
object | no | Structured filter (see references/clock-inspection.md). AND-combined. |
include_register_writes |
bool | no | Default true. Include <assign register="..." bit_field="..."/> rows. |
include_constraints |
bool | no | Default true. Include <constraint> / <enable> rules. |
max_results |
int | no | Default 200. |
Guardrails
Scope. Reads files only from
<S32DS_INSTALL>/eclipse/mcu_data/.../clocks/<package>/. Does not modify
any project, .mex, target memory, or system state. Idempotent and safe
to call multiple times.
Destructive actions. None. Purely read-only.
Refuse-and-escalate. Refuses when required MCU/SDK/package
directories are missing, when the clocks directory contains no XML, or
when a filter references an unknown key - returns an actionable error
listing available alternatives. Never invents <configuration_element>
ids, <item> values, register names, or bit-field names; quotes only
what is present in the XML.
Validation loop
- Resolve
mcu->platform_sdk->packagepaths and confirm each directory exists. On failure, return the error template listing available subfolders (s32ct-clocks-infonever raises). - Discover
.xmlfiles by listing the clocks directory. Ignore.dsn(binary GUI diagram) and other non-XML assets. - Parse each
.xml. The root may be<clocks:top_level>,<clocks:component>, or<clocks:power_modes>- strip theclocks:prefix before iterating, otherwise namespace matching silently skips every child. - Build the in-memory index keyed by module id,
<clock_source id>,<output_clock_signal id>,<input_clock_signal id>,<configuration_element id>,<power_mode id>, and every<assign register bit_field/>. - Apply
filter(indexed fast path) and/orquery(fuzzy fallback); walk matched nodes and emit verbatim XML excerpts. Never paraphrase attribute values. - Pass = every filter key resolves and the answer includes verbatim
<configuration_element>/<assign>/<clock_source>/<map_output>/<power_mode>/<constraint>evidence, capped atmax_resultswith a truncation note when needed. Fail = any filter key is unknown or matches nothing - return the "closest matches" error.
Out of scope
- Modifying
.mexfiles, driver sources, or any installed tooling. - Pin-tool and Peripherals-tool queries (use
s32ct-pins-info/s32ct-peripherals-info). - Executing code on target hardware or reading target memory.
- Parsing
.dsnGUI vector diagrams for authoring data. - Guessing values not present in the XML - RTD versions and MCUs diverge, only the XML is authoritative.
See Also
references/clock-inspection.md- the XML data-model layout (TOP.xml,FXOSC.xml,SXOSC.xml,MODULE_CLOCKS.xml,POWER_MODES.xml), schema element table, filter schema, output format, behaviour rules, the exact XML <->.mexmapping used when authoring the<clocks>block, the pre-insertion checklist, hand-off chain, and full error-message templates.references/examples.md- worked example payloads for the five most common query patterns (package overview, single-module details, peripheral-clock trace, register-bit lookup, power modes).- Related skills:
s32ct-pins-info(Pins-tool data model),s32ct-peripherals-info(Peripherals-tool data model),s32ct-clocks-graft-mex(write-side: apply presets / tweak / lift),s32ct-generate-mex-config(bake settings into a.mex),s32ct-generate-code(tool_name="Clocks"- emitClock_Ip_Cfg.[ch]andClock_Ip_Cfg_Defines.h),s32ct-distributions(install-root discovery).