Skip to content
Ludwig Ortmann edited this page Jan 22, 2015 · 32 revisions

Overview

The SAMR21 Xplained Pro is a compact evaluation board by Atmel featuring a ATSAMR21G18A SoC. The SoC includes a SAMD21 ARM Cortex-M0+ micro-controller bundled with Atmel's AT86RF233, a 2.4GHz IEEE802.15.4 compatible radio. For programming the MCU comes with 32Kb of RAM and 256Kb of flash memory.

The samr21-xpro is available from various hardware vendors for ~40EUR (as of sep. 2014).

Hardware

samr21-xpro image

MCU

MCU ATSAMR21G18A
Family ARM Cortex-M0+
Vendor Atmel
RAM 32Kb
Flash 256Kb
Frequency up to 48MHz
FPU no
Timers 6 (1x 16-bit, 2x 24-bit, 3x 32-bit)
ADCs 1x 12-bit (8 channels)
UARTs max 5 (shared with SPI and I2C)
SPIs max 5 (see UART)
I2Cs max 5 (see UART)
Vcc 1.8V - 3.6V
Datasheet Datasheet
Board Manual Board Manual

User Interface

1 User button and 1 LED:

Device PIN
LED0 PA19
SW0 (button) PA28

Radio

The SAMR21 SoC includes an on-chip AT86RF233 radio. It is internally connected via SPI and some GPIO pins and behaves in exact the same way as externally connected SPI devices.

Sensor AT86RF233
Type 2.4GHz IEEE802.15.4 radio
Vendor Atmel
Datasheet See CPU datasheet
Connected to SPI_0
Pin Config:
Device SERCOM4
MOSI PB30 (OUT, SPI mosi)
MISO PC19 (IN, SPI miso)
SCLK PC18 (OUT, SPI sclk)
CS PB31 (OUT, GPIO output)
IRQ PB00 (IN, GPIO external interrupt)
RSTN PB15 (OUT, GPIO output)
SLP_TR PA20 (OUT, GPIO output)

Implementation Status

Please refer to this tracker to see which projects are work in progress and who is the contact person for this.

Device ID Supported Comments
MCU samd21 partly Energy saving modes not fully utilized
Low-level driver GPIO yes
PWM no
UART partly only one UART by now
I2C under review
SPI under review
USB no
RTT no in progress
RTC no under review
RNG no no HW module
Timer partly currently driven in 16 bit mode at 125kHz (improvement under review)
Radio Chip AT86RF233 under review using at86rf231 driver (this will be renamed to at86rf2xx)

Flashing the device

Connect the device to your Micro-USB cable using the port labeled as EDBG.

The standard method for flashing RIOT to the samr21-xpro is using OpenOCD. For this to work properly, you have to make sure to use a very recent version of OpenOCD. The v0.8.0 release will not work. If this is still the current release you'll have to build OpenOCD from source.

Refer to https://github.com/RIOT-OS/RIOT/wiki/OpenOCD for building OpenOCD and make sure "cmsis-dap" and "hidapi-libusb" are enabled.

Arch Linux

With yaourt:

yaourt -S hidapi-git
yaourt -S openocd-git
# edit PKGBUILD, add "cmsis-dap hidapi-libusb" to "_features"

Supported Toolchains

For using the samr21-xpro board we strongly recommend the usage of the GNU Tools for ARM Embedded Processors toolchain.

Known Issues / Problems

I2C

When connecting an I2C device and a logic analyzer to an I2C port at the same time, the internal pull-up resistors are not sufficient for stable bus operation. You probably have to connect external pull-ups to both bus lines. 10K is a good value to start with.

Stack sizes

The default stack sizes have not been tuned properly yet. If in doubt why your application crashes try increasing the default stack sizes and use ps to find out how much stack is being used. Tracked in https://github.com/RIOT-OS/RIOT/issues/2228

Clone this wiki locally