<!-- BEGIN HWCC CONTEXT (auto-generated, do not edit) -->
{% if hot_context %}
{{ hot_context }}
{% else %}
# Hardware Context{% if project_name %} — {{ project_name }}{% endif %}

{% if mcu %}
- **MCU**: {{ mcu }}{% if architecture %} ({{ architecture }}{% if clock_mhz %}, {{ clock_mhz }}MHz{% endif %}){% endif %}

{% if flash_kb %}- **Flash**: {{ flash_kb }}KB
{% endif %}
{% if ram_kb %}- **RAM**: {{ ram_kb }}KB
{% endif %}
{% endif %}
{% endif %}
## Hardware Reference

Before writing hardware-related code, read the relevant peripheral context file in `.rag/context/peripherals/` (e.g., `spi1.md`, `tim1.md`). These contain register maps with bit-fields, reset values, and base addresses extracted from SVD files.

Never guess register addresses or bit-field positions. Always verify against the indexed documentation.
{% if mcp_available %}

## MCP Hardware Tools

Use these tools **before** writing hardware code:
- `hw_search(query)` — Search indexed hardware documentation
- `hw_registers(peripheral)` — Get register maps from SVD/docs
- `hw_errata(peripheral?)` — Check for known silicon errata
{% endif %}

> Generated by hwcc v{{ hwcc_version }}{% if generated_at %} on {{ generated_at }}{% endif %}

<!-- END HWCC CONTEXT -->
