SMART ARM-Based Microcontrollers
SAM D21E / SAM D21G / SAM D21J
DATASHEET COMPLETE
Introduction
Atmel | SMART SAM D21 is a series of low-power microcontrollers using
®
®
the 32-bit ARM Cortex -M0+ processor, and ranging from 32- to 64-pins
with up to 256KB Flash and 32KB of SRAM. The SAM D21 devices operate
®
at a maximum frequency of 48MHz and reach 2.46 CoreMark /MHz. They
are designed for simple and intuitive migration with identical peripheral
modules, hex compatible code, identical linear address map and pin
compatible migration paths between all devices in the product series. All
devices include intelligent and flexible peripherals, Atmel Event System for
inter-peripheral signaling, and support for capacitive touch button, slider and
wheel user interfaces.
®
™
Features
•
Processor
–
ARM Cortex-M0+ CPU running at up to 48MHz
• Single-cycle hardware multiplier
• Micro Trace Buffer (MTB)
Memories
–
32/64/128/256KB in-system self-programmable Flash
–
4/8/16/32KB SRAM Memory
System
–
Power-on reset (POR) and brown-out detection (BOD)
–
Internal and external clock options with 48MHz Digital Frequency
Locked Loop (DFLL48M) and 48MHz to 96MHz Fractional Digital
Phase Locked Loop (FDPLL96M)
–
External Interrupt Controller (EIC)
–
16 external interrupts
–
One non-maskable interrupt
–
Two-pin Serial Wire Debug (SWD) programming, test and
debugging interface
Low Power
–
Idle and standby sleep modes
–
SleepWalking peripherals
•
•
•
Atmel-42181N-SAM-D21_Datasheet_Complete-10/2016
Downloaded from
Arrow.com.
•
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
–
Three 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)
CRC-32 generator
One full-speed (12Mbps) 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
• I2C up to 3.4MHz
• 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
• 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, 350ksps Digital-to-Analog Converter (DAC)
Two Analog Comparators (AC) with window compare function
Peripheral Touch Controller (PTC)
• 256-Channel capacitive touch and proximity sensing
–
–
–
–
–
–
•
•
•
•
I/O
–
Up to 52 programmable I/O pins
Drop in compatible with SAM D20
Packages
–
64-pin TQFP, QFN, UFBGA
–
48-pin TQFP, QFN, WLCSP
–
32-pin TQFP, QFN, WLCSP
Operating Voltage
–
1.62V – 3.63V
Atmel SAM D21E / SAM D21G / SAM D21J [DATASHEET]
Atmel-42181N-SAM-D21_Datasheet_Complete-10/2016
2
Downloaded from
Arrow.com.
Table of Contents
Introduction......................................................................................................................1
Features.......................................................................................................................... 1
1. Description............................................................................................................... 11
2. Configuration Summary........................................................................................... 12
3. Ordering Information................................................................................................14
3.1.
3.2.
3.3.
3.4.
SAM D21E..................................................................................................................................14
SAM D21G................................................................................................................................. 16
SAM D21J.................................................................................................................................. 18
Device Identification................................................................................................................... 20
4. Block Diagram......................................................................................................... 22
5. Pinout.......................................................................................................................23
5.1.
5.2.
5.3.
SAM D21J.................................................................................................................................. 23
SAM D21G................................................................................................................................. 25
SAM D21E..................................................................................................................................27
6. Signal Descriptions List........................................................................................... 29
7. I/O Multiplexing and Considerations........................................................................ 31
7.1.
7.2.
Multiplexed Signals.....................................................................................................................31
Other Functions..........................................................................................................................33
8. Power Supply and Start-Up Considerations............................................................ 36
8.1.
8.2.
8.3.
8.4.
Power Domain Overview............................................................................................................36
Power Supply Considerations.................................................................................................... 36
Power-Up....................................................................................................................................38
Power-On Reset and Brown-Out Detector................................................................................. 38
9. Product Mapping......................................................................................................40
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.
Cortex M0+ Processor................................................................................................................46
Nested Vector Interrupt Controller..............................................................................................47
Micro Trace Buffer...................................................................................................................... 49
High-Speed Bus System............................................................................................................ 50
AHB-APB Bridge........................................................................................................................ 52
Downloaded from
Arrow.com.
11.6. PAC - Peripheral Access Controller............................................................................................53
12. Peripherals Configuration Summary........................................................................69
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..............................................................................................................................75
13.9. Intellectual Property Protection...................................................................................................76
13.10. Device Identification................................................................................................................... 77
13.11. Functional Description................................................................................................................78
13.12. Register Summary..................................................................................................................... 84
13.13. Register Description...................................................................................................................86
14. Clock System......................................................................................................... 110
14.1.
14.2.
14.3.
14.4.
14.5.
14.6.
14.7.
14.8.
Clock Distribution......................................................................................................................110
Synchronous and Asynchronous Clocks.................................................................................. 111
Register Synchronization.......................................................................................................... 111
Enabling a Peripheral............................................................................................................... 116
Disabling a Peripheral...............................................................................................................116
On-demand, Clock Requests....................................................................................................116
Power Consumption vs. Speed................................................................................................ 117
Clocks after Reset.................................................................................................................... 117
15. GCLK - Generic Clock Controller...........................................................................118
15.1.
15.2.
15.3.
15.4.
15.5.
15.6.
15.7.
15.8.
Overview...................................................................................................................................118
Features....................................................................................................................................118
Block Diagram.......................................................................................................................... 118
Signal Description.....................................................................................................................119
Product Dependencies............................................................................................................. 119
Functional Description..............................................................................................................120
Register Summary....................................................................................................................125
Register Description................................................................................................................. 126
16. PM – Power Manager............................................................................................140
16.1.
16.2.
16.3.
16.4.
16.5.
16.6.
16.7.
16.8.
Overview...................................................................................................................................140
Features................................................................................................................................... 140
Block Diagram.......................................................................................................................... 141
Signal Description.....................................................................................................................141
Product Dependencies............................................................................................................. 141
Functional Description..............................................................................................................143
Register Summary....................................................................................................................150
Register Description................................................................................................................. 150
Atmel SAM D21E / SAM D21G / SAM D21J [DATASHEET]
Atmel-42181N-SAM-D21_Datasheet_Complete-10/2016
4
Downloaded from
Arrow.com.
17. SYSCTRL – System Controller............................................................................. 172
17.1.
17.2.
17.3.
17.4.
17.5.
17.6.
17.7.
17.8.
Overview...................................................................................................................................172
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....................................................................................................................244
Register Description................................................................................................................. 244
19. RTC – Real-Time Counter..................................................................................... 255
19.1.
19.2.
19.3.
19.4.
19.5.
19.6.
19.7.
19.8.
Overview...................................................................................................................................255
Features................................................................................................................................... 255
Block Diagram.......................................................................................................................... 256
Signal Description.....................................................................................................................256
Product Dependencies............................................................................................................. 256
Functional Description..............................................................................................................258
Register Summary....................................................................................................................263
Register Description................................................................................................................. 266
20. DMAC – Direct Memory Access Controller........................................................... 299
20.1. Overview...................................................................................................................................299
20.2. Features................................................................................................................................... 299
20.3. Block Diagram.......................................................................................................................... 301
20.4. Signal Description.....................................................................................................................301
20.5. Product Dependencies............................................................................................................. 301
20.6. Functional Description..............................................................................................................302
20.7. Register Summary....................................................................................................................322
20.8. Register Description................................................................................................................. 323
20.9. Register Summary - SRAM...................................................................................................... 355
20.10. Register Description - SRAM................................................................................................... 355
21. EIC – External Interrupt Controller........................................................................ 363
21.1.
21.2.
21.3.
21.4.
21.5.
Overview...................................................................................................................................363
Features................................................................................................................................... 363
Block Diagram.......................................................................................................................... 363
Signal Description.....................................................................................................................364
Product Dependencies............................................................................................................. 364
Atmel SAM D21E / SAM D21G / SAM D21J [DATASHEET]
Atmel-42181N-SAM-D21_Datasheet_Complete-10/2016
5
Downloaded from
Arrow.com.