| Family | Examples | Features |
|---|---|---|
| SAME5x | SAME54, SAME53, SAME51 | Up to 4 PWM channels, 120 MHz, TCC peripherals |
| SAME7x | SAME70, SAMS70, SAMV71 | Up to 8 PWM channels, 300 MHz, advanced PWM features |
| SAMC2x | SAMC21, SAMC20 | Up to 4 PWM channels, 48 MHz, motor control optimized |
| SAMD2x | SAMD21, SAMD20 | Up to 3 PWM channels, 48 MHz, compact implementation |
| Parameter | Description |
|---|---|
| PWM_Channels | Enabled PWM channel numbers (e.g., [0 1 2 3]) |
| PWM_Mode | Edge-aligned or Center-aligned |
| Period | PWM period (constant or input) |
| DutyCycle_Init | Initial duty cycle values |
| Parameter | Description |
|---|---|
| DeadTime_Enable | Enable dead-time insertion |
| DeadTimeH | Dead-time for high-side output (seconds) |
| DeadTimeL | Dead-time for low-side output (seconds) |
| Input | Type | Description |
|---|---|---|
| Period | Variable | Optional period input (if enabled) |
| DutyCycle 0..N | Variable | Duty cycle per enabled channel |
| DeadTimeH 0..N | uint16 | Dynamic high-side dead-time (if enabled) |
| DeadTimeL 0..N | uint16 | Dynamic low-side dead-time (if enabled) |
| Output | Type | Description |
|---|---|---|
| Fault_Status | boolean | Fault condition indicator (if fault enabled) |
% 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