Skip to content

Atmel SAM L21 Xplained Pro

Support for the Atmel SAM L21 Xplained Pro board.

Support for the Atmel SAM L21 Xplained Pro board.

Overview

The SAML21 Xplained Pro is an ultra-low power evaluation board by Atmel featuring a ATSAML21J18A SoC. The SoC includes a SAML21 ARM Cortex-M0+ micro- controller. For programming the MCU comes with 32Kb of RAM and 256Kb of flash memory.

Note: ATMEL’s most recent SAML21s are the B variant, or ATSAML21J18B. Because the driver changes are mostly small, throughout this reference the device will continue to be referred to as the ATSAML21J18[A/B] indiscriminately.

Hardware

saml21-xpro image

MCU

MCUATSAML21J18A
FamilyARM Cortex-M0+
VendorAtmel
RAM32Kb
Flash256Kb
Frequencyup to 48MHz
FPUno
Timers8 (16-bit)
ADCs1x 12-bit (20 channels)
UARTsmax 6 (shared with SPI and I2C)
SPIsmax 6 (see UART)
I2Csmax 6 (see UART)
Vcc1.8V - 3.6V
DatasheetDatasheet
Board ManualBoard Manual

User Interface

1 User button and 1 LED:

DevicePIN
LED0PB10
SW0 (button)PA02

Implementation Status

DeviceIDSupportedComments
MCUsaml21yes
Low-level driverGPIOyes
PWMyes
UARTyes
I2Cyes
SPIyes
USByes
RTTyes
RTCyes
RNGyes
Timeryes
ADCyes
DACyes

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 saml21-xpro is using edbg. by calling:

Terminal window
make BOARD=saml21-xpro -C tests/leds flash

Note that on Linux, you will need libudev-dev package to be installed.

Users can also use openOCD to flash and/or debug the board using:

Terminal window
PROGRAMMER=openocd make BOARD=saml21-xpro -C tests/leds flash

On Linux you will have to add a udev rule for hidraw, like

Terminal window
echo 'KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"' \
| sudo tee -a /etc/udev/rules.d/99-usb.rules
sudo service udev restart

Arch Linux

With yaourt:

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

Ubuntu

Although this refers to setting up the SAMR21, this guide is still very helpful to understanding how to set up a solid RIOT development environment for the SAML21: http://watr.li/samr21-dev-setup-ubuntu.html