Atmel SAM R21E / SAM R21G SMART ARM-Based Wireless Microcontroller DATASHEET SUMMARY Description The Atmel(R) | SMARTTM SAM R21 is a series of low-power microcontrollers using the 32-bit ARM(R) Cortex(R)-M0+ processor and an integrated ultra-low power 2.4GHz ISM band transceiver. SAM R21 devices are available in 32- and 48-pin packages with up to 256KB Flash, 32KB of SRAM and are operating 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. The Atmel SAM R21 devices provide the following features: In-system programmable Flash, optional 512KB serial Flash,12-channel direct memory access (DMA) controller, 12-channel Event System, programmable interrupt controller, up to 28 programmable I/O pins, ultra-low power 2.4GHz ISM band transceiver with a data rate of 250kb/s, 32-bit real-time clock and calendar, three 16-bit Timer/Counters (TC) and three 16-bit Timer/Counters for Control (TCC), where each TC can be configured to perform frequency and waveform generation, accurate program execution timing or input capture with time and frequency measurement of digital signals. The TCs can operate in 8- or 16-bit mode, selected TCs can be cascaded to form a 32-bit TC, and the three Timer/Counters for Control have extended functions optimized for motor, lighting and other control applications. The series provide one full-speed USB 2.0 embedded host and device interface; up to five Serial Communication Modules (SERCOM) that each can be configured to act as an USART, UART, SPI, I2C up 3.4MHz and LIN slave; up to eight channel 350ksps 12-bit ADC with programmable gain and optional oversampling and decimation supporting up to 16-bit resolution, two analog comparators with window mode, Peripheral Touch Controller supporting up to 48 buttons, sliders, wheels and proximity sensing; programmable Watchdog Timer, brown-out detector and power-on reset and two-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 a source for the system clock. Different clock domains can be independently configured to run at different frequencies, enabling power saving by running each peripheral at its optimal clock frequency, and thus maintaining a high CPU frequency while reducing power consumption. The SAM R21 devices have two software-selectable sleep modes, idle and standby. In idle mode the CPU is stopped while all other functions can be kept running. In standby all clocks and functions are stopped expect those selected to continue running. The device supports SleepWalking, which is the module's ability to wake itself up and wake up its own clock, and hence perform predefined tasks without waking up the CPU. The CPU can then be only woken on a need basis, e.g. a threshold is crossed or a result is ready. The Event System supports synchronous and asynchronous events, allowing peripherals to receive, react to and send events even in standby mode. The Flash program memory can be reprogrammed in-system through the SWD interface. The same interface can be used for non-intrusive on-chip debug of application code. A boot loader running in the device can use any communication interface to download and upgrade the application program in the Flash memory. The SAM R21 devices are supported with a full suite of program and system development tools, including C compilers, macro assemblers, program debugger/simulators, programmers and evaluation kits. Atmel-42223FS-SAM-R21_Summary-11/2015 SMART Features z Processor z ARM Cortex-M0+ CPU running at up to 48MHz z Single-cycle hardware multiplier z Micro Trace Buffer (MTB) z Memories z 768(1)/256/128/64KB in-system self-programmable Flash z 32/16/8KB SRAM z System z Power-on reset (POR) and brown-out detection (BOD) z Internal and external clock options with 48MHz Digital Frequency Locked Loop (DFLL48M) and 48MHz to 96MHz Fractional Digital Phase Locked Loop (FDPLL96M) z External Interrupt Controller (EIC) z Up to 15 external interrupts z One non-maskable interrupt z Two-pin Serial Wire Debug (SWD) programming, test and debugging interface z Low Power z Idle and standby sleep modes z SleepWalking peripherals z Peripherals z 12-channel Direct Memory Access Controller (DMAC) z 12-channel Event System z Integrated Ultra Low Power Transceiver for 2.4GHz ISM Band z Supported PSDU Data rates: 250kb/s, 500kb/s, 1000kb/s and 2000kb/s(2) z -99dBm RX Sensitivity; TX Output Power up to +4dBm z Hardware Assisted MAC (Auto-Acknowledge, Auto-Retry) z SFD-Detection; Spreading; De-Spreading; Framing; CRC-16 Computation z Antenna Diversity and TX/RX Control z 128 Byte TX/RX Frame Buffer z Integrated 16MHz Crystal Oscillator (external crystal needed) z PLL synthesizer with 5 MHz and 500 kHz channel spacing for 2.4GHz ISM band z Hardware Security (AES, True Random Generator) z Three 16-bit Timer/Counters (TC), configurable as either: z One 16-bit TC with compare/capture channels z One 8-bit TC with compare/capture channels z One 32-bit TC with compare/capture channels, by using two TCs z Three 16-bit Timer/Counters for Control (TCC), with extended functions: z Up to four compare channels with optional complementary output z Generation of synchronized pulse width modulation (PWM) pattern across port pins z Deterministic fault protection, fast decay and configurable dead-time between complementary output z Dithering that increase resolution with up to 5 bit and reduce quantization error z 32-bit Real Time Counter (RTC) with clock/calendar function z Watchdog Timer (WDT) z CRC-32 generator z One full-speed (12Mbps) Universal Serial Bus (USB) 2.0 interface z Embedded host and device function z Eight endpoints z Up to five Serial Communication Interfaces (SERCOM), each configurable to operate as either: z USART with full-duplex and single-wire half-duplex configuration z I2C up to 3.4MHz z SPI z LIN slave z One 12-bit, 350ksps Analog-to-Digital Converter (ADC) with up to eight external channels z Differential and single-ended input z 1/2x to 16x programmable gain stage z Automatic offset and gain error compensation z Oversampling and decimation in hardware to support 13-, 14-, 15- or 16-bit resolution z Two Analog Comparators (AC) with window compare function z Peripheral Touch Controller (PTC) z 48-channel capacitive touch and proximity sensing z I/O and Package z 16/28 programmable I/O pins z 32-pin and 48-pin QFN Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 2 z Operating Voltage z 1.8V - 3.6V z Temperature Range z -40C to 85C Industrial z -40C to 125C Industrial Notes: 1. 2. Only applicable for SAM R21E19: 256KB embedded + 512KB serial Flash. High data rates (500kb/s, 1000kb/s and 2000kb/s) only applicable for T=-40C to 85C. Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 3 1. Configuration Summary SAM R21G SAM R21E Pins 48 32 General Purpose I/O-pins (GPIOs) 28 16 Flash 256/128/64KB 256/128/64KB SRAM 32/16/8KB 32/16/8KB Timer Counter (TC) instances 3 3 Waveform output channels per TC instance 2 2 Timer Counter for Control (TCC) instances 3 3 4/4/2 4/4/2 DMA channels 12 12 USB interface 1 1 5+1(1) 4+1(1) No No Analog-to-Digital Converter (ADC) channels 8 4 Analog Comparators (AC) 2 2 Digital-to-Analog Converter (DAC) channels No No Real-Time Counter (RTC) Yes Yes 1 1 1 32-bit value or 2 16-bit values 1 32-bit value or 2 16-bit values External Interrupt lines 15 14 Peripheral Touch Controller (PTC) X and Y lines 8x6 6x2 Waveform output channels per TCC Serial Communication Interface (SERCOM) instances Inter-IC Sound (I2S) interface RTC alarms RTC compare values Maximum CPU frequency 48MHz Packages QFN QFN 32.768kHz crystal oscillator (XOSC32K) Yes No Oscillators 16MHz crystal oscillator for 2.4GHz TRX (XOSCRF) 0.4-32MHz crystal oscillator (XOSC) 32.768kHz internal oscillator (OSC32K) 32kHz ultra-low-power internal oscillator (OSCULP32K) 8MHz high-accuracy internal oscillator (OSC8M) 48MHz Digital Frequency Locked Loop (DFLL48M) 96MHz Fractional Digital Phased Locked Loop (FDPLL96M) Event System channels 12 12 SW Debug Interface Yes Yes Watchdog Timer (WDT) Yes Yes Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 4 Note: 1. SERCOM4 is internally connected to the AT86RF233. Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 5 2. Ordering Information ATSAMR 21 E 16 A - M U T Product Family Package Carrier SAMR = SoC Microcontroller with RF No character = Tray (Default) T = Tape and Reel Product Series 21 = Cortex M0+ CPU, USB Package Grade U = -40 - 85C Matte Sn Plating F = -40 - 125C Matte Sn Plating Pin Count E = 32 Pins G = 48 Pins Package Type Flash Memory M = QFN 19 = 256KB + 512KB 18 = 256KB 17 = 128KB 16 = 64KB Device Variant A = Default Variant 2.1 SAM R21E Ordering Code FLASH (bytes) SRAM (bytes) Package ATSAMR21E16A-MF ATSAMR21E16A-MFT ATSAMR21E16A-MU Tray 64K 8K QFN32 ATSAMR21E16A-MUT ATSAMR21E17A-MU 128K 16K QFN32 ATSAMR21E19A-MFT Note: 1. Tray Tray 256K 32K QFN32 ATSAMR21E18A-MUT ATSAMR21E19A-MF Tape & Reel Tape & Reel ATSAMR21E18A-MF ATSAMR21E18A-MU Tray Tray ATSAMR21E17A-MUT ATSAMR21E18A-MFT Tape & Reel Tape & Reel ATSAMR21E17A-MF ATSAMR21E17A-MFT Carrier Type Tape & Reel Tray Tape & Reel 256K + 512K(1) 32K QFN32 Tray Tape & Reel Serial Flash MX25V4006EWSK. For more information, see http://www.macronix.com. Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 6 2.2 SAM R21G Ordering Code FLASH (bytes) SRAM (bytes) Package ATSAMR21G16A-MF ATSAMR21G16A-MFT ATSAMR21G16A-MU Tray 64K 8K QFN48 ATSAMR21G16A-MUT ATSAMR21G17A-MU 128K 16K QFN48 ATSAMR21G18A-MUT Tape & Reel Tray Tape & Reel ATSAMR21G18A-MF ATSAMR21G18A-MU Tray Tray ATSAMR21G17A-MUT ATSAMR21G18A-MFT Tape & Reel Tape & Reel ATSAMR21G17A-MF ATSAMR21G17A-MFT Carrier Type Tray 256K 32K QFN48 Tape & Reel Tray Tape & Reel Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 7 Block Diagrams 3.1 MCU Block Diagram SWCLK CORTEX-M0+ PROCESSOR Fmax 48 MHz SERIAL WIRE SWDIO MEMORY TRACE BUFFER IOBUS DEVICE SERVICE UNIT M 256/128/64KB NVM 32/16/8KB RAM NVM CONTROLLER Cache SRAM CONTROLLER M S S S AHB-APB BRIDGE B S AHB-APB BRIDGE A DMA 5x 6 SERCOM x SERCOM OSCULP32K OSC32K XOSC32K 3 x TIMER / COUNTER 8 x Timer Counter FDPLL96M POWER MANAGER CLOCK CONTROLLER RESETN RESET CONTROLLER SLEEP CONTROLLER GENERIC CLOCK CONTROLLER (3) GCLK_IO[n] REAL TIME COUNTER WATCHDOG TIMER EXTINT[15..1] NMI DMA EVENT SYSTEM XOSC PAD0 PAD1 PAD2 PAD3 DMA OSC8M DFLL48M XIN XOUT DM SOF 1KHZ PERIPHERAL ACCESS CONTROLLER VREF (4) XIN32 XOUT32 DP AHB-APB BRIDGE C SYSTEM CONTROLLER PORT USB FS DEVICE MINI-HOST S PERIPHERAL ACCESS CONTROLLER BOD33 DMA M HIGH SPEED BUS MATRIX PERIPHERAL ACCESS CONTROLLER S 3x TIMER / COUNTER FOR CONTROL DMA 8-CHANNEL 12-bit ADC 350KSPS 2 ANALOG COMPARATORS PERIPHERAL TOUCH CONTROLLER WO0 WO1 PORT 3. WO0 WO1 (2) WOn AIN[n] (3) VREFB AIN[3..0] X[7..0] Y[5..0] EXTERNAL INTERRUPT CONTROLLER Notes: 1. Some products have different number of SERCOM instances, Timer/Counter instances, PTC signals and ADC signals. Refer to "Ordering Information" on page 6 for details. 2. The three TCC instances have different configurations, including the number of Waveform Output (WO) lines. 3. Refer to the PORT Function Multiplexing Table 5-1 for details about the available GCLK_IO and ADC signals. 4. Only available for SAM R21G. Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 8 SAM R21 Interconnection PA08 PA09 GNDANA RFP RFP FECTRL0..1 AVSS RFN GNDANA AVSS PA12(2) PA13(2) PA14 PA15 RFN 2.4 GHz RF front-end circuit FECTRL2..5 DIG3 2.4GHz TRX (analog) DIG4 (1) DVSS AVSS DVDD DVDD DVREG AVREG TRX (digital) DEVDD VDDIO GNDANA AVDD AVDD EVDD VDDANA DIG1 AVSS Control Logic DIG2 /SEL IRQ PB31 PB00 PAD1 MOSI PB30 PAD2 MISO PAD0 GENERIC CLOCK PC19 SCLK PC18 GCLK_IO1(4) PAD3 CLKM PC16 PA20 PB15 XOSC RF SPI (Slave) SLP_TR PORT GNDANA XTAL1 RSTN SERCOM 4(3) DIG1..4 EXTINT0 XTAL1 XTAL2 XTAL2 AT86RF233 ADC AC EXTERNAL INTERRUPT CONTROLLER RFCTRL PTC Notes: PAD3 XOSC 32K SAMD21 SCLK PB23 PAD2 PB22 SO CS# SI PA22 PA12 WP# GND PA00 VCC HOLD# VDDIN VDDCORE (1) PAD1 SERCOM 5 PA23 PORT PAD0 VREG GND 3.2 MX25V4006(5) SAMR21 1. Paddle connected to digital ground DVSS, GND. 2. Only available for SAM R21G. 3. Dedicated SERCOM4 alternate pin function mapping for internally connected AT86RF233. 4. Die revision A uses GCLK_IO5. 5. Only available for SAM R21E19. Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 9 Pinout 4.1 SAM R21G - QFN48 48 47 46 45 44 43 42 41 40 39 38 37 PB03 PB02 PA31 PA30 VDDIN VDDCORE GND PA28 RESET PA27 PB23 PB22 4. 1 2 3 4 5 6 7 8 9 10 11 12 36 35 34 33 32 31 30 29 28 27 26 25 VDDIO GND PA25 PA24 PA23 PA22 DVDD GND PA19 PA18 PA17 PA16 VDDIO GND PA08 PA09 GNDANA RFP RFN GNDANA PA12 PA13 PA14 PA15 13 14 15 16 17 18 19 20 21 22 23 24 PA00 PA01 XTAL2 XTAL1 GNDANA VDDANA AVDD GNDANA PA04 PA05 PA06 PA07 OSCILLATOR GROUND INPUT SUPPLY REGULATED OUTPUT SUPPLY RESET PIN Note: RF PIN DIGITAL PIN ANALOG PIN DIGITAL PIN/ OSCILLATOR The large center pad underneath the QFN package is made of metal and internally connected to GND. It should be soldered and connected to the digital ground on the board to ensure good mechanical stability. It is not recommended to use the exposed paddle as a replacement of the regular GND pin. Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 10 SAM R21E - QFN32 32 31 30 29 28 27 26 25 PA31 PA30 VDDIN VDDCORE GND PA28 RESET PA27 4.2 1 2 3 4 5 6 7 8 24 23 22 21 20 19 18 17 VDDIO PA25 PA24 DVDD PA19 PA18 PA17 PA16 OSCILLATOR GROUND PA08 PA09 GNDANA RFP RFN GNDANA PA14 PA15 9 10 11 12 13 14 15 16 XTAL2 XTAL1 GNDANA VDDANA AVDD GNDANA PA06 PA07 INPUT SUPPLY RESET PIN REGULATED OUTPUT SUPPLY Note: RF PIN DIGITAL PIN ANALOG PIN DIGITAL PIN/ OSCILLATOR The large center pad underneath the QFN package is made of metal and internally connected to GND. It should be soldered and connected to the digital ground on the board to ensure good mechanical stability. It is not recommended to use the exposed paddle as a replacement of the regular GND pin. Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 11 5. I/O Multiplexing and Considerations 5.1 Multiplexed Signals Each pin is by default controlled by the PORT as a general purpose I/O and alternatively it can be assigned to one of the peripheral functions A, B, C, D, E, F, G or H. To enable a peripheral function on a pin, 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 function A to H is done by writing to the Peripheral Multiplexing Odd and Even bits in the Peripheral Multiplexing register (PMUXn.PMUXE/O) in the PORT. Table 5-1 describes the peripheral signals multiplexed to the PORT I/O pins. Table 5-1. PORT Function Multiplexing Pin A SAMR21 SAMR21 E G I/O Pin Supply Type EIC B(1)(2) REF ADC C AC PTC D SERCOM SERCOM(1)(2) ALT E F G H TC TCC FECTRL TCC SERCOM COM AC/ GCLK SERCOM1/ TCC2/WO[0] PAD[0] 1 PA00 VDDANA 2 PA01 VDDANA EXTINT[1] 9 PA04 VDDANA EXTINT[4] 10 PA05 VDDANA 7 11 8 SERCOM1/ TCC2/WO[1] PAD[1] ADC/ VREFB AIN[4] AIN[0] Y[2] SERCOM0/ TCC0/WO[0] PAD[0] EXTINT[5] AIN[5] AIN[1] Y[3] SERCOM0/ TCC0/WO[1] PAD[1] PA06 VDDANA EXTINT[6] AIN[6] AIN[2] Y[4] SERCOM0/ TCC1/WO[0] PAD[2] 12 PA07 VDDANA EXTINT[7] AIN[7] AIN[3] Y[5] SERCOM0/ TCC1/WO[1] PAD[3] 9 15 PA08 VDDIO I2C NMI AIN[16] X[0] SERCOM0/ SERCOM2/ TCC0/WO[0] FECTRL[0] PAD[0] PAD[0] 10 16 PA09 VDDIO I2C EXTINT[9] AIN[17] X[1] SERCOM0/ SERCOM2/ TCC0/WO[1] FECTRL[1] PAD[1] PAD[1] 21 PA12 VDDIO I2C EXTINT[12] SERCOM2/ PAD[0] TCC2/WO[0] FECTRL[2] AC/ CMP[0] 22 PA13 VDDIO I2C EXTINT[13] SERCOM2/ PAD[1] TCC2/WO[1] FECTRL[3] AC/ CMP[1] 15 23 PA14 VDDIO EXTINT[14] SERCOM2/ PAD[2] TC3/WO[0] FECTRL[4] GCLK_IO[0] 16 24 PA15 VDDIO EXTINT[15] SERCOM2/ PAD[3] TC3/WO[1] FECTRL[5] GCLK_IO[1] 17 25 PA16 VDDIO I2C 18 26 PA17 VDDIO I2C 19 27 PA18 20 28 X[4] SERCOM1/ SERCOM3/ TCC2/WO[0] PAD[0] PAD[0] TCC0/ WO[0] GCLK_IO[2] EXTINT[1] X[5] SERCOM1/ SERCOM3/ TCC2/WO[1] PAD[1] PAD[1] TCC0/ WO[1] GCLK_IO[3] VDDIO EXTINT[2] X[6] SERCOM1/ SERCOM3/ PAD[2] PAD[2] TC3/WO[0] TCC0/ WO[2] AC/ CMP[0] PA19 VDDIO EXTINT[3] X[7] SERCOM1/ SERCOM3/ PAD[3] PAD[3] TC3/WO[1] TCC0/ WO[3] AC/ CMP[1] 31 PA22 VDDIO I2C EXTINT[6] X[10] SERCOM3/ SERCOM5/ PAD[0] PAD[0] TC4/WO[0] TCC0/ WO[4] GCLK_IO[6] 32 PA23 VDDIO I2C EXTINT[7] X[11] SERCOM3/ SERCOM5/ PAD[1] PAD[1] TC4/WO[1] TCC0/ WO[5] USB/ GCLK_IO[7] SOF1kHz 22 33 PA24 VDDIO EXTINT[12] SERCOM3/ SERCOM5/ PAD[2] PAD[2] TC5/WO[0] TCC1/ WO[2] USB_DM 23 34 PA25 VDDIO EXTINT[13] SERCOM3/ SERCOM5/ PAD[3] PAD[3] TC5/WO[1] TCC1/ WO[3] USB_DP Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 12 Table 5-1. PORT Function Multiplexing (Continued) Pin A SAMR21 SAMR21 E G I/O Pin Supply Type EIC B(1)(2) REF ADC C AC D SERCOM SERCOM(1)(2) ALT PTC E F G H TC TCC FECTRL TCC SERCOM COM AC/ GCLK 37 PB22 VDDIO EXTINT[6] SERCOM5/ PAD[2] GCLK_IO[0] 38 PB23 VDDIO EXTINT[7] SERCOM5/ PAD[3] GCLK_IO[1] 25 39 PA27 VDDIO EXTINT[15] SERCOM3/ PAD[0] GCLK_IO[0] 27 41 PA28 VDDIO EXTINT[8] SERCOM3/ PAD[1] GCLK_IO[0] 31 45 PA30 VDDIO EXTINT[10] SERCOM1/ TCC1/WO[0] PAD[2] 32 46 PA31 VDDIO EXTINT[11] SERCOM1/ TCC1/WO[1] PAD[3] 47 PB02 VDDANA EXTINT[2] AIN[10] Y[8] SERCOM5/ PAD[0] 48 PB03 VDDANA EXTINT[3] AIN[11] Y[9] SERCOM5/ PAD[1] Notes: 1. 2. 5.2 Internal Multiplexed Signals SWCLK GCLK_IO[0] All analog pin functions are on peripheral function B. Peripheral function B must be selected to disable the digital control of the pin. Only some pins can be used in SERCOM I2C mode. See the Type column for using a SERCOM pin in I2C mode. PA20, PB00, PB15, PB30, PB31, PC16, PC18 and PC19 are by default controlled by the PORT as a general purpose I/O and alternatively it can be assigned to one of the peripheral functions A, B, C, D, E, F, G or H. To enable a peripheral function on a pin, 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 function A to H is done by writing to the Peripheral Multiplexing Odd and Even bits in the Peripheral Multiplexing register (PMUXn.PMUXE/O) in the PORT. PA10, PA11, PB16 and PB17 cannot be configured as output ports. These ports are always connected to the RFCTRL inputs. A B C D SERCOM SERCOMALT E F G H TC FECTRL TCC SERCOM COM AC/ GCLK Internal Signal I/O Pin Supply Type EIC DIG3 PA10 VDDIO Input EXTINT[10] DIG4 PA11 VDDIO Input EXTINT[11] SLP_TR PA20 VDDIO I/O IRQ PB00 VDDANA I/O RSTN PB15 VDDIO I/O DIG1 PB16 VDDIO Input EXTINT[0] DIG2 PB17 VDDIO Input EXTINT[1] MOSI PB30 VDDIO I/O SERCOM4/ PAD[2] SEL PB31 VDDIO I/O SERCOM4/ PAD[1] REF ADC AC PTC EXTINT[0] Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 13 A Internal Signal B SERCOM H TC FECTRL TCC SERCOM COM AC/ GCLK PC16 VDDIO I/O GCLK/ IO[1](1) SCLK PC18 VDDIO I/O SERCOM4/ PAD[3] MISO PC19 VDDIO I/O SERCOM4/ PAD[0] 5.3.1 Oscillator Pinout PTC G CLKM Other Functions AC F I/O Pin 5.3 ADC SERCOMALT E Type 1. REF D Supply Note: EIC C Die revision A uses GCLK/IO[5]. The oscillators are not mapped to the normal PORT functions and their multiplexing are controlled by registers in the System Controller (SYSCTRL). Oscillator Supply XOSC VDDIO XOSC32K VDDANA Signal I/O Pin XIN PA14 XOUT PA15 XIN32 PA00 XOUT32 PA01 The integrated AT86RF233 16 MHz crystal oscillator is directly connected to pins and has no multiplexing functionality. Oscillator XOSCRF 5.3.2 Supply EVDD/VDDANA Signal I/O Pin XTAL1 XTAL1 XTAL2 XTAL2 Serial Wire Debug Interface Pinout Only the SWCLK pin is mapped to the normal PORT functions. A debugger cold-plugging or hot-plugging detection will automatically switch the SWDIO port to the SWDIO function. Signal Supply I/O Pin SWCLK VDDIO PA30 SWDIO VDDIO PA31 Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 14 6. Product Mapping Figure 6-1. Atmel | SMART SAM R21 Product Mapping Global Memory Space 0x00000000 Code 0x00000000 Internal Flash Code 0x20000000 AHB-APB Bridge C 0x00400000 Reserved SRAM PAC2 0x42000400 0x1FFFFFFF 0x22008000 0x42000000 EVSYS Undefined 0x40000000 SRAM SERCOM0 0x42000C00 0x20000000 Peripherals 0x42000800 SERCOM1 Internal SRAM 0x42001000 SERCOM2 0x20008000 0x43000000 0x42001400 SERCOM3 Reserved 0x60000000 AHB-APB 0x42001800 SERCOM4 0x40000000 AHB-APB Bridge A Undefined 0x60000200 0x42001C00 SERCOM5 0x42002000 TCC0 0x41000000 AHB-APB Bridge B Reserved (1) 0x42002400 TCC1 0x42002800 0xFFFFFFFF 0x42000000 TCC2 AHB-APB Bridge C 0x42FFFFFF 0x42002C00 TC3 0x42003000 TC4 0x42003400 AHB-APB Bridge A 0x41002000 0x41004000 0x41004400 0x41004800 0x41005000 0x41006000 PTC 0x42005000 MTB EIC Reserved Reserved 0x42005400 0x41004700 0x40001C00 Reserved 0x42004C00 USB RTC 0x40001800 AC 0x42004800 DMAC WDT 0x40001400 ADC 0x42004400 PORT GCLK 0x40001000 Reserved 0x42004000 NVMCTRL SYSCTRL 0x40000C00 Reserved 0x42003C00 DSU PM 0x40000800 0x40FFFFFF 0x42003800 PAC1 PAC0 0x40000400 TC5 AHB-APB Bridge B 0x41000000 0x40000000 Reserved 0x41FFFFFF RFCTRL 0x42005800 Reserved Note 1. SERCOM4 is internally connected to the AT86RF233. 0x40FFFFFF This figure represents the full configuration of the Atmel | SMART SAM R21 with maximum Flash and SRAM capabilities and a full set of peripherals. Refer to the "Configuration Summary" on page 4 for details. Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 15 7. Processor And Architecture 7.1 Cortex M0+ Processor The Atmel | SMART SAM R21 implements the ARM(R) CortexTM-M0+ processor, which is based on the ARMv6 Architecture and Thumb(R)-2 ISA. The Cortex M0+ is 100% instruction set compatible with its predecessor, the Cortex-M0 processor, and upward compatible to Cortex-M3 and M4 processors. For more information refer to www.arm.com. 7.1.1 Cortex M0+ Configuration Features Configuration option Atmel | SMART SAM R21 configuration Interrupts External interrupts 0-32 32 Data endianness Little-endian or big-endian Little-endian SysTick timer Present or absent Present Number of watchpoint comparators 0, 1, 2 2 Number of breakpoint comparators 0, 1, 2, 3, 4 4 Halting debug support Present or absent Present Multiplier Fast or small Fast (single cycle) Single-cycle I/O port Present or absent Present Wake-up interrupt controller Supported or not supported Not supported Vector Table Offset Register Present or absent Present Unprivileged/Privileged support Present or absent Absent(1) Memory Protection Unit Not present or 8-region Not present Reset all registers Present or absent Absent Instruction fetch width 16-bit only or mostly 32-bit 32-bit Note: 1. All software run in privileged mode only The ARM Cortex-M0+ core has two bus interfaces: z Single 32-bit AMBA(R)-3 AHB-LiteTM system interface that provides connections to peripherals and all system memory, including flash and RAM z Single 32-bit I/O port bus interfacing to the PORT with one-cycle loads and stores Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 16 8. Packaging Information 8.1 Thermal Considerations 8.1.1 Thermal Resistance Data Table 8-1 summarizes the thermal resistance data depending on the package. Table 8-1. 8.1.2 Thermal Resistance Data Package Type JA JC 32-pin QFN 37.2 C/W 3.1 C/W 48-pin QFN 33 C/W 11.4 C/W Junction Temperature The average chip-junction temperature, TJ, in C can be obtained from the following: where: z JA = package thermal resistance, Junction-to-ambient (C/W), provided in Table 8-1. z JC = package thermal resistance, Junction-to-case thermal resistance (C/W), provided in Table 8-1. z HEATSINK = cooling device thermal resistance (C/W), provided in the device datasheet. z PD = device power consumption (W). z TA = ambient temperature (C). From the first equation, the user can derive the estimated lifetime of the chip and decide if a cooling device is necessary or not. If a cooling device is to be fitted on the chip, the second equation should be used to compute the resulting average chip-junction temperature TJ in C. Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 17 8.2 Package Drawings 8.2.1 48-pin QFN Table 8-2. Device and Package Maximum Weight 100 Table 8-3. mg Package Characteristics Moisture Sensitivity Level Table 8-4. MSL3 Package Reference JEDEC Drawing Reference MO-220 JESD97 Classification E3 Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 18 8.2.2 32-pin QFN (PG) GPC:ZKV Table 8-5. Device and Package Maximum Weight 90 Table 8-6. mg Package Characteristics Moisture Sensitivity Level Table 8-7. MSL3 Package Reference JEDEC Drawing Reference MO-220 JESD97 Classification E3 Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 19 8.2.3 32-pin QFN (32M5) GPC: ZSA Table 8-8. Device and Package Maximum Weight 78.5 Table 8-9. mg Package Characteristics Moisture Sensitivity Level MSL3 Table 8-10. Package Reference JEDEC Drawing Reference MO-220 JESD97 Classification E3 Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 20 9. Soldering Profile The following table gives the recommended soldering profile from J-STD-20. Profile Feature Green Package Average Ramp-up Rate (217C to peak) 3C/s max Preheat Temperature 175C +/-25C 150-200C Time Maintained Above 217C 60-150s Time within 5C of Actual Peak Temperature 30s Peak Temperature Range 260C Ramp-down Rate 6C/s max Time 25C to Peak Temperature 8 minutes max A maximum of three reflow passes is allowed per component. SVNREVISION Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 21 Table of Contents Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Configuration Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2. Ordering Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1 2.2 SAM R21E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 SAM R21G . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3. Block Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1 3.2 MCU Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 SAM R21 Interconnection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 4. Pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 4.1 4.2 SAM R21G - QFN48 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 SAM R21E - QFN32. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 5. I/O Multiplexing and Considerations . . . . . . . . . . . . . . . . . . . . . . . . . 12 5.1 5.2 5.3 Multiplexed Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Internal Multiplexed Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Other Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 6. Product Mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 7. Processor And Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 7.1 Cortex M0+ Processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 8. Packaging Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 8.1 8.2 Thermal Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Package Drawings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 9. Soldering Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Table of Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Atmel | SMART SAM R21 [DATASHEET SUMMARY] Atmel-42223FS-SAM-R21_Summary-11/2015 22 ARM Connected Logo Atmel Corporation 1600 Technology Drive, San Jose, CA 95110 USA T: (+1)(408) 441.0311 F: (+1)(408) 436.4200 | www.atmel.com (c) 2015 Atmel Corporation. / Rev.: Atmel-42223FS-SAM-R21_Summary_11/2015. Atmel(R), Atmel logo and combinations thereof, Enabling Unlimited Possibilities(R), and others are registered trademarks or trademarks of Atmel Corporation in U.S. and other countries. ARM(R), ARM Connected(R) logo, and others are the registered trademarks or trademarks of ARM Ltd. Other terms and product names may be trademarks of others. DISCLAIMER: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life. SAFETY-CRITICAL, MILITARY, AND AUTOMOTIVE APPLICATIONS DISCLAIMER: Atmel products are not designed for and will not be used in connection with any applications where the failure of such products would reasonably be expected to result in significant personal injury or death ("Safety-Critical Applications") without an Atmel officer's specific written consent. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the operation of nuclear facilities and weapons systems. Atmel products are not designed nor intended for use in military or aerospace applications or environments unless specifically designated by Atmel as military-grade. Atmel products are not designed nor intended for use in automotive applications unless specifically designated by Atmel as automotive-grade.