dma-baremetal

dma-baremetal is a skill for Claude Code, Codex from mohitmishra786/low-level-dev-skills. It costs 54 tokens per session (623 once invoked), scanned A, original, MIT.

Guidance for using direct memory access, or DMA, to move data between memory and hardware peripherals without making the processor handle every transfer.

In plain words
What is it for?
Use it for UART, SPI, or ADC transfers; circular buffers; double buffering; transfer interrupts; and cache handling on Cortex-M7 devices.
Why use it?
It helps reduce processor work and troubleshoot missing transfers, corrupted data, and streaming workloads that need continuous movement of data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for UART, SPI, or ADC transfers; circular buffers; double buffering; transfer interrupts; and cache handling on Cortex-M7 devices.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mohitmishra786/low-level-dev-skills/dma-baremetal
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mohitmishra786/low-level-dev-skills --skill dma-baremetal
Clone the repo
git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for dma-baremetal

README.md
[![agentmods](https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/dma-baremetal/github.svg)](https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/dma-baremetal)
Your own site
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/dma-baremetal"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/dma-baremetal/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for dma-baremetal

Your own site · 80×15
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/dma-baremetal"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/dma-baremetal.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 623 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00054 $0.00623
Opus 5 $0.00027 $0.00311
Sonnet 5 $0.00011 $0.00125
Haiku 4.5 $0.00005 $0.00062

Measured 11d ago against content hash 53952a831378, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

dma-baremetal scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/baremetal/dma-baremetal/SKILL.md · 73 lines

What it actually says

DMA (Bare-Metal)

Purpose

Configure DMA controllers for memory-to-peripheral and peripheral-to-memory transfers: channel/stream setup, burst sizes, circular mode, half-transfer interrupts, and cache coherency on Cortex-M7.

When to Use

  • Offloading UART/SPI/ADC bulk transfers from CPU
  • Audio/streaming double buffers
  • Debugging DMA not triggering or corrupt data

Workflow

1. STM32 DMA2 stream (periph→mem)

/* UART2 RX DMA — Stream5, Channel 4 (verify RM matrix) */
RCC->AHB1ENR |= RCC_AHB1ENR_DMA1EN;

DMA1_Stream5->PAR  = (uint32_t)&USART2->DR;
DMA1_Stream5->M0AR = (uint32_t)rx_buf;
DMA1_Stream5->NDTR = sizeof(rx_buf);
DMA1_Stream5->CR   = DMA_SxCR_MINC     /* mem increment */
                   | DMA_SxCR_TCIE    /* transfer complete IRQ */
                   | DMA_SxCR_CHSEL_2 /* channel 4 */
                   | DMA_SxCR_EN;

USART2->CR3 |= USART_CR3_DMAR;

2. Circular / double buffer

DMA1_Stream5->CR |= DMA_SxCR_CIRC;  /* auto-reload NDTR */
/* HTIF = first half, TCIF = second half — process in IRQ */

3. Cortex-M7 cache (H7)

DMA buffer in non-cacheable region or clean/invalidate D-Cache:

SCB_CleanDCache_by_Addr((void*)tx_buf, len);
/* after DMA TX */
SCB_InvalidateDCache_by_Addr((void*)rx_buf, len);

4. Agent usage

/dma-baremetal Configure UART RX DMA circular buffer on STM32F4

Common Problems

Symptom Cause Fix
DMA no start Stream/channel mismatch RM DMA request mapping table
Corrupt RX Cache coherency (M7) Invalidate after RX complete
NDTR stuck Peripheral DMA enable missing USART_CR3 DMAR/DMAT
IRQ flood Clear flags in ISR DMA_LISR/HIFCR
  • skills/baremetal/uart-serial-baremetal — USART DMA enable
  • skills/baremetal/adc-dac-baremetal — ADC DMA mode
  • skills/low-level-programming/cpu-cache-opt — cache line concepts
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 73 lines · 54 tokens per session scan A 53952a831378

Subscribe to this mod's changes

dma-baremetal is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (202 stars, last pushed 2mo ago), licensed MIT. It adds 54 tokens to every session and 623 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

fusion-360

Comprehensive operational skill specification for Anthropic Claude to automate, script, troubleshoot, and optimize Autodesk Fusion (Fusion 360), Python API (adsk.fusion), Parametric Timeline, and CAM toolpaths.

alivirgo/Major-AI-Skills · 46 tokens

altium-designer

Automate Altium Designer PCB workflows with DXP scripts, design-rule checks, OutJob fabrication outputs, and routing configuration.

alivirgo/Major-AI-Skills · 30 tokens

eartrumpet

Inspect and route per-application audio with EarTrumpet, WASAPI, and pycaw; troubleshoot audio sessions and output devices.

alivirgo/Major-AI-Skills · 32 tokens

codesys

Develop CODESYS Structured Text and Python ScriptEngine workflows; troubleshoot fieldbus and OPC UA integration in a test environment.

alivirgo/Major-AI-Skills · 27 tokens

pcbway

PCBWay PCB fabrication and assembly — turnkey/consigned assembly, design rules, ordering workflow. Alternative to JLCPCB for manufacturing. Use with KiCad. Use this skill when the user mentions PCBWay, needs turnkey assembly (PCBWay sources parts by MPN), has parts not available on LCSC, needs assembled boards with…

aklofas/kicad-happy · 119 tokens

unifi-protect

How to manage UniFi Protect cameras and NVR — view cameras, smart detections, Find Anything detection search, recordings, snapshots, lights, sensors, Known Faces, license plates, and the Alarm Manager. Use this skill when the user mentions UniFi cameras, security cameras, NVR, recordings, motion detection, person…

sirkirby/unifi-mcp · 112 tokens