Files
esp-idf/components/esp_hal_mcpwm
Steven Yang 8a982614a2 feat(mcpwm): support RC_FAST group clock source
Expose RC_FAST as a shared MCPWM group clock source for timers,
capture timers, and carriers on ESP32-C5, ESP32-C6, ESP32-H2,
and ESP32-P4. Fix the ESP32-S31 MCPWM clock selector mapping.

Add a hardware runtime test that verifies MCPWM Timer counting
resolution for every supported clock source.
2026-07-29 20:20:47 +08:00
..

ESP Hardware Abstraction Layer for MCPWM Peripheral

Note

This component is currently in beta. Its API, behavior, and compatibility may change at any time and without notice; backward compatibility is not guaranteed. Use caution when integrating into production systems.

Overview

The ESP Hardware Abstraction Layer for Motor Control PWM Peripherals (esp_hal_mcpwm) provides a unified interface to interact with MCPWM (Motor Control Pulse Width Modulation) peripherals across all ESP chip families. This component abstracts the hardware-specific details of different MCPWM implementations, enabling consistent usage patterns regardless of the underlying hardware.

The component supports comprehensive MCPWM functionality including:

  • PWM signal generation with precise timing control
  • Dead-time insertion for motor control applications
  • Fault detection and protection mechanisms
  • Capture functionality for feedback systems
  • Synchronization between multiple MCPWM units
  • Event-driven operation modes