Skip to main content
skill CX Codex

datasheet-and-refmanual-reading — Claude Code skill: reading MCU docs

A methodology for agents reading MCU datasheets and reference manuals: register maps, bit fields, clock trees, errata.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add mohitmishra786/low-level-dev-skills --skill datasheet-and-refmanual-reading -a claude-code
Open on GitHub

What datasheet-and-refmanual-reading does

The skill lays out an order for working through documentation on unfamiliar silicon. The datasheet tells you what exists: pinout, maximum ratings, package, headline features. The reference manual tells you how to program it: register maps, bit fields, clock trees, peripheral behaviour. The programming manual covers the Cortex-M core, and the errata sheet lists silicon bugs that need firmware workarounds.

Inside is a first-pass reading order for the RM: memory and bus architecture, reset and clock control, GPIO and pin multiplexing, the target peripheral chapter, the NVIC/EXTI interrupt table, electrical characteristics. For every register it walks through offset from the peripheral base, reset value, read-only and write-1-to-clear bits, and fields that change with mode. A cross-reference chain ties a schematic net to the datasheet pin table, then to the GPIO chapter, then to the peripheral chapter.

Timing and electrical traps get their own pass: setup and hold for external bus modes, ADC sampling time against source impedance, GPIO toggle rate against load capacitance, boot mode pins sampled only at reset. One common mistake the skill calls out: taking the maximum frequency from the datasheet banner instead of the operating conditions table for your voltage range. Another is confusing a datasheet pin name with the alternate function number in the RM. This covers reading docs, not writing drivers — for implementation there is skills/baremetal/peripherals-from-datasheet.

What it helps with

  • locate the right peripheral chapter in a reference manual
  • pull bit fields and reset values out of a register table
  • match a schematic net to its alternate function number
  • check errata before chasing odd peripheral behaviour
  • confirm the baud rate formula and its clock source

Example prompts for the agent

  • /datasheet-and-refmanual-reading Find the USART baud rate formula and required clock source in the RM
  • /datasheet-and-refmanual-reading Walk through the USART_CR1 bit fields and their reset values
  • /datasheet-and-refmanual-reading Check the DMA errata and verify the silicon revision

How to install datasheet-and-refmanual-reading

1Skills CLI (Vercel)

npx skills add mohitmishra786/low-level-dev-skills --skill datasheet-and-refmanual-reading -a claude-code

2Manually: put the files in place

~/.claude/skills/datasheet-and-refmanual-reading/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/datasheet-and-refmanual-reading/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about datasheet-and-refmanual-reading

How do I install datasheet-and-refmanual-reading in Claude?

Run npx skills add mohitmishra786/low-level-dev-skills --skill datasheet-and-refmanual-reading -a claude-code. The skill file then lives at ~/.claude/skills/datasheet-and-refmanual-reading/SKILL.md.

What does datasheet-and-refmanual-reading do?

It gives the agent a method for reading datasheets and reference manuals: which sections matter, how to extract register maps, how to cross-check pinouts, and how to handle errata. It activates when you need to find where in the docs a fact lives.

How is it different from peripherals-from-datasheet?

This skill is about how to read the documentation. skills/baremetal/peripherals-from-datasheet is about writing drivers from it. They are meant to be used together.

Source text

SKILL.md · MIT
---
name: datasheet-and-refmanual-reading
description: Datasheet and reference manual reading skill for embedded engineers. Use when extracting pinouts, electrical limits, register maps, clock trees, or timing from MCU documentation. Activates on queries about reading STM32 RM, extracting register bits, finding errata, or navigating reference manual sections.
---

# Datasheet and Reference Manual Reading

## Purpose

Teach agents a systematic methodology for reading MCU datasheets and reference manuals: which sections matter for firmware, how to cross-reference pin tables with register maps, and how to avoid documentation pitfalls (errata, footnotes, conditional fields). **Not merged** with `skills/baremetal/peripherals-from-datasheet` — this skill covers **how to read docs**; that skill covers **how to write drivers** from them.

## When to Use

- Starting driver work on unfamiliar silicon
- Resolving ambiguous register bit behavior
- Verifying electrical and timing constraints before PCB/firmware sign-off
- Complementing `skills/baremetal/peripherals-from-datasheet` (implementation focus)
- Answering "where in the RM do I find X?"

## Workflow

### 1. Document types

| Document | Primary use |
|----------|-------------|
| Datasheet | Pinout, max ratings, package, brief features |
| Reference Manual (RM) | Register maps, bit fields, clock trees, peripheral behavior |
| Programming Manual (PM) | Cortex-M core, NVIC, MPU, debug (ARM doc) |
| Errata sheet | Silicon bugs that affect firmware workarounds |

Read the datasheet for **what exists**; read the RM for **how to program it**.

### 2. First-pass reading order (RM)

```
1. Memory and bus architecture (address map)
2. Reset and clock control (RCC / CGU)
3. GPIO / pin multiplexing
4. Target peripheral chapter (e.g. USART, SPI, DMA)
5. NVIC / EXTI interrupt mapping table
6. Electrical characteristics (only if timing-critical)
7. Errata — search peripheral name
```

### 3. Register map extraction checklist

For each register:

- Offset from peripheral base (verify against memory map table)
- Reset value (affects read-modify-write defaults)
- Read-only / write-only / write-1-to-clear bits
- Fields that depend on mode (check "Notes" under table)
- Side effects: clearing flags, auto-clear bits, reserved must-write-0

```c
/* Good — named constants from RM bit table */
#define USART_CR1_UE   (1U << 13)
#define USART_CR1_TE   (1U << 3)

/* Bad — magic numbers without RM citation */
*(volatile uint32_t *)0x40011000 = 0x2000;
```

### 4. Pin / signal cross-reference

```
Schematic net → Datasheet pin table (AF number)
             → RM GPIO chapter (MODER, AFR)
             → Peripheral chapter (USART_TX on PA2 = AF7)
```

Always confirm **default state after reset** (analog mode, pull, JTAG pins).

### 5. Timing and electrical traps

- Setup/hold for external bus modes (FSMC, SDIO)
- ADC sampling time vs source impedance (datasheet graph)
- Maximum GPIO toggle rate vs load capacitance
- Boot mode pins sampled only at reset

### 6. Errata workflow

```
Symptom matches errata?
├── Yes → apply documented workaround in driver
└── No  → verify silicon revision (DBGMCU_IDCODE / UID)
```

### 7. Agent usage

```
/datasheet-and-refmanual-reading Find STM32F4 USART baud rate formula and required clock source
```

## Common Problems

| Symptom | Cause | Fix |
|---------|-------|-----|
| Wrong register behavior | Read wrong silicon rev errata | Check ERRATA sheet first |
| AF does not work | Confused DS pin name with RM AF table | Cross-check both tables |
| Intermittent DMA | Missed footnote on buffer alignment | RM DMA chapter notes |
| Clock mismatch | Used max frequency from DS banner, not voltage range table | Use operating conditions table |

## Related Skills

- `skills/baremetal/peripherals-from-datasheet` — driver implementation workflow
- `skills/baremetal/mmio-and-bit-manipulation` — safe register access
- `skills/baremetal/gpio-baremetal` — pin mux from RM tables
- `skills/kernel-dev/device-tree` — bindings mirror RM capabilities for Linux

© mohitmishra786 · MIT · mohitmishra786/low-level-dev-skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set90

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor