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.