Atmel SAM R21E / SAM R21G SMART ARM-Based Wireless Microcontroller DATASHEET SUMMARY Description The Atmel SMART SAM R21 is a series of low-power microcontrollers using the 32-bit ARM Cortex -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-42223FSSAM-R21 Summary11/2015 SMARTFeatures z Processor z ARM Cortex-M0+ CPU running at up to 48MHz z Single-cycle hardware multiplier z Micro Trace Buffer (MTB) z Memories (1) z 768 /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 (2) z Supported PSDU Data rates: 250kb/s, 500kb/s, 1000kb/s and 2000kb/s 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 2 z I C 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 2 Atmel-42223FSSAM-R21 Summary11/2015