SAM D21 Family
Low-Power, 32-bit Cortex-M0+ MCU with Advanced Analog
and PWM
Features
•
Processor
– ARM
®
Cortex
®
-M0+ CPU running at up to 48 MHz
• Single-cycle hardware multiplier
• Micro Trace Buffer (MTB)
Memories
– 32/64/128/256 KB in-system self-programmable Flash
– 4/8/16/32 KB SRAM Memory
System
Power-on Reset (POR) and Brown-out Detection (BOD)
Internal and external clock options with 48 MHz Digital Frequency-Locked Loop (DFLL48M)
and 48 MHz to 96 MHz Fractional Digital Phase-Locked Loop (FDPLL96M)
– External Interrupt Controller (EIC)
– 16 external interrupts
– One Non-maskable Interrupt (NMI)
– Two-pin Serial Wire Debug (SWD) programming, test and debugging interface
Low Power
– Idle and Stand-by Sleep modes
– SleepWalking peripherals
Peripherals
– 12-channel Direct Memory Access Controller (DMAC)
– 12-channel Event System
– Up to five 16-bit Timer/Counters (TC), configurable as either:
• One 16-bit TC with two compare/capture channels
• One 8-bit TC with two compare/capture channels
• One 32-bit TC with two compare/capture channels, by using two TCs
– Up to four 24-bit Timer/Counters for Control (TCC), with extended functions:
• Up to four compare channels with optional complementary output
• Generation of synchronized pulse width modulation (PWM) pattern across port pins
• Deterministic fault protection, fast decay and configurable dead-time between
complementary output
• Dithering that increase resolution with up to 5 bit and reduce quantization error
– 32-bit Real Time Counter (RTC) with clock/calendar function
– Watchdog Timer (WDT)
–
–
•
•
•
•
©
2018 Microchip Technology Inc.
Datasheet Complete
DS40001882D-page 1
SAM D21 Family
–
–
CRC-32 generator
One full-speed (12 Mbps) Universal Serial Bus (USB) 2.0 interface
• Embedded host and device function
• Eight endpoints
Up to six Serial Communication Interfaces (SERCOM), each configurable to operate as either:
• USART with full-duplex and single-wire half-duplex configuration
• I
2
C up to 3.4 MHz
• SPI
• LIN slave
One two-channel Inter-IC Sound (I
2
S) interface
One 12-bit, 350ksps Analog-to-Digital Converter (ADC) with up to 20 channels
• Differential and single-ended input
•
•
•
–
–
–
•
•
•
•
I/O
– Up to 52 programmable I/O pins
Qualification
– AEC-Q100 Grade 1 (-40°C to 125°C)
Drop-in compatible with SAM D20
Packages
– 64-pin TQFP, QFN, UFBGA
– 48-pin TQFP, QFN
– 45-pin WLCSP
– 35-pin WLCSP
– 32-pin TQFP, QFN
Operating Voltage
– 1.62V – 3.63V
1/2x to 16x programmable gain stage
Automatic offset and gain error compensation
Oversampling and decimation in hardware to support 13-, 14-, 15- or 16-bit resolution
–
–
–
10-bit, 350 ksps Digital-to-Analog Converter (DAC)
Up to four Analog Comparators (AC) with Window Compare function
Peripheral Touch Controller (PTC)
• 256-Channel capacitive touch and proximity sensing
•
©
2018 Microchip Technology Inc.
Datasheet Complete
DS40001882D-page 2
Table of Contents
Features.......................................................................................................................... 1
1. Description...............................................................................................................12
2. Configuration Summary...........................................................................................13
3. Ordering Information
(1)
............................................................................................ 15
4. Block Diagram......................................................................................................... 16
5. Pinout...................................................................................................................... 18
5.1.
5.2.
5.3.
5.4.
5.5.
SAM D21J.................................................................................................................................. 18
SAM D21G................................................................................................................................. 20
SAM D21GxL............................................................................................................................. 22
SAM D21ExA/B/C/D...................................................................................................................23
SAM D21ExL..............................................................................................................................25
6. Signal Descriptions List........................................................................................... 26
7. I/O Multiplexing and Considerations........................................................................28
7.1.
7.2.
Multiplexed Signals.................................................................................................................... 28
Other Functions..........................................................................................................................32
8. Power Supply and Start-Up Considerations............................................................ 35
8.1.
8.2.
8.3.
8.4.
Power Domain Overview............................................................................................................35
Power Supply Considerations.................................................................................................... 35
Power-Up................................................................................................................................... 37
Power-On Reset and Brown-Out Detector................................................................................. 37
9. Product Mapping..................................................................................................... 39
10. Memories.................................................................................................................41
10.1. Embedded Memories................................................................................................................. 41
10.2. Physical Memory Map................................................................................................................ 41
10.3. NVM Calibration and Auxiliary Space........................................................................................ 42
11. Processor And Architecture.....................................................................................46
11.1.
11.2.
11.3.
11.4.
11.5.
11.6.
Cortex M0+ Processor............................................................................................................... 46
Nested Vector Interrupt Controller..............................................................................................47
Micro Trace Buffer...................................................................................................................... 49
High-Speed Bus System............................................................................................................ 50
AHB-APB Bridge........................................................................................................................ 52
PAC - Peripheral Access Controller........................................................................................... 53
12. Peripherals Configuration Summary........................................................................69
©
2018 Microchip Technology Inc.
Datasheet Complete
DS40001882D-page 3
SAM D21 Family
13. DSU - Device Service Unit...................................................................................... 71
13.1. Overview.................................................................................................................................... 71
13.2. Features..................................................................................................................................... 71
13.3. Block Diagram............................................................................................................................ 72
13.4. Signal Description...................................................................................................................... 72
13.5. Product Dependencies............................................................................................................... 72
13.6. Debug Operation........................................................................................................................ 73
13.7. Chip Erase..................................................................................................................................75
13.8. Programming..............................................................................................................................76
13.9. Intellectual Property Protection.................................................................................................. 76
13.10. Device Identification................................................................................................................... 78
13.11. Functional Description................................................................................................................79
13.12. Register Summary..................................................................................................................... 84
13.13. Register Description...................................................................................................................86
14. Clock System.........................................................................................................109
14.1.
14.2.
14.3.
14.4.
14.5.
14.6.
14.7.
14.8.
Clock Distribution..................................................................................................................... 109
Synchronous and Asynchronous Clocks.................................................................................. 110
Register Synchronization..........................................................................................................110
Enabling a Peripheral............................................................................................................... 115
Disabling a Peripheral.............................................................................................................. 115
On-demand, Clock Requests................................................................................................... 115
Power Consumption vs. Speed................................................................................................ 116
Clocks after Reset.................................................................................................................... 116
15. GCLK - Generic Clock Controller...........................................................................117
15.1.
15.2.
15.3.
15.4.
15.5.
15.6.
15.7.
15.8.
Overview...................................................................................................................................117
Features................................................................................................................................... 117
Block Diagram.......................................................................................................................... 117
Signal Description.....................................................................................................................118
Product Dependencies............................................................................................................. 118
Functional Description.............................................................................................................. 119
Register Summary....................................................................................................................125
Register Description................................................................................................................. 125
16. PM – Power Manager............................................................................................139
16.1.
16.2.
16.3.
16.4.
16.5.
16.6.
16.7.
16.8.
Overview.................................................................................................................................. 139
Features................................................................................................................................... 139
Block Diagram.......................................................................................................................... 140
Signal Description.................................................................................................................... 140
Product Dependencies............................................................................................................. 140
Functional Description..............................................................................................................142
Register Summary....................................................................................................................150
Register Description................................................................................................................. 150
17. SYSCTRL – System Controller............................................................................. 172
17.1. Overview.................................................................................................................................. 172
©
2018 Microchip Technology Inc.
Datasheet Complete
DS40001882D-page 4
SAM D21 Family
17.2.
17.3.
17.4.
17.5.
17.6.
17.7.
17.8.
Features................................................................................................................................... 172
Block Diagram.......................................................................................................................... 174
Signal Description.................................................................................................................... 174
Product Dependencies............................................................................................................. 174
Functional Description..............................................................................................................176
Register Summary....................................................................................................................192
Register Description................................................................................................................. 194
18. WDT – Watchdog Timer........................................................................................ 237
18.1.
18.2.
18.3.
18.4.
18.5.
18.6.
18.7.
18.8.
Overview.................................................................................................................................. 237
Features................................................................................................................................... 237
Block Diagram.......................................................................................................................... 238
Signal Description.................................................................................................................... 238
Product Dependencies............................................................................................................. 238
Functional Description..............................................................................................................239
Register Summary....................................................................................................................245
Register Description................................................................................................................. 245
19. RTC – Real-Time Counter..................................................................................... 256
19.1.
19.2.
19.3.
19.4.
19.5.
19.6.
19.7.
19.8.
Overview.................................................................................................................................. 256
Features................................................................................................................................... 256
Block Diagram.......................................................................................................................... 257
Signal Description.................................................................................................................... 257
Product Dependencies............................................................................................................. 257
Functional Description..............................................................................................................259
Register Summary....................................................................................................................265
Register Description................................................................................................................. 267
20. DMAC – Direct Memory Access Controller........................................................... 300
20.1. Overview.................................................................................................................................. 300
20.2. Features................................................................................................................................... 300
20.3. Block Diagram.......................................................................................................................... 302
20.4. Signal Description.................................................................................................................... 302
20.5. Product Dependencies............................................................................................................. 302
20.6. Functional Description..............................................................................................................303
20.7. Register Summary....................................................................................................................324
20.8. Register Description................................................................................................................. 325
20.9. Register Summary - SRAM...................................................................................................... 357
20.10. Register Description - SRAM................................................................................................... 357
21. EIC – External Interrupt Controller........................................................................ 365
21.1.
21.2.
21.3.
21.4.
21.5.
21.6.
21.7.
Overview.................................................................................................................................. 365
Features................................................................................................................................... 365
Block Diagram.......................................................................................................................... 365
Signal Description.................................................................................................................... 366
Product Dependencies............................................................................................................. 366
Functional Description..............................................................................................................367
Register Summary....................................................................................................................372
©
2018 Microchip Technology Inc.
Datasheet Complete
DS40001882D-page 5