stm32f411-blackpill

stm32f411-blackpill is a skill for Claude Code, Codex from alexex1993/mcu-skills. It costs 0 tokens per session (2,581 once invoked), scanned A, original, MIT.

Board-specific instructions and templates for developing firmware on the WeAct Studio Black Pill, an STM32F411CEU6 microcontroller board, and compatible boards.

In plain words
What is it for?
Starting STM32Cube HAL or PlatformIO projects, configuring the board's clocks and peripherals, using USB or the real-time clock, and building or flashing firmware.
Why use it?
They provide the board's pin details, clock setup, flashing process, and known pitfalls needed to avoid hardware-specific mistakes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: reads .claude/ paths.

Good fit Starting STM32Cube HAL or PlatformIO projects, configuring the board's clocks and peripherals, using USB or the real-time clock, and building or flashing firmware.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alexex1993/mcu-skills/stm32f411-blackpill
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 alexex1993/mcu-skills --skill stm32f411-blackpill
Clone the repo
git clone --depth 1 https://github.com/alexex1993/mcu-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 stm32f411-blackpill

README.md
[![agentmods](https://agentmods.dev/badge/skills/alexex1993/mcu-skills/stm32f411-blackpill/github.svg)](https://agentmods.dev/skills/alexex1993/mcu-skills/stm32f411-blackpill)
Your own site
<a href="https://agentmods.dev/skills/alexex1993/mcu-skills/stm32f411-blackpill"><img src="https://agentmods.dev/badge/skills/alexex1993/mcu-skills/stm32f411-blackpill/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 stm32f411-blackpill

Your own site · 80×15
<a href="https://agentmods.dev/skills/alexex1993/mcu-skills/stm32f411-blackpill"><img src="https://agentmods.dev/badge/skills/alexex1993/mcu-skills/stm32f411-blackpill.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,581 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.00000 $0.02581
Opus 5 $0.00000 $0.01290
Sonnet 5 $0.00000 $0.00516
Haiku 4.5 $0.00000 $0.00258

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

Security

Grade A, and why

stm32f411-blackpill 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 12d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (template/variants/new-project.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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/stm32/stm32f411-blackpill/SKILL.md · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WeAct "Black Pill" — STM32F411CEU6

Board-specific firmware knowledge. The two reference files hold the detail — read the one you need rather than guessing, because most of the failure modes below are silent (the board runs, just wrongly).

  • reference/board-hardware.md — complete hardware reference: pin map for the 48-pin package with every alternate function, power tree, memory map, boot modes, plus a full development guide (Part II: §12 PlatformIO, §13 bring-up order, §14 peripheral cookbook, §15 F4/M4 gotchas, §16 flashing and recovery, §17 pitfall table).
  • reference/recipes.md — copy-paste-ready code: platformio.ini, board.h, the clock tree, RTC on the LSE crystal, the calibrated temperature sensor, the complete USB CDC stack.
  • template/ — a complete working project that builds and flashes, plus a scaffolding script. It is where every recipe was extracted from; see template/README.md.

Orientation

MCU STM32F411CEU6, Cortex-M4F, 512 KB flash, 128 KB SRAM, UFQFPN48, 100 MHz max
Crystals HSE 25 MHz on PH0/PH1, LSE 32.768 kHz on PC14/PC15 — both fitted from the factory
Working clock tree PLL M25/N192/P2/Q4 → SYSCLK 96 MHz, HCLK 96, PCLK1 48, PCLK2 96, USB 48
LED / button PC13 lit = LOW (anode on 3V3) / K1 on PA0 pressed = LOW, needs a pull-up
USB USB-C straight to USB_OTG_FS on PA11/PA12. No USB-serial chip on the board
Flashing ROM DFU over that same USB-C (0483:DF11), entered by hand with BOOT0 + NRST
Debug SWD on the 4-pin header: 3V3, PA13 (SWDIO), PA14 (SWCLK), GND
ADC ADC1 only, 10 external channels (PA0–PA7, PB0, PB1). No DAC. VDDA = VREF+ = the 3V3 LDO
Storage unpopulated SOIC-8 pad underneath for an SPI flash on SPI1 (PA4–PA7)

Rules that prevent the expensive mistakes

Check these before writing code — each one produces a failure that looks like something else.

  1. Define SysTick_Handler() yourself. framework-stm32cube ships no stm32f4xx_it.c, and the startup file's weak handler is an infinite loop. Without void SysTick_Handler(void) { HAL_IncTick(); } the board boots and then hangs in the first HAL_Delay() — which reads like a clock problem and is not. This is the single most common way a first project on this board fails.
  2. 96 MHz, not 100. USB_OTG_FS needs exactly 48 MHz off PLLQ, which divides the same VCO as PLLP. No integer pair gives 100 MHz and 48 MHz together. PLLM 25 / PLLN 192 / PLLP 2 / PLLQ 4. Set SYSCLK to 100 and USB silently never enumerates.
  3. FLASH_LATENCY_3 at 96 MHz, and PWR_REGULATOR_VOLTAGE_SCALE1 (after __HAL_RCC_PWR_CLK_ENABLE()) because Scale 2 caps at 84 MHz. Too few wait states → hard fault on the first fetch past the clock switch.
  4. -DHSE_VALUE=25000000 in build_flags. CubeF4's default template happens to be 25 MHz already, so it works by luck — until someone drops in a CubeMX-generated stm32f4xx_hal_conf.h written for an 8 MHz board and every baud rate and timer period shifts by 3.125× with no error.
  5. PC13 is lit by a LOW level and sits behind the backup-domain power switch: 3 mA maximum, GPIO_SPEED_FREQ_LOW, and never as a current source. Same limit applies to PC14/PC15, which are the LSE crystal here anyway.
  6. K1 on PA0 needs GPIO_PULLUP — not every revision fits an external one, and PA0 is one of only two pins on this package that are not 5 V tolerant (the other is PB5).
  7. Backup domain before RTC: __HAL_RCC_PWR_CLK_ENABLE() then HAL_PWR_EnableBkUpAccess(), or the LSE configuration reports success and the clock never starts. Expect the LSE itself to take ~2 s to stabilise on a cold start — that pause is normal, not a hang.
  8. HAL_RTC_GetTime() before HAL_RTC_GetDate(), always. The F4's calendar sits in shadow registers that unlock only after both are read. Reversed, the date freezes — a bug that first shows up at midnight.
  9. The temperature sensor is ADC channel 18 on the F411, not 16, and it shares that channel with the VBAT divider. Use ADC_CHANNEL_TEMPSENSOR and never call HAL_ADCEx_EnableVBAT(). F401 examples — which is most Black Pill material online — use channel 16 and return a plausible wrong number.
  10. Any internal ADC channel needs ADC_SAMPLETIME_480CYCLES (≥ 10 µs per the datasheet). The 3-cycle default reads noise. And use the factory calibration at 0x1FFF7A2A/2C/2E rather than the datasheet's typical 2.5 mV/°C — VDDA here is just an LDO output, not a reference.
  11. The USB device library is not in the framework. framework-stm32cubef4 has no STM32_USB_Device_Library; vendor usbd_core/ctlreq/ioreq/cdc into lib/. And point USBD_malloc at a static buffer — ST's default is malloc() against a 0x200-byte heap, which fails silently and the device never appears.

Read the full file on GitHub · 139 lines

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. 12d ago First seen · 139 lines · 0 tokens per session scan A 4ccaeefc28b4

Subscribe to this mod's changes

stm32f411-blackpill is a skill published in the GitHub repository alexex1993/mcu-skills (17 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,581 tokens. 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

doca-argp

Use this skill for hands-on DOCA Arg Parser CLI work on a shipped sample or new DOCA-using app — adding / removing / renaming flags; wiring docaargpinit → register params → docaargpstart → docaargpdestroy in order; picking a parameter type from the full public enum (DOCAARGPTYPESTRING, INT, BOOLEAN, DEVICE, DEVICEREP…

NVIDIA/skills · 267 tokens

holoscan-install-wheel

Install Holoscan SDK Python wheel via pip into a venv. Use for Python installs; not for native C++/apt or Conda installs.

NVIDIA/skills · 37 tokens

mspm0-skill

Tool-neutral CLI agent rules for TI MSPM0 development with SysConfig, DriverLib, CCS, Keil/uVision, CMake/GCC/OpenOCD, and supported board references. Use when an agent needs to inspect or modify MSPM0 projects, validate SysConfig output, package examples, or work on NUEDC embedded firmware.

Ibook000/mspm0-skill · 76 tokens

arduino-code-generator

Generate Arduino and embedded C++ snippets for sensors, actuators, buses, state machines, timing, data logging, and hardware abstraction. Use when a user requests implementation code and provide the exact board, framework, toolchain, pins, voltage, memory, and library versions first. Bundled templates target UNO…

wedsamuel1230/arduino-skills · 86 tokens

arduino-project-builder

Build complete Arduino and embedded projects across Arduino IDE, Arduino CLI, PlatformIO, and vendor-specific toolchains. Use when users request an application combining firmware, sensors, actuators, networking, power, or deployment rather than a code snippet. The bundled scaffold targets UNO, ESP32, and Raspberry Pi…

wedsamuel1230/arduino-skills · 78 tokens

keymap-ai

Expert assistant for ZMK and QMK keyboard firmware configs. Use when auditing or improving a zmk-config or QMK keymap, tuning home row mods or hold-taps, adding smart layers (numword, caps word), configuring trackballs, trackpads, trackpoints, encoders and per-layer input processors, generating keymap-drawer diagrams…

johncattrall/keymap-ai · 146 tokens