foc-drive-embedded-c

Community

Build deterministic, safe STM32G4 FOC firmware.

AuthorKunYi
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill prevents broken or unsafe Field-Oriented Control implementations by enforcing physically verifiable, timing-aware guidance for STM32G4-class PMSM/BLDC motor drive firmware rather than generic FOC templates.

Core Features & Use Cases

  • Production-grade control architecture: guides inner current-loop determinism, cascaded speed/position logic, and safe transition sequencing.
  • Hardware-tied modulation and sensing: aligns SVPWM/SVPWM variants, ADC/DMA timing, shunt topology constraints, and STM32G4 PWM/trigger specifics.
  • Safety boundaries and emergency behavior: prioritizes OCP and DC-bus overvoltage handling with explicit safe-state selection (High-Z vs ASC), plus fault/abuse-case readiness.

Quick Start

Use the foc-drive-embedded-c skill to help you write or review STM32G4 FOC code for a PMSM using dual-ADC current sensing by asking for the required ISR pipeline, ADC trigger placement, SVPWM limits, and an emergency protection plan.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: foc-drive-embedded-c
Download link: https://github.com/KunYi/Skills/archive/main.zip#foc-drive-embedded-c

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.