- SAM E70 - High-performance Cortex-M7 (up to 300 MHz) - SAM S70 - Secure Cortex-M7 with TrustZone - SAM V70/V71 - Automotive-qualified Cortex-M7
Supported Device Families
- SAM E70
- SAM S70
- SAM V70
- SAM V71
Key Features
| Feature | Description |
|---|
| Dual AFEC | AFEC0 and AFEC1 (12 channels each) |
| Resolution | 12-bit with up to 16-bit oversampling |
| Programmable Gain | 1x, 2x, 4x amplification per channel |
| Offset Compensation | Automatic offset cancellation |
| Temperature Sensor | Integrated temperature measurement (AD11) |
| Speed | Up to 1 Msps per AFEC |
AFEC Architecture
Dual AFEC Configuration
- AFEC0: Channels AD0-AD11 (AD11 = Temperature sensor)
- AFEC1: Channels AD0-AD11
- Independent operation: Each AFEC can sample simultaneously
- Pin mapping: ADx channels map to specific port pins (e.g., AD0 → PE5)
Analog Front-End Features
| Feature | Configuration |
|---|
| Single-ended/Differential | Configurable per channel |
| Gain | 1x, 2x, 4x (programmable per channel) |
| Offset | Automatic offset correction |
| Averaging | Hardware averaging for noise reduction |
Configuration Parameters
Channel Selection
- AFEC0_ADx checkboxes: Enable individual channels on AFEC0
- AFEC1_ADx checkboxes: Enable individual channels on AFEC1
- Temperature sensor: AD11 on AFEC0 (special handling)
Per-Channel Settings
- Gain: Select 1x, 2x, or 4x amplification
- Differential mode: Enable differential measurement
- Offset compensation: Enable automatic offset correction
Trigger Sources
- Software trigger (manual conversion)
- TC (Timer Counter) output
- PWM events
- External trigger pins
Pin Mapping
The block automatically displays pin assignments for enabled channels (e.g., “AD0 / PE5 / Pin[X]”).
Applications
- Industrial automation: High-precision sensor measurements with programmable gain
- Motor control: Current and voltage feedback with offset compensation
- Power management: Multi-channel voltage/current monitoring
- Automotive: Temperature-compensated analog measurements
- Medical devices: Low-noise signal acquisition with averaging
Usage Example
AFEC0: Enable AD0-AD5 (6 sensor channels), Gain=2x, Offset compensation ON
AFEC0 AD11: Enable temperature sensor for thermal monitoring
AFEC1: Enable AD0-AD3 (4 additional channels), Gain=1x
Trigger: TC0 output at 10kHz
Result: 10 precision analog measurements + temperature, all synchronized with hardware averaging.
Enhanced Accuracy
- Programmable Gain: Amplify small signals (μV-mV range) without external op-amps
- Offset Compensation: Eliminate DC offset errors automatically
- Hardware Averaging: Reduce noise through multi-sample averaging
- Differential Mode: Reject common-mode noise
Conversion Speed
- Up to 1 Msps per AFEC (2 Msps total with AFEC0+AFEC1)
- Configurable conversion time vs accuracy trade-off
- DMA support for high-throughput applications
Troubleshooting
See Also
ADC Blocks Overview
| [Block Reference](../