sam d21 family data sheetww1.microchip.com/downloads/en/devicedoc/sam-d21-family-datasheet... ·...
TRANSCRIPT
-
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
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)
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 1
-
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 I2C up to 3.4 MHz SPI LIN slave
One two-channel Inter-IC Sound (I2S) 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, 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 I/O
Up to 52 programmable I/O pins Qualification
AEC-Q100 Grade 1 (-40C to 125C) 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
SAM D21 Family
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 2
-
Table of Contents
Features.......................................................................................................................... 1
1. Description...............................................................................................................12
2. Configuration Summary...........................................................................................13
3. Ordering Information(1)............................................................................................ 14
4. Block Diagram......................................................................................................... 15
5. Pinout...................................................................................................................... 175.1. SAM D21J.................................................................................................................................. 175.2. SAM D21G................................................................................................................................. 195.3. SAM D21GxL............................................................................................................................. 215.4. SAM D21ExA/B/C...................................................................................................................... 225.5. SAM D21ExL..............................................................................................................................24
6. Signal Descriptions List........................................................................................... 25
7. I/O Multiplexing and Considerations........................................................................277.1. Multiplexed Signals.................................................................................................................... 277.2. Other Functions..........................................................................................................................30
8. Power Supply and Start-Up Considerations............................................................ 348.1. Power Domain Overview............................................................................................................348.2. Power Supply Considerations.................................................................................................... 348.3. Power-Up................................................................................................................................... 368.4. Power-On Reset and Brown-Out Detector.................................................................................36
9. Product Mapping..................................................................................................... 38
10. Memories.................................................................................................................4010.1. Embedded Memories................................................................................................................. 4010.2. Physical Memory Map................................................................................................................4010.3. NVM Calibration and Auxiliary Space........................................................................................ 41
11. Processor And Architecture.....................................................................................4511.1. Cortex M0+ Processor............................................................................................................... 4511.2. Nested Vector Interrupt Controller..............................................................................................4611.3. Micro Trace Buffer......................................................................................................................4811.4. High-Speed Bus System............................................................................................................ 4911.5. AHB-APB Bridge........................................................................................................................ 5111.6. PAC - Peripheral Access Controller........................................................................................... 52
12. Peripherals Configuration Summary........................................................................68
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 3
-
13. DSU - Device Service Unit...................................................................................... 7013.1. Overview.................................................................................................................................... 7013.2. Features..................................................................................................................................... 7013.3. Block Diagram............................................................................................................................7113.4. Signal Description...................................................................................................................... 7113.5. Product Dependencies...............................................................................................................7113.6. Debug Operation........................................................................................................................7213.7. Chip Erase..................................................................................................................................7413.8. Programming..............................................................................................................................7513.9. Intellectual Property Protection.................................................................................................. 7513.10. Device Identification...................................................................................................................7713.11. Functional Description................................................................................................................7813.12. Register Summary..................................................................................................................... 8313.13. Register Description...................................................................................................................85
14. Clock System.........................................................................................................10814.1. Clock Distribution..................................................................................................................... 10814.2. Synchronous and Asynchronous Clocks..................................................................................10914.3. Register Synchronization......................................................................................................... 10914.4. Enabling a Peripheral............................................................................................................... 11414.5. Disabling a Peripheral.............................................................................................................. 11414.6. On-demand, Clock Requests................................................................................................... 11414.7. Power Consumption vs. Speed................................................................................................ 11514.8. Clocks after Reset.................................................................................................................... 115
15. GCLK - Generic Clock Controller...........................................................................11615.1. Overview...................................................................................................................................11615.2. Features................................................................................................................................... 11615.3. Block Diagram.......................................................................................................................... 11615.4. Signal Description.....................................................................................................................11715.5. Product Dependencies............................................................................................................. 11715.6. Functional Description.............................................................................................................. 11815.7. Register Summary....................................................................................................................12415.8. Register Description.................................................................................................................124
16. PM Power Manager............................................................................................13816.1. Overview.................................................................................................................................. 13816.2. Features................................................................................................................................... 13816.3. Block Diagram..........................................................................................................................13916.4. Signal Description.................................................................................................................... 13916.5. Product Dependencies.............................................................................................................13916.6. Functional Description..............................................................................................................14116.7. Register Summary....................................................................................................................14916.8. Register Description.................................................................................................................149
17. SYSCTRL System Controller............................................................................. 17017.1. Overview.................................................................................................................................. 170
SAM D21 Family
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 4
-
17.2. Features................................................................................................................................... 17017.3. Block Diagram..........................................................................................................................17217.4. Signal Description.................................................................................................................... 17217.5. Product Dependencies.............................................................................................................17217.6. Functional Description..............................................................................................................17417.7. Register Summary....................................................................................................................19017.8. Register Description.................................................................................................................192
18. WDT Watchdog Timer........................................................................................ 23518.1. Overview.................................................................................................................................. 23518.2. Features................................................................................................................................... 23518.3. Block Diagram..........................................................................................................................23618.4. Signal Description.................................................................................................................... 23618.5. Product Dependencies.............................................................................................................23618.6. Functional Description..............................................................................................................23718.7. Register Summary....................................................................................................................24318.8. Register Description.................................................................................................................243
19. RTC Real-Time Counter.....................................................................................25419.1. Overview.................................................................................................................................. 25419.2. Features................................................................................................................................... 25419.3. Block Diagram..........................................................................................................................25519.4. Signal Description.................................................................................................................... 25519.5. Product Dependencies.............................................................................................................25519.6. Functional Description..............................................................................................................25719.7. Register Summary....................................................................................................................26319.8. Register Description.................................................................................................................265
20. DMAC Direct Memory Access Controller........................................................... 29820.1. Overview.................................................................................................................................. 29820.2. Features................................................................................................................................... 29820.3. Block Diagram..........................................................................................................................30020.4. Signal Description.................................................................................................................... 30020.5. Product Dependencies.............................................................................................................30020.6. Functional Description..............................................................................................................30120.7. Register Summary....................................................................................................................32220.8. Register Description.................................................................................................................32320.9. Register Summary - SRAM......................................................................................................35420.10. Register Description - SRAM................................................................................................... 354
21. EIC External Interrupt Controller........................................................................ 36221.1. Overview.................................................................................................................................. 36221.2. Features................................................................................................................................... 36221.3. Block Diagram..........................................................................................................................36221.4. Signal Description.................................................................................................................... 36321.5. Product Dependencies.............................................................................................................36321.6. Functional Description..............................................................................................................36421.7. Register Summary....................................................................................................................369
SAM D21 Family
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 5
-
21.8. Register Description.................................................................................................................369
22. NVMCTRL Nonvolatile Memory Controller.........................................................38022.1. Overview.................................................................................................................................. 38022.2. Features................................................................................................................................... 38022.3. Block Diagram..........................................................................................................................38022.4. Signal Description.................................................................................................................... 38122.5. Product Dependencies.............................................................................................................38122.6. Functional Description..............................................................................................................38222.7. Register Summary....................................................................................................................38922.8. Register Description.................................................................................................................389
23. PORT - I/O Pin Controller......................................................................................40323.1. Overview.................................................................................................................................. 40323.2. Features................................................................................................................................... 40323.3. Block Diagram..........................................................................................................................40423.4. Signal Description.................................................................................................................... 40423.5. Product Dependencies.............................................................................................................40423.6. Functional Description..............................................................................................................40623.7. Register Summary....................................................................................................................41223.8. Register Description.................................................................................................................414
24. EVSYS Event System........................................................................................ 43524.1. Overview.................................................................................................................................. 43524.2. Features................................................................................................................................... 43524.3. Block Diagram..........................................................................................................................43524.4. Signal Description.................................................................................................................... 43624.5. Product Dependencies.............................................................................................................43624.6. Functional Description..............................................................................................................43724.7. Register Summary....................................................................................................................44224.8. Register Description.................................................................................................................443
25. SERCOM Serial Communication Interface.........................................................45625.1. Overview.................................................................................................................................. 45625.2. Features................................................................................................................................... 45625.3. Block Diagram..........................................................................................................................45725.4. Signal Description.................................................................................................................... 45725.5. Product Dependencies.............................................................................................................45725.6. Functional Description..............................................................................................................459
26. SERCOM USART..................................................................................................46526.1. Overview.................................................................................................................................. 46526.2. USART Features...................................................................................................................... 46526.3. Block Diagram..........................................................................................................................46626.4. Signal Description.................................................................................................................... 46626.5. Product Dependencies.............................................................................................................46626.6. Functional Description..............................................................................................................46826.7. Register Summary....................................................................................................................482
SAM D21 Family
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 6
-
26.8. Register Description.................................................................................................................483
27. SERCOM SPI SERCOM Serial Peripheral Interface..........................................50727.1. Overview.................................................................................................................................. 50727.2. Features................................................................................................................................... 50727.3. Block Diagram..........................................................................................................................50827.4. Signal Description.................................................................................................................... 50827.5. Product Dependencies.............................................................................................................50827.6. Functional Description..............................................................................................................51027.7. Register Summary....................................................................................................................52227.8. Register Description.................................................................................................................523
28. SERCOM I2C Inter-Integrated Circuit.................................................................54528.1. Overview.................................................................................................................................. 54528.2. Features................................................................................................................................... 54528.3. Block Diagram..........................................................................................................................54628.4. Signal Description.................................................................................................................... 54628.5. Product Dependencies.............................................................................................................54628.6. Functional Description..............................................................................................................54828.7. Register Summary - I2C Slave.................................................................................................57228.8. Register Description - I2C Slave...............................................................................................57328.9. Register Summary - I2C Master...............................................................................................59528.10. Register Description - I2C Master............................................................................................ 596
29. I2S - Inter-IC Sound Controller..............................................................................62229.1. Overview.................................................................................................................................. 62229.2. Features................................................................................................................................... 62229.3. Block Diagram..........................................................................................................................62329.4. Signal Description.................................................................................................................... 62429.5. Product Dependencies.............................................................................................................62429.6. Functional Description..............................................................................................................62629.7. I2S Application Examples......................................................................................................... 63729.8. Register Summary....................................................................................................................64029.9. Register Description.................................................................................................................641
30. TC Timer/Counter...............................................................................................65930.1. Overview.................................................................................................................................. 65930.2. Features................................................................................................................................... 65930.3. Block Diagram..........................................................................................................................66030.4. Signal Description.................................................................................................................... 66030.5. Product Dependencies.............................................................................................................66130.6. Functional Description..............................................................................................................66230.7. Register Summary....................................................................................................................67430.8. Register Description.................................................................................................................677
31. TCC Timer/Counter for Control Applications...................................................... 70131.1. Overview.................................................................................................................................. 70131.2. Features................................................................................................................................... 701
SAM D21 Family
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 7
-
31.3. Block Diagram..........................................................................................................................70231.4. Signal Description.................................................................................................................... 70331.5. Product Dependencies.............................................................................................................70331.6. Functional Description..............................................................................................................70531.7. Register Summary....................................................................................................................73931.8. Register Description.................................................................................................................741
32. USB Universal Serial Bus...................................................................................78832.1. Overview.................................................................................................................................. 78832.2. Features................................................................................................................................... 78832.3. USB Block Diagram..................................................................................................................78932.4. Signal Description.................................................................................................................... 78932.5. Product Dependencies.............................................................................................................78932.6. Functional Description..............................................................................................................79132.7. Register Summary....................................................................................................................81132.8. Register Description.................................................................................................................815
33. ADC Analog-to-Digital Converter........................................................................88833.1. Overview.................................................................................................................................. 88833.2. Features................................................................................................................................... 88833.3. Block Diagram..........................................................................................................................88933.4. Signal Description.................................................................................................................... 88933.5. Product Dependencies.............................................................................................................89033.6. Functional Description..............................................................................................................89133.7. Register Summary....................................................................................................................90133.8. Register Description.................................................................................................................902
34. AC Analog Comparators.....................................................................................92734.1. Overview.................................................................................................................................. 92734.2. Features................................................................................................................................... 92734.3. Block Diagram..........................................................................................................................92834.4. Signal Description.................................................................................................................... 92934.5. Product Dependencies.............................................................................................................92934.6. Functional Description..............................................................................................................93034.7. Register Summary....................................................................................................................94034.8. Register Description.................................................................................................................940
35. DAC Digital-to-Analog Converter........................................................................95735.1. Overview.................................................................................................................................. 95735.2. Features................................................................................................................................... 95735.3. Block Diagram..........................................................................................................................95735.4. Signal Description.................................................................................................................... 95735.5. Product Dependencies.............................................................................................................95735.6. Functional Description..............................................................................................................95935.7. Register Summary....................................................................................................................96335.8. Register Description.................................................................................................................963
36. Peripheral Touch Controller (PTC)........................................................................ 974
SAM D21 Family
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 8
-
36.1. Overview.................................................................................................................................. 97436.2. Features................................................................................................................................... 97436.3. Block Diagram..........................................................................................................................97536.4. Signal Description.................................................................................................................... 97636.5. System Dependencies............................................................................................................. 97636.6. Functional Description..............................................................................................................978
37. Electrical Characteristics....................................................................................... 97937.1. Disclaimer.................................................................................................................................97937.2. Thermal Considerations........................................................................................................... 97937.3. Absolute Maximum Ratings......................................................................................................98037.4. General Operating Ratings.......................................................................................................98037.5. Supply Characteristics..............................................................................................................98137.6. Maximum Clock Frequencies...................................................................................................98137.7. Power Consumption.................................................................................................................98337.8. Peripheral Power Consumption................................................................................................98837.9. I/O Pin Characteristics..............................................................................................................99137.10. Injection Current.......................................................................................................................99337.11. Analog Characteristics............................................................................................................. 99437.12. NVM Characteristics.............................................................................................................. 100837.13. Oscillators Characteristics......................................................................................................100937.14. PTC Typical Characteristics...................................................................................................101737.15. USB Characteristics...............................................................................................................102337.16. Timing Characteristics............................................................................................................1024
38. Electrical Characteristics at 105C...................................................................... 103438.1. Disclaimer...............................................................................................................................103438.2. Absolute Maximum Ratings....................................................................................................103438.3. General Operating Ratings.....................................................................................................103438.4. Maximum Clock Frequencies.................................................................................................103538.5. Power Consumption...............................................................................................................103638.6. Analog Characteristics........................................................................................................... 103938.7. NVM Characteristics...............................................................................................................104738.8. Oscillators Characteristics......................................................................................................104838.9. USB Characteristics............................................................................................................... 105438.10. Timing Characteristics............................................................................................................1054
39. Electrical Characteristics at 125C...................................................................... 105539.1. Disclaimer...............................................................................................................................105539.2. Absolute Maximum Ratings....................................................................................................105539.3. General Operating Ratings.....................................................................................................105539.4. Maximum Clock Frequencies.................................................................................................105639.5. Power Consumption...............................................................................................................105939.6. Analog Characteristics........................................................................................................... 106239.7. NVM Characteristics...............................................................................................................107439.8. Oscillators Characteristics......................................................................................................107539.9. Timing Characteristics............................................................................................................1085
SAM D21 Family
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 9
-
40. AEC-Q100 125C Specifications.........................................................................109040.1. Disclaimer...............................................................................................................................109040.2. Thermal Considerations......................................................................................................... 109040.3. Absolute Maximum Ratings....................................................................................................109040.4. General Operating Ratings.....................................................................................................109140.5. Supply Characteristics............................................................................................................109140.6. Maximum Clock Frequencies.................................................................................................109240.7. Power Consumption...............................................................................................................109540.8. I/O Pin Characteristics............................................................................................................109840.9. Analog Characteristics............................................................................................................110140.10. NVM Characteristics...............................................................................................................111240.11. Oscillator Characteristics........................................................................................................ 111440.12. PTC Characteristics............................................................................................................... 1123
41. Packaging Information......................................................................................... 112741.1. Package Drawings..................................................................................................................112741.2. Soldering Profile..................................................................................................................... 1151
42. Schematic Checklist............................................................................................ 115242.1. Introduction.............................................................................................................................115242.2. Power Supply......................................................................................................................... 115242.3. External Analog Reference Connections................................................................................115342.4. External Reset Circuit.............................................................................................................115442.5. Clocks and Crystal Oscillators................................................................................................115542.6. Unused or Unconnected Pins.................................................................................................115942.7. Programming and Debug Ports.............................................................................................. 115942.8. USB Interface......................................................................................................................... 1162
43. Conventions.........................................................................................................116443.1. Numerical Notation................................................................................................................. 116443.2. Memory Size and Type...........................................................................................................116443.3. Frequency and Time...............................................................................................................116443.4. Registers and Bits.................................................................................................................. 1165
44. Acronyms and Abbreviations............................................................................... 1166
45. Data Sheet Revision History................................................................................116945.1. Rev. C 06/2018....................................................................................................................116945.2. Rev. B 04/2018.................................................................................................................... 116945.3. Rev. A 01/2017.................................................................................................................... 116945.4. Rev. O 12/2016....................................................................................................................117045.5. Rev. N 10/2016....................................................................................................................117045.6. Rev. M 09/2016....................................................................................................................117145.7. Rev. L 09/2016.....................................................................................................................117145.8. Rev. K 09/2016.................................................................................................................... 117245.9. Rev. J 07/2016.....................................................................................................................117345.10. Rev. I 03/2016..................................................................................................................... 117345.11. Rev. H 01/2016....................................................................................................................1174
SAM D21 Family
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 10
-
45.12. Rev. G 09/2015................................................................................................................... 117545.13. Rev. F 07/2015.................................................................................................................... 117645.14. Rev. E 02/2015....................................................................................................................117745.15. Rev. D 09/2014....................................................................................................................117845.16. Rev. C 07/2014....................................................................................................................117945.17. Rev. B 07/2014....................................................................................................................117945.18. Rev. A - 02/2014.....................................................................................................................1184
The Microchip Web Site.............................................................................................1185
Customer Change Notification Service......................................................................1185
Customer Support......................................................................................................1185
Product Identification System.................................................................................... 1186
Microchip Devices Code Protection Feature............................................................. 1186
Legal Notice...............................................................................................................1187
Trademarks................................................................................................................1187
Quality Management System Certified by DNV.........................................................1188
Worldwide Sales and Service.................................................................................... 1189
SAM D21 Family
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 11
-
1. DescriptionThe SAM D21 is a series of low-power microcontrollers using the 32-bit ARM Cortex-M0+ processor,and ranging from 32-pins to 64-pins with up to 256 KB Flash and 32 KB of SRAM. The SAM D21 operateat a maximum frequency of 48 MHz and reach 2.46 CoreMark/MHz. They are designed for simple andintuitive 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 includeintelligent and flexible peripherals, Event System for inter-peripheral signaling, and support for capacitivetouch button, slider, and wheel user interfaces.
The SAM D21 provide the following features: In-system programmable Flash, 12-channel Direct MemoryAccess Controller (DMAC), 12-channel Event System, programmable Interrupt Controller, up to 52programmable I/O pins, 32-bit Real-Time Clock and Calendar (RTC), up to five 16-bit Timer/Counters(TC) and three 24-bit Timer/Counters for Control (TCC), where each TC can be configured to performfrequency and waveform generation, accurate program execution timing or input capture with time andfrequency measurement of digital signals. The TCs can operate in 8- or 16-bit mode, selected TCs canbe cascaded to form a 32-bit TC, and three timer/counters have extended functions optimized for motor,lighting, and other control applications. The series provide one full-speed USB 2.0 embedded host anddevice interface; up to six Serial Communication Modules (SERCOM) that each can be configured to actas an USART, UART, SPI, I2C up to 3.4MHz, SMBus, PMBus, and LIN slave; two-channel I2S interface;up to twenty-channel 350 ksps 12-bit ADC with programmable gain and optional oversampling anddecimation supporting up to 16-bit resolution, one 10-bit 350 ksps DAC, up to four analog comparatorswith Window mode, Peripheral Touch Controller (PTG) supporting up to 256 buttons, sliders, wheels, andproximity sensing; programmable Watchdog Timer (WDT), brown-out detector and power-on Reset andtwo-pin Serial Wire Debug (SWD) program and debug interface.
All devices have accurate and low-power external and internal oscillators. All oscillators can be used as asource for the system clock. Different clock domains can be independently configured to run at differentfrequencies, enabling power saving by running each peripheral at its optimal clock frequency, and thusmaintaining a high CPU frequency while reducing power consumption.
The SAM D21 have two software-selectable sleep modes, Idle and Stand-by. In Idle mode, the CPU isstopped while all other functions can be kept running. In Stand-by mode, all clocks and functions arestopped, expect those selected to continue running. The device supports SleepWalking. This featureallows the peripheral to wake up from sleep based on predefined conditions, and thus allows the CPU towake up only when needed, e.g., when a threshold is crossed or a result is ready. The Event Systemsupports synchronous and asynchronous events, allowing peripherals to receive, react to and sendevents even in Stand-by mode.
The Flash program memory can be reprogrammed in-system through the SWD interface. The sameinterface can be used for non-intrusive on-chip debug of application code. A boot loader running in thedevice can use any communication interface to download and upgrade the application program in theFlash memory.
The SAM D21 microcontrollers are supported with a full suite of program and system development tools,including C compilers, macro assemblers, program debugger/simulators, programmers, and evaluationkits.
SAM D21 FamilyDescription
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 12
-
2. Configuration SummaryTable 2-1.SAM D21 E/G/J and SAM D21 EL/GL Product Family Features
Device
Prog
ram
Mem
ory
(KB
)
Dat
a M
emor
y (K
B)
Pins
Pack
ages
Oscillators Peripherals Analog
Inte
rnal
Exte
rnal
USB
SER
CO
M
TC/W
avef
orm
Out
put C
hann
els
per T
Cx
Inst
ance
TCC
Wav
efor
m O
utpu
t Cha
nnel
s pe
r TC
Cx
Inst
ance
I2S
DM
A C
hann
els
RTC
WD
T
Even
t Sys
tem
(Cha
nnel
s)
Exte
rnal
Inte
rrup
t Lin
es
I/O P
ins
AD
C C
hann
els
Ana
log
Com
para
tor
DA
C
PTC
(Mut
ual/S
elf-c
apac
itanc
e C
hann
els)
"
ATSAMD21E15A 32 4
32TQFP,
QFN
OSC32K,
OSCULP32K,
OSC8M,
DFLL48M,
FDPLL96M
XOSC32K,
XOSC,Y
4
3/2
3
8/4/2
Y
12 Y Y 12 16
26 10
2
Y
60/6
ATSAMD21E16A 64 8
ATSAMD21E17A 128 16
ATSAMD21E18A 256 32
ATSAMD21E15B 32 4
ATSAMD21E16B 64 8
ATSAMD21E15C 32 435 WLCSP
ATSAMD21E16C 64 8
ATSAMD21G15A 32 4
48TQFP,
QFN
6 8/4/2
38 14 120/10
ATSAMD21G16A 64 8
ATSAMD21G17A
(see Note 1)
128 16
ATSAMD21G18A
(see Note 1)
256 32
ATSAMD21G15B 32 4
ATSAMD21G16B 64 8
ATSAMD21J15A 32 4
64
TQFP,
QFN5/2 52 20 256/16
ATSAMD21J16A 64 8
ATSAMD21J17A 128 16
ATSAMD21J18A 256 32
ATSAMD21J15B 32 4TQFP,QFN,UFBGA
ATSAMD21J16B 64 8
ATSAMD21E15L 32 4 32 TQFP,
QFN XOSC N4 3/2 6/4/2
N26 14
4 NATSAMD21E16L 64 8 32
ATSAMD21G16L 64 8 48 QFN 6 5/2 8/4/2 38 18
Note: This part number is also available in a 45-Ball WLCSP package with a total of five TC instancesand 15 ADC Channels..
SAM D21 FamilyConfiguration Summary
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 13
-
3. Ordering Information(1)
ATSAMD 21 E 15 A - M U T
Product FamilySAMD = General Purpose Microcontroller
21 = Cortex M0 + CPU, Basic Feature Set
E = 32 Pins (35 Pins for WLCSP)G = 48 Pins (45 Pins for WLCSP)J = 64 Pins
No character = Tray (Default) T = Tape and Reel
U = -40 - 85C Matte Sn PlatingN = -40 - 105C Matte Sn PlatingF = -40 - 125C Matte Sn PlatingZ = -40 - 125C Matte Sn Plating (AEC-Q100 Qualified)
A = TQFP(4)M = QFN(4) U = WLCSP (2,3)
C = UFBGA
+ DMA + USB
Product Series
Flash Memory Density
Device VariantA = Default VariantB = Added RWW support for 32 KB and 64 KB memory optionsC = Silicon revision F for WLCSP45 package optionL = Pinout optimized for Analog and PWM
Pin Count
Package Carrier
Package Grade
18 = 256 KB17 = 128 KB16 = 64 KB15 = 32 KB
Package Type
Note:1. Not all combinations are valid. The available ordering numbers are listed in the Configuration
Summary.2. WLCSP package is available in -40C to 85C operating temperature range.3. WLCSP parts are programmed with a specific SPI/I2C bootloader. Refer to the "Application Note
AT09002" for additional information. Contact Microchip sales office for additional information onavailability.
4. The AEC-Q100 grade 1 qualified version is only offered in the TQFP and QFN packages. The QFNwill have wettable flanks, and both packages will be assembled with gold bond wires.
SAM D21 FamilyOrdering Information(1)
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 14
-
4. Block Diagram
6 x SERCOM
8 x Timer Counter
REAL TIME COUNTER
AHB-APB BRIDGE C
M
MHIGH-SPEED BUS MATRIX
POR
T
PO
RT
WATCHDOG TIMER
SERIAL WIRESWDIO
S
CORTEX-M0+ PROCESSOR Fmax 48 MHz
SWCLK
DEVICE SERVICE
UNIT
AHB-APB BRIDGE A
20-CHANNEL 12-bit ADC 350KSPS
AIN[19..0]
VREFA
AIN[3..0]
S
SRAM CONTROLLER
32/16/8/4KB RAM
M
RESET CONTROLLER
SLEEP CONTROLLER
CLOCK CONTROLLER
POWER MANAGER
RESETN
5 x TIMER / COUNTER
EVE
NT
SYST
EM
S
6 x SERCOM
Up to 4 ANALOG COMPARATORS
SYSTEM CONTROLLER
XOUT XIN
XOUT32 XIN32
OSCULP32K
OSC32K
OSC8M
DFLL48M
BOD33
XOSC32K
XOSC
VREF
X[15..0]
Y[15..0]
PERIPHERAL TOUCH
CONTROLLER
PERIPHERAL ACCESS CONTROLLER
AHB-APB BRIDGE B
VREFA
VOUT
10-bit DAC
EXTERNAL INTERRUPT CONTROLLER
PERIPHERAL ACCESS CONTROLLER
PERIPHERAL ACCESS CONTROLLER
EXTINT[15..0] NMI
GCLK_IO[7..0]
S
PAD0
WO1
PAD1PAD2PAD3
WO0
VREFB
256/128/64/32KB NVM
NVM CONTROLLER
Cache
S
DMA
USB FSDEVICE
MINI-HOST
DP
DM
3x TIMER / COUNTERFOR CONTROL
WOn
IOBUS
FDPLL96MDMA
DMA
DMA
DMA
DMA
MCK[1..0]SCK[1..0]INTER-IC
SOUND CONTROLLER
SD[1..0]FS[1..0]
DMA
MIC
RO
TRAC
E BU
FFER
SOF 1KHZ
WO0WO1
(2)
GENERIC CLOCKCONTROLLER
CMP[1..0]
1. Some products have different number of SERCOM instances, Timer/Counter instances, PTCsignals and ADC signals. Refer to the Configuration Summary for details.
2. The three TCC instances have different configurations, including the number of Waveform Output(WO) lines. Refer to the TCC Configuration for details.
Related Links2. Configuration Summary
SAM D21 FamilyBlock Diagram
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 15
-
7.2.5 TCC Configurations
SAM D21 FamilyBlock Diagram
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 16
-
5. Pinout
5.1 SAM D21J
5.1.1 QFN64 / TQFP64
PA00 1PA01 2PA02 3PA03 4PB04 5PB05 6
GNDANA 7VDDANA 8
PB06 9PB07 10PB08 11PB09 12PA04 13PA05 14PA06 15PA07 16
PA08
17PA
0918
PA10
19PA
1120
VDD
IO21
GN
D22
PB10
23PB
1124
PB12
25PB
1326
PB14
27PB
1528
PA12
29PA
1330
PA14
31PA
1532
VDDIO48GND47PA2546PA2445PA2344PA2243PA2142PA2041PB1740PB1639PA1938PA1837PA1736PA1635VDDIO34GND33
PB22
49PB
2350
PA27
51R
ESET
52PA
2853
GN
D54
VDD
CO
RE
55VD
DIN
56PA
3057
PA31
58PB
3059
PB31
60PB
0061
PB01
62PB
0263
PB03
64
DIGITAL PINANALOG PINOSCILLATORGROUNDINPUT SUPPLY REGULATED OUTPUT SUPPLYRESET PIN
SAM D21 FamilyPinout
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 17
-
5.1.2 UFBGA64
SAM D21 FamilyPinout
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 18
-
5.2 SAM D21G
5.2.1 QFN48 / TQFP48
PA21
PA00 1PA01 2PA02 3PA03 4
GNDANA 5VDDANA 6
PB08 7PB09 8PA04 9PA05 10PA06 11PA07 12
PA08
13PA
0914
PA10
15PA
1116
VDD
IO17
GN
D18
PB10
19PB
1120
PA12
21PA
1322
PA14
23PA
1524
VDDIO36GND35PA2534PA2433PA2332PA2231
30PA2029PA1928PA1827PA1726PA1625
PB22
37PB
2338
PA27
39R
ESET
40PA
2841
GN
D42
VDD
CO
RE
43VD
DIN
44PA
3045
PA31
46PB
0247
PB03
48
DIGITAL PINANALOG PINOSCILLATORGROUNDINPUT SUPPLYREGULATED OUTPUT SUPPLYRESET PIN
SAM D21 FamilyPinout
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 19
-
5.2.2 WLCSP45
A
SAM D21 FamilyPinout
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 20
-
5.3 SAM D21GxL
5.3.1 QFN48
PA21
PA02 1PA03 2PB04 3PB05 4
GNDANA 5VDDANA 6
PB08 7PB09 8PA04 9PA05 10PA06 11PA07 12
PA08
13PA
0914
PA10
15PA
1116
VDD
IO17
GN
D18
PB10
19PB
1120
PA12
21PA
1322
PA14
23PA
1524
VDDIO36GND35PA2534PA2433PA2332PA2231
30PA2029PA1928PA1827PA1726PA1625
PA27
3738PA
2839
RES
ETN
4041
GN
D
42VD
DC
OR
E
43VD
DIN
44PA
30
45PA
31
46PB
0247
PB03
48
DIGITAL PINANALOG PINOSCILLATORGROUNDINPUT SUPPLYREGULATED OUTPUT SUPPLYRESET PIN
PB00
PB01
SAM D21 FamilyPinout
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 21
-
5.4 SAM D21ExA/B/C
5.4.1 QFN32 / TQFP32
PA00 1PA01 2PA02 3PA03 4PA04 5PA05 6PA06 7PA07 8
VDD
ANA
9G
ND
10PA
0811
PA09
12PA
1013
PA11
14PA
1415
PA15
16
PA2524PA2423PA2322PA2221PA1920PA1819PA1718PA1617
PA27
25R
ESET
26PA
2827
GN
D28
VDD
CO
RE
29VD
DIN
30PA
3031
PA31
32
DIGITAL PINANALOG PINOSCILLATORGROUNDINPUT SUPPLYREGULATED OUTPUT SUPPLYRESET PIN
SAM D21 FamilyPinout
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 22
-
5.4.2 WLCSP35
PA00
PA01
GNDA
NA
VDDA
NA
PA06
VDDIO PA1
5
PA18
PA19
PA23
PA24
PA25
PA14
PA16
PA17
PA22
PA27
RESE
T
PA03
PA05
PA10
PA08
VDDIN
VDDC
ORE
PA02
PA04
PA07
PA31
PA30
PA11
PA09
PA28
GND
GND
GND
1
2
3
4
5
6
A B C D E F
SAM D21 FamilyPinout
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 23
-
5.5 SAM D21ExL
5.5.1 QFN32 / TQFP32
PB04
1
PB05
2PA02
3PA03
4PA04 5PA05 6PA06 7PA07 8
VDD
IO/A
NA
9G
ND
10PA
0811
PA09
12PA
1013
PA11
14PA
1415
PA15
16PA2524PA2423PA2322PA2221PA1920PA1819PA1718PA1617
25R
ESET
N2627
GN
D
28VD
DC
OR
E
29VD
DIO
30PA
30
31PA
31
32PB
02PB
03
Digital PinAnalog PinOscillator PinGroundInput SupplyRegulated Output SupplyReset Pin
SAM D21 FamilyPinout
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 24
-
6. Signal Descriptions ListThe following table gives details on signal names classified by peripheral.
Signal Name Function Type Active Level
Analog Comparators - AC
AIN[3:0] AC Analog Inputs Analog
CMP[:0] AC Comparator Outputs Digital
Analog Digital Converter - ADC
AIN[19:0] ADC Analog Inputs Analog
VREFA ADC Voltage External Reference A Analog
VREFB ADC Voltage External Reference B Analog
Digital Analog Converter - DAC
VOUT DAC Voltage output Analog
VREFA DAC Voltage External Reference Analog
External Interrupt Controller
EXTINT[15:0] External Interrupts Input
NMI External Non-Maskable Interrupt Input
Generic Clock Generator - GCLK
GCLK_IO[7:0] Generic Clock (source clock or generic clock generatoroutput)
I/O
Inter-IC Sound Controller - I2S
MCK[1:0] Master Clock I/O
SCK[1:0] Serial Clock I/O
FS[1:0] I2S Word Select or TDM Frame Sync I/O
SD[1:0] Serial Data Input or Output I/O
Power Manager - PM
RESETN Reset Input Low
Serial Communication Interface - SERCOMx
PAD[3:0] SERCOM I/O Pads I/O
System Control - SYSCTRL
XIN Crystal Input Analog/ Digital
XIN32 32kHz Crystal Input Analog/ Digital
XOUT Crystal Output Analog
SAM D21 FamilySignal Descriptions List
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 25
-
Signal Name Function Type Active Level
XOUT32 32kHz Crystal Output Analog
Timer Counter - TCx
WO[1:0] Waveform Outputs Output
Timer Counter - TCCx
WO[1:0] Waveform Outputs Output
Peripheral Touch Controller - PTC
X[15:0] PTC Input Analog
Y[15:0] PTC Input Analog
General Purpose I/O - PORT
PA25 - PA00 Parallel I/O Controller I/O Port A I/O
PA28 - PA27 Parallel I/O Controller I/O Port A I/O
PA31 - PA30 Parallel I/O Controller I/O Port A I/O
PB17 - PB00 Parallel I/O Controller I/O Port B I/O
PB23 - PB22 Parallel I/O Controller I/O Port B I/O
PB31 - PB30 Parallel I/O Controller I/O Port B I/O
Universal Serial Bus - USB
DP DP for USB I/O
DM DM for USB I/O
SOF 1kHz USB Start of Frame I/O
SAM D21 FamilySignal Descriptions List
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 26
-
7. I/O Multiplexing and Considerations
7.1 Multiplexed SignalsEach pin is by default controlled by the PORT as a general purpose I/O and alternatively it can beassigned to one of the peripheral functions A, B, C, D, E, F, G or H. To enable a peripheral function on apin, the Peripheral Multiplexer Enable bit in the Pin Configuration register corresponding to that pin(PINCFGn.PMUXEN, n = 0-31) in the PORT must be written to one. The selection of peripheral functionA to H is done by writing to the Peripheral Multiplexing Odd and Even bits in the Peripheral Multiplexingregister (PMUXn.PMUXE/O) in the PORT.
This table describes the peripheral signals multiplexed to the PORT I/O pins.
Table 7-1. PORT Function Multiplexing for A, B, and C Variant DevicesPin(1) I/O Pin Supply A B(2)(3) C D E F G H
SAMD21E SAMD21G SAMD21J EIC REF ADC AC PTC DAC SERCOM(2)(3) SERCOM-ALT TC(4)
/TCC
TCC COM AC/
GCLK
1 1 1 PA00 VDDANA EXTINT[0] SERCOM1/PAD[0]
TCC2/WO[0]
2 2 2 PA01 VDDANA EXTINT[1] SERCOM1/PAD[1]
TCC2/WO[1]
3 3 3 PA02 VDDANA EXTINT[2] AIN[0] Y[0] VOUT
4 4 4 PA03 VDDANA EXTINT[3] ADC/VREFADAC/
VREFA
AIN[1] Y[1]
5 PB04 VDDANA EXTINT[4] AIN[12] Y[10]
6 PB05 VDDANA EXTINT[5] AIN[13] Y[11]
9 PB06 VDDANA EXTINT[6] AIN[14] Y[12]
10 PB07 VDDANA EXTINT[7] AIN[15] Y[13]
7 11 PB08 VDDANA EXTINT[8] AIN[2] Y[14] SERCOM4/PAD[0]
TC4/WO[0]
8 12 PB09 VDDANA EXTINT[9] AIN[3] Y[15] SERCOM4/PAD[1]
TC4/WO[1]
5 9 13 PA04 VDDANA EXTINT[4] ADC/VREFB
AIN[4] AIN[0] Y[2] SERCOM0/PAD[0]
TCC0/WO[0]
6 10 14 PA05 VDDANA EXTINT[5] AIN[5] AIN[1] Y[3] SERCOM0/PAD[1]
TCC0/WO[1]
7 11 15 PA06 VDDANA EXTINT[6] AIN[6] AIN[2] Y[4] SERCOM0/PAD[2]
TCC1/WO[0]
8 12 16 PA07 VDDANA EXTINT[7] AIN[7] AIN[3] Y[5] SERCOM0/PAD[3]
TCC1/WO[1] I2S/SD[0]
11 13 17 PA08 VDDIO NMI AIN[16] X[0] SERCOM0/PAD[0]
SERCOM2/PAD[0]
TCC0/WO[0] TCC1/WO[2]
I2S/SD[1]
12 14 18 PA09 VDDIO EXTINT[9] AIN[17] X[1] SERCOM0/PAD[1]
SERCOM2/PAD[1]
TCC0/WO[1] TCC1/WO[3]
I2S/MCK[0]
13 15 19 PA10 VDDIO EXTINT[10] AIN[18] X[2] SERCOM0/PAD[2]
SERCOM2/PAD[2]
TCC1/WO[0] TCC0/WO[2]
I2S/SCK[0]
GCLK_IO[4]
14 16 20 PA11 VDDIO EXTINT[11] AIN[19] X[3] SERCOM0/PAD[3]
SERCOM2/PAD[3]
TCC1/WO[1] TCC0/WO[3]
I2S/FS[0] GCLK_IO[5]
19 23 PB10 VDDIO EXTINT[10] SERCOM4/PAD[2]
TC5/WO[0] TCC0/WO[4]
I2S/MCK[1]
GCLK_IO[4]
20 24 PB11 VDDIO EXTINT[11] SERCOM4/PAD[3]
TC5/WO[1] TCC0/WO[5]
I2S/SCK[1]
GCLK_IO[5]
25 PB12 VDDIO EXTINT[12] X[12] SERCOM4/PAD[0]
TC4/WO[0] TCC0/WO[6]
I2S/FS[1] GCLK_IO[6]
26 PB13 VDDIO EXTINT[13] X[13] SERCOM4/PAD[1]
TC4/WO[1] TCC0/WO[7]
GCLK_IO[7]
SAM D21 FamilyI/O Multiplexing and Considerations
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 27
-
Pin(1) I/O Pin Supply A B(2)(3) C D E F G H
SAMD21E SAMD21G SAMD21J EIC REF ADC AC PTC DAC SERCOM(2)(3) SERCOM-ALT TC(4)
/TCC
TCC COM AC/
GCLK
27 PB14 VDDIO EXTINT[14] X[14] SERCOM4/PAD[2]
TC5/WO[0] GCLK_IO[0]
28 PB15 VDDIO EXTINT[15] X[15] SERCOM4/PAD[3]
TC5/WO[1] GCLK_IO[1]
21 29 PA12 VDDIO EXTINT[12] SERCOM2/PAD[0]
SERCOM4/PAD[0]
TCC2/WO[0] TCC0/WO[6]
AC/CMP[0]
22 30 PA13 VDDIO EXTINT[13] SERCOM2/PAD[1]
SERCOM4/PAD[1]
TCC2/WO[1] TCC0/WO[7]
AC/CMP[1]
15 23 31 PA14 VDDIO EXTINT[14] SERCOM2/PAD[2]
SERCOM4/PAD[2]
TC3/WO[0] TCC0/WO[4]
GCLK_IO[0]
16 24 32 PA15 VDDIO EXTINT[15] SERCOM2/PAD[3]
SERCOM4/PAD[3]
TC3/WO[1] TCC0/WO[5]
GCLK_IO[1]
17 25 35 PA16 VDDIO EXTINT[0] X[4] SERCOM1/PAD[0]
SERCOM3/PAD[0]
TCC2/WO[0] TCC0/WO[6]
GCLK_IO[2]
18 26 36 PA17 VDDIO EXTINT[1] X[5] SERCOM1/PAD[1]
SERCOM3/PAD[1]
TCC2/WO[1] TCC0/WO[7]
GCLK_IO[3]
19 27 37 PA18 VDDIO EXTINT[2] X[6] SERCOM1/PAD[2]
SERCOM3/PAD[2]
TC3/WO[0] TCC0/WO[2]
AC/CMP[0]
20 28 38 PA19 VDDIO EXTINT[3] X[7] SERCOM1/PAD[3]
SERCOM3/PAD[3]
TC3/WO[1] TCC0/WO[3]
I2S/SD[0] AC/CMP[1]
39 PB16 VDDIO EXTINT[0] SERCOM5/PAD[0]
TC6/WO[0] TCC0/WO[4]
I2S/SD[1] GCLK_IO[2]
40 PB17 VDDIO EXTINT[1] SERCOM5/PAD[1]
TC6/WO[1] TCC0/WO[5]
I2S/MCK[0]
GCLK_IO[3]
29 41 PA20 VDDIO EXTINT[4] X[8] SERCOM5/PAD[2]
SERCOM3/PAD[2]
TC7/WO[0] TCC0/WO[6]
I2S/SCK[0]
GCLK_IO[4]
30 42 PA21 VDDIO EXTINT[5] X[9] SERCOM5/PAD[3]
SERCOM3/PAD[3]
TC7/WO[1] TCC0/WO[7]
I2S/FS[0] GCLK_IO[5]
21 31 43 PA22 VDDIO EXTINT[6] X[10] SERCOM3/PAD[0]
SERCOM5/PAD[0]
TC4/WO[0] TCC0/WO[4]
GCLK_IO[6]
22 32 44 PA23 VDDIO EXTINT[7] X[11] SERCOM3/PAD[1]
SERCOM5/PAD[1]
TC4/WO[1] TCC0/WO[5]
USB/SOF1kHz
GCLK_IO[7]
23 33 45 PA24(6) VDDIO EXTINT[12] SERCOM3/PAD[2]
SERCOM5/PAD[2]
TC5/WO[0] TCC1/WO[2]
USB/DM
24 34 46 PA25(6) VDDIO EXTINT[13] SERCOM3/PAD[3]
SERCOM5/PAD[3]
TC5/WO[1] TCC1/WO[3]
USB/DP
37 49 PB22 VDDIO EXTINT[6] SERCOM5/PAD[2]
TC7/WO[0] GCLK_IO[0]
38 50 PB23 VDDIO EXTINT[7] SERCOM5/PAD[3]
TC7/WO[1] GCLK_IO[1]
25 39 51 PA27 VDDIO EXTINT[15] GCLK_IO[0]
27 41 53 PA28 VDDIO EXTINT[8] GCLK_IO[0]
31 45 57 PA30 VDDIO EXTINT[10] SERCOM1/PAD[2]
TCC1/WO[0] SWCLK GCLK_IO[0]
32 46 58 PA31 VDDIO EXTINT[11] SERCOM1/PAD[3]
TCC1/WO[1] SWDIO(5)
59 PB30 VDDIO EXTINT[14] SERCOM5/PAD[0]
TCC0/WO[0] TCC1/WO[2]
60 PB31 VDDIO EXTINT[15] SERCOM5/PAD[1]
TCC0/WO[1] TCC1/WO[3]
61 PB00 VDDANA EXTINT[0] AIN[8] Y[6] SERCOM5/PAD[2]
TC7/WO[0]
62 PB01 VDDANA EXTINT[1] AIN[9] Y[7] SERCOM5/PAD[3]
TC7/WO[1]
47 63 PB02 VDDANA EXTINT[2] AIN[10] Y[8] SERCOM5/PAD[0]
TC6/WO[0]
48 64 PB03 VDDANA EXTINT[3] AIN[11] Y[9] SERCOM5/PAD[1]
TC6/WO[1]
1. Use the SAMD21J pinout muxing for WLCSP45 package.
SAM D21 FamilyI/O Multiplexing and Considerations
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 28
-
2. All analog pin functions are on peripheral function B. Peripheral function B must be selected todisable the digital control of the pin.
3. Only some pins can be used in SERCOM I2C mode. Refer to 7.2.3 SERCOM I2C Pins.4. Note that TC6 and TC7 are not supported on the SAM D21E and G devices. Refer to 2.
Configuration Summary for details.5. This function is only activated in the presence of a debugger.6. If the PA24 and PA25 pins are not connected, it is recommended to enable a pull-up on PA24 and
PA25 through input GPIO mode. The aim is to avoid an eventually extract power consumption(
-
Pin I/O Pin Supply A B(1)(2) C D E F G H
SAMD21ExL SAMD21GxL EIC REF ADC AC AC1 DAC SERCOM(1)(2) SERCOM-ALT(7) TC(3)
/TCC
TCC COM AC/
GCLK
29 PA20 VDDIO EXTINT[4] SERCOM5/PAD[2]
SERCOM3/PAD[2]
TC7/WO[0] TCC0/WO[6]
GCLK_IO[4]
30 PA21 VDDIO EXTINT[5] SERCOM5/PAD[3]
SERCOM3/PAD[3]
TC7/WO[1] TCC0/WO[7]
GCLK_IO[5]
21 31 PA22 VDDIO EXTINT[6] SERCOM3/PAD[0]
SERCOM5/PAD[0]
TC4/WO[0] TCC0/WO[4]
GCLK_IO[6]
22 32 PA23 VDDIO EXTINT[7] SERCOM3/PAD[1]
SERCOM5/PAD[1]
TC4/WO[1] TCC0/WO[5]
GCLK_IO[7]
23 33 PA24(5) VDDIO EXTINT[12] SERCOM3/PAD[2]
SERCOM5/PAD[2]
TC5/WO[0] TCC1/WO[2]
AC1/CMP[0]
24 34 PA25(5) VDDIO EXTINT[13] SERCOM3/PAD[3]
SERCOM5/PAD[3]
TC5/WO[1] TCC1/WO[3]
AC1/CMP[1]
37 PA27 VDDIO EXTINT[15] GCLK_IO[0]
39 PA28 VDDIO EXTINT[8] GCLK_IO[0]
29 43 PA30 VDDIO EXTINT[10] SERCOM1/PAD[2]
TCC1/WO[0] SWCLK GCLK_IO[0]
30 44 PA31 VDDIO EXTINT[11] SERCOM1/PAD[3]
TCC1/WO[1] SWDIO(5)
45 PB00 AIN[8]
46 PB01 AIN[9]
31 47 PB02 VDDANA EXTINT[2] AIN[10] AIN[2] SERCOM5/PAD[0]
TC6/WO[0](6)
32 48 PB03 VDDANA EXTINT[3] AIN[11] AIN[3] SERCOM5/PAD[1]
TC6/WO[1](6)
1. All analog pin functions are on peripheral function B. Peripheral function B must be selected todisable the digital control of the pin.
2. Only some pins can be used in SERCOM I2C mode.3. Note that TC6 and TC7 are not supported on the SAM D21ExL and SAM D21GxL devices. Refer to
2. Configuration Summary for details.4. This function is only activated in the presence of a debugger.5. If the PA24 and PA25 pins are not connected, it is recommended to enable a pull-up on PA24 and
PA25 through input GPIO mode. The aim is to avoid an eventually extract power consumption(
-
Table 7-3.Oscillator Pinout
Oscillator Supply Signal I/O pin
XOSC VDDIO XIN PA14
XOUT PA15
XOSC32K VDDANA XIN32 PA00
XOUT32 PA01
7.2.2 Serial Wire Debug Interface PinoutOnly the SWCLK pin is mapped to the normal PORT functions. A debugger cold-plugging or hot-pluggingdetection will automatically switch the SWDIO port to the SWDIO function.
Table 7-4.Serial Wire Debug Interface Pinout
Signal Supply I/O pin
SWCLK VDDIO PA30
SWDIO VDDIO PA31
7.2.3 SERCOM I2C PinsTable 7-5.SERCOM Pins Supporting I2C
Device Pins Supporting I2C Hs mode
SAM D21E PA08, PA09, PA16, PA17, PA22, PA23
SAM D21G PA08, PA09, PA12, PA13, PA16, PA17, PA22, PA23
SAM D21J PA08, PA09, PA12, PA13, PA16, PA17, PA22, PA23, PB12, PB13, PB16, PB17,PB30, PB31
7.2.4 GPIO ClustersTable 7-6.GPIO Clusters
PACKAGE CLUSTER GPIO SUPPLIESPINSCONNECTEDTO THECLUSTER
64pins 1 PB31 PB30 PA31 PA30 VDDINpin56/GNDpin54
2 PA28 PA27 PB23 PB22 VDDINpin56/GNDpin54 andVDDIO pin48/GND pin47
3 PA25 PA24 PA23 PA22 PA21 PA20 PB17 PB16 PA19 PA18 PA17 PA16 VDDIO pin48/GND pin47and VDDIOpin34/GNDpin33
4 PA15 PA14 PA13 PA12 PB15 PB14 PB13 PB12 PB11 PB10 VDDIO pin34/GND pin33
SAM D21 FamilyI/O Multiplexing and Considerations
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 31
-
PACKAGE CLUSTER GPIO SUPPLIESPINSCONNECTEDTO THECLUSTER
and VDDIOpin21/GNDpin22
5 PA11 PA10 PA09 PA08 VDDIOpin21/GNDpin22
6 PA07 PA06 PA05 PA04 PB09 PB08 PB07 PB06 VDDANA pin8/GNDANApin7
7 PB05 PB04 PA03 PA02 PA01 PA00 PB03 PB02 PB01 PB00 VDDANA pin8/GNDANApin7
48pins 1 PA31 PA30 VDDINpin44/GNDpin42
2 PA28 PA27 PB23 PB22 VDDINpin44/GNDpin42 andVDDIOpin36/GNDpin35
3 PA25 PA24 PA23 PA22 PA21 PA20 PA19 PA18 PA17 PA16 PA15 PA14 PA13 PA12 PB11 PB10 VDDIOpin36/GNDpin35 andVDDIOpin17/GNDpin18
4 PA11 PA10 PA09 PA08 VDDIOpin17/GNDpin18
5 PA07 PA06 PA05 PA04 PB09 PB08 VDDANA pin6/GNDANA pin5
6 PA03 PA02 PA01 PA00 PB03 PB02 PB05 PB04 PB01 PB00 VDDANA pin6/GNDANA pin5
32pins 1 PA31 PA30 VDDINpin30/GND pin28
2 PA28 PA27 PA25 PA24 PA23 PA22 PA19 PA18 PA17 PA16 PA15 PA14 PA11 PA10 PA09 PA08 VDDINpin30/GND pin28 andVDDANApin9/GNDpin10
3 PA07 PA06 PA05 PA04 PA03 PA02 PA01 PA00 PB05 PB04 PB03 PB02 VDDANApin9/GNDpin10
7.2.5 TCC ConfigurationsThe SAM D21 has three instances of the Timer/Counter for Control applications (TCC) peripheral, ,TCC[2:0]. The following table lists the features for each TCC instance.
SAM D21 FamilyI/O Multiplexing and Considerations
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 32
-
Table 7-7.TCC Configuration Summary
TCC# Channels(CC_NUM)
WaveformOutput
(WO_NUM)
Countersize
Fault Dithering Outputmatrix
Dead TimeInsertion
(DTI)
SWAP Patterngeneration
0 4 8 24-bit Yes Yes Yes Yes Yes Yes
1 2 4 24-bit Yes Yes Yes
2 2 2 16-bit Yes
Note: The number of CC registers (CC_NUM) for each TCC corresponds to the number of compare/capture channels, so that a TCC can have more Waveform Outputs (WO_NUM) than CC registers.
SAM D21 FamilyI/O Multiplexing and Considerations
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 33
-
8. Power Supply and Start-Up Considerations
8.1 Power Domain Overview
VOLTAGEREGULATOR
VDD
IN
VDD
CO
RE
GN
D
DAC
PTC
XOSC32K
OSC32K
VDD
ANA
GN
DAN
A
PA[7:2]
PB[9:0]
PA[1:0]
Digital Logic(CPU, peripherals)
DFLL48M
VDD
IO
OSC8M
XOSC
OSCULP32K
PA[31:16]
PB[31:10]
PA[15:14]
BOD33
POR
PA[13:8]BOD12
FDPLL96M
ADC
AC
AC1
8.2 Power Supply Considerations
8.2.1 Power SuppliesThe device has several different power supply pins:
VDDIO: Powers I/O lines, OSC8M and XOSC. Voltage is 1.62V to 3.63V. VDDIN: Powers I/O lines and the internal regulator. Voltage is 1.62V to 3.63V. VDDANA: Powers I/O lines and the ADC, AC, DAC, PTC, OSCULP32K, OSC32K, XOSC32K.
Voltage is 1.62V to 3.63V. VDDCORE: Internal regulated voltage output. Powers the core, memories, peripherals, FDPLL96M,
and DFLL48M. Voltage is 1.2V.
The same voltage must be applied to both VDDIN, VDDIO and VDDANA. This common voltage isreferred to as VDD in the datasheet.
The ground pins, GND, are common to VDDCORE, VDDIO and VDDIN. The ground pin for VDDANA isGNDANA.
SAM D21 FamilyPower Supply and Start-Up Considerations
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 34
-
For decoupling recommendations for the different power supplies. Refer to Schematic Checklist fordetails.
Related Links42. Schematic Checklist
8.2.2 Voltage RegulatorThe voltage regulator has two different modes:
Normal mode: To be used when the CPU and peripherals are running Low Power (LP) mode: To be used when the regulator draws small static current. It can be used in
standby mode
8.2.3 Typical Powering SchematicsThe device uses a single main supply with a range of 1.62V - 3.63V.
The following figure shows the recommended power supply connection.
Figure 8-1.Power Supply Connection
(1.62V 3.63V)Main Supply VDDIO
VDDANA
VDDIN
VDDCORE
GND
GNDANA
DEVICE
8.2.4 Power-Up Sequence
8.2.4.1 Minimum Rise RateThe integrated Power-on Reset (POR) circuitry monitoring the VDDANA power supply requires aminimum rise rate. Refer to the Electrical Characteristics for details.
Related Links37. Electrical Characteristics
SAM D21 FamilyPower Supply and Start-Up Considerations
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 35
-
8.2.4.2 Maximum Rise RateThe rise rate of the power supply must not exceed the values described in Electrical Characteristics.Refer to the Electrical Characteristics for details.
Related Links37. Electrical Characteristics
8.3 Power-UpThis section summarizes the power-up sequence of the device. The behavior after power-up is controlledby the Power Manager. Refer to PM Power Manager for details.
Related Links16. PM Power Manager
8.3.1 Starting of ClocksAfter power-up, the device is set to its initial state and kept in reset, until the power has stabilizedthroughout the device. Once the power has stabilized, the device will use a 1MHz clock. This clock isderived from the 8MHz Internal Oscillator (OSC8M), which is divided by eight and used as a clock sourcefor generic clock generator 0. Generic clock generator 0 is the main clock for the Power Manager (PM).
Some synchronous system clocks are active, allowing software execution.
Refer to the Clock Mask Register section in PM Power Manager for the list of default peripheral clocksrunning. Synchronous system clocks that are running are by default not divided and receive a 1MHz clockthrough generic clock generator 0. Other generic clocks are disabled except GCLK_WDT, which is usedby the Watchdog Timer (WDT).
Related Links16. PM Power Manager
8.3.2 I/O PinsAfter power-up, the I/O pins are tri-stated.
8.3.3 Fetching of Initial InstructionsAfter reset has been released, the CPU starts fetching PC and SP values from the reset address, whichis 0x00000000. This address points to the first executable address in the internal Flash. The code readfrom the Internal Flash is free to configure the clock system and clock sources. Refer to PM PowerManager, GCLK Generic Clock Controller and SYSCTRL System Controller for details. Refer to theARM Architecture Reference Manual for more information on CPU startup (http://www.arm.com).
Related Links16. PM Power Manager17. SYSCTRL System Controller14. Clock System
8.4 Power-On Reset and Brown-Out DetectorThe SAM D21 embeds three features to monitor, warn and/or reset the device:
POR: Power-On Reset on VDDANA
SAM D21 FamilyPower Supply and Start-Up Considerations
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 36
http://www.arm.com
-
BOD33: Brown-Out Detector on VDDANA BOD12: Voltage Regulator Internal Brown-Out Detector on VDDCORE. The Voltage Regulator
Internal BOD is calibrated in production and its calibration configuration is stored in the NVM UserRow. This configuration should not be changed if the user row is written to assure the correctbehavior of the BOD12.
8.4.1 Power-On Reset on VDDANAPOR monitors VDDANA. It is always activated and monitors voltage at startup and also during all thesleep modes. If VDDANA goes below the threshold voltage, the entire chip is reset.
8.4.2 Brown-Out Detector on VDDANABOD33 monitors VDDANA. Refer to SYSCTRL System Controller for details.
Related Links17. SYSCTRL System Controller
8.4.3 Brown-Out Detector on VDDCOREOnce the device has started up, BOD12 monitors the internal VDDCORE.
SAM D21 FamilyPower Supply and Start-Up Considerations
2018 Microchip Technology Inc. Datasheet Complete DS40001882C-page 37
-
9. Product MappingFigure 9-1.SAM D21 Product Mapping
Code
SRAM
Undefined
Peripherals
Reserved
Global Memory Space0x00000000
0x20000000
0x20008000
0x40000000
0x43000000
0x60000000
Internal SRAM
AHB-APB Bridge A
AHB-APB Bridge B
AHB-APB Bridge C
AHB-APB
Internal Flash
Reserved
Code
0x00000000
0x00040000 0x1FFFFFFF
0x20000000 0x20007FFF
0x40000000
0x41000000
0x42000000
0x42FFFFFF
Reserved
PAC0
PM
SYSCTRL
GCLK
WDT
RTC
EIC
AHB-APB Bridge A0x40000000
0x40000400
0x40000800
0x40000C00
0x40001000
0x40001400
0x40001800
0x40FFFFFF 0x40001C00
AHB-APB Bridge B
PAC1
DSU
NVMCTRL
PORT
0x41000000
0x41002000
0x41004000
0x41004400
0x41FFFFFF 0x41007000
SERCOM5
PAC2
EVSYS
SERCOM0
SERCOM1
SERCOM2
SERCOM3
SERCO