mcu-peripheral-debug

Inspect and modify MCU peripheral registers and bit fields from workspace SVD files.

5|1|Updated Jul 12, 2026
One-click install
npx skills add https://github.com/BakeSheep/EmberProbe-MCU-Flash-Debug --skill mcu-peripheral-debug-bakesheep
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: mcu-peripheral-debug
Source: https://github.com/BakeSheep/EmberProbe-MCU-Flash-Debug/tree/main/skills/mcu-peripheral-debug
Command: npx skills add https://github.com/BakeSheep/EmberProbe-MCU-Flash-Debug --skill mcu-peripheral-debug-bakesheep

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Debugging embedded firmware often requires reading and tweaking hardware peripheral registers (GPIO, timers, UART, clocks), which normally means manually parsing SVD files and crafting raw debug probe commands. This Skill automates SVD lookup, register decoding, and safe read/write access through a paused Cortex-Debug session. ## Core Features & Use Cases - SVD Search and Listing: Query the workspace-bound SVD to find peripherals, registers, and bit fields without touching hardware. - Decoded Register Reads: Read named registers like GPIOA.MODER or USART1.SR and get exact hex values plus decoded fields and enumeration names, with batch preflight validation. - Confirmed Safe Writes: Register writes return a plan first and only execute after explicit per-write confirmation, with readback verification and rejection of write-only or side-effect registers. - Use Case: While debugging a UART communication issue, pause the target, read USART1.SR to decode status flags, then change GPIOA.MODER.MODE0 to Output with a confirmed write to reroute a signal. ## Quick Start Ask the agent to list GPIO peripherals from the workspace SVD and read the current value of GPIOA.MODER while the debug session is paused.

Frequently Asked Questions about mcu-peripheral-debug

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read MCU peripheral registers during a debug session?▼

Pause the Cortex-Debug session, then run the peripheral script with --read followed by comma-separated register paths like GPIOA.MODER,USART1.SR. The result includes exact hexadecimal values plus decoded bit fields and enumeration names from the SVD.

How do I search an SVD file for peripherals without hardware?▼

Run the script with --list and an optional --query filter such as gpio. Listing only parses the workspace-bound SVD, so it works without a debug session or connected target, but requires an SVD to be configured first.

Can I write to peripheral registers while the target is running?▼

No. Writes require a unique paused Cortex-Debug session and explicit confirmation. The first --set call returns a write plan; only after approval with the returned confirmation ID does the write execute, followed by readback verification.

Why does a peripheral write fail with INVALID_PERIPHERAL_WRITE_VALUE?▼

The value does not match the field's declared type or enumerations in the SVD. Check details.allowedEnumerations in the error for valid names, and use decimal or hexadecimal values instead of guessing enumeration strings.

What registers cannot be read or written with this approach?▼

Write-only registers and reads with SVD-declared side effects are refused, and writes to registers with side effects or write-once semantics are rejected. Only ordinary read-write registers are permitted.