Pwm Sam7X Block Icon
Advanced PWM peripheral for SAM ARM Cortex-M microcontrollers. Provides complementary PWM with dead-time, fault protection, and pattern generation for motor control applications.

SAM Family PWM Capabilities

FamilyExamplesFeatures
SAME5xSAME54, SAME53, SAME51Up to 4 PWM channels, 120 MHz, TCC peripherals
SAME7xSAME70, SAMS70, SAMV71Up to 8 PWM channels, 300 MHz, advanced PWM features
SAMC2xSAMC21, SAMC20Up to 4 PWM channels, 48 MHz, motor control optimized
SAMD2xSAMD21, SAMD20Up to 3 PWM channels, 48 MHz, compact implementation

Supported Device Families

  • SAM E70
  • SAM S70
  • SAM V70
  • SAM V71

Key Features

  • Complementary PWM output pairs with dead-time
  • Independent period and duty cycle control
  • Center-aligned and edge-aligned modes
  • Fault input with configurable response
  • Pattern generation for BLDC commutation
  • Synchronized PWM update
  • Dynamic dead-time adjustment

Configuration Parameters

Configuration

ParameterDescription
PWM_ChannelsEnabled PWM channel numbers (e.g., [0 1 2 3])
PWM_ModeEdge-aligned or Center-aligned
PeriodPWM period (constant or input)
DutyCycle_InitInitial duty cycle values

Dead Time

ParameterDescription
DeadTime_EnableEnable dead-time insertion
DeadTimeHDead-time for high-side output (seconds)
DeadTimeLDead-time for low-side output (seconds)

Block Inputs/Outputs

Inputs

InputTypeDescription
PeriodVariableOptional period input (if enabled)
DutyCycle 0..NVariableDuty cycle per enabled channel
DeadTimeH 0..Nuint16Dynamic high-side dead-time (if enabled)
DeadTimeL 0..Nuint16Dynamic low-side dead-time (if enabled)

Outputs

OutputTypeDescription
Fault_StatusbooleanFault condition indicator (if fault enabled)

Usage Example

% SAME70 3-phase motor control:
PWM_Channels = [0 1 2];
PWM_Mode = 'Center-aligned';
Period = 1/20e3;  % 20 kHz

% Dead-time:
DeadTime_Enable = 'on';
DeadTimeH = [1e-6 1e-6 1e-6];  % 1 ยตs each phase
DeadTimeL = [1e-6 1e-6 1e-6];

% Connect duty cycle inputs from FOC algorithm