-
Notifications
You must be signed in to change notification settings - Fork 1
Board: SAML21 xpro
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.
The saml21-xpro is available from various hardware vendors for ~50USD (as of oct. 2015).
Please 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; however at the time of this writing the official OpenOCD (v0.9) does not support flashing the B-variant devices. For the workaround, please refer to the section on Flashing below.
MCU | ATSAML21J18A |
---|---|
Family | ARM Cortex-M0+ |
Vendor | Atmel |
RAM | 32Kb |
Flash | 256Kb |
Frequency | up to 48MHz |
FPU | no |
Timers | 8 (16-bit) |
ADCs | 1x 12-bit (20 channels) |
UARTs | max 6 (shared with SPI and I2C) |
SPIs | max 6 (see UART) |
I2Cs | max 6 (see UART) |
Vcc | 1.8V - 3.6V |
Datasheet | Datasheet |
Board Manual | Board Manual |
1 User button and 1 LED:
Device | PIN |
---|---|
LED0 | PA19 |
SW0 (button) | PA28 |
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 | saml21 | partly | PLL clock not implemented |
Low-level driver | GPIO | yes | |
PWM | unknown | ||
UART | unknown | ||
I2C | unknown | ||
SPI | yes | Supported pins hardcoded in spi.c : only SERCOM0 (extension header 1) |
|
USB | no | ||
RTT | yes | ||
RTC | no | ||
RNG | no | ||
Timer | yes |
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 OpenOCD. Please note that even the latest official OpenOCD (v0.9 at the time of this writing) does not support B-variant SAML21 devices.
If you attempt to flash a board, and OpenOCD throws a Couldn't find part correspoding to DID XXXXXXXX
error, you will need to compile your own OpenOCD from source.
Refer to https://github.com/RIOT-OS/RIOT/wiki/OpenOCD for general instructions on building OpenOCD and make sure "cmsis-dap" and "hidapi-libusb" are enabled. Do not use the OpenOCD source indicated in the general instructions, but rather the version located here, which includes support for B-variant devices.
On Linux you will have to add a udev rule for hidraw, like
echo 'KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"' \
| sudo tee -a /etc/udev/rules.d/99-usb.rules
sudo service udev restart
With yaourt:
yaourt -S hidapi-git
yaourt -S openocd-git
# edit PKGBUILD, add "cmsis-dap hidapi-libusb" to "_features"
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
For using the saml21-xpro board we strongly recommend the usage of the GNU Tools for ARM Embedded Processors toolchain.
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
It can happen that OpenOCD is not able to program the board, because of wrong clock configuration or low power modes. In this case you can use this little tool to erase the flash. Just follow the instructions to build it and run ./edbg -e
to erase the flash. Then press the reset button and you're able to program via OpenOCD again.
RIOT - The friendly Operating System for the Internet of Things
Homepage | [GitHub] (https://github.com/RIOT-OS/) | Developers Mailing List | Users Mailing List | Twitter @RIOT_OS
- Family: ARM
- Board: Airfy Beacon
- Board: Arduino Due
- Board: CC2538DK
- Board: CC2650STK
- Board: HikoB Fox
- Board: IoT LAB M3
- Board: LimiFrog-v1
- Board: mbed_lpc1768
- Board: MSB-IoT
- Board: MSBA2
- Board: Nucleo-L1
- Board: Nucleo-F334
- Board: Nucleo-F303
- Board: Nucleo-F091
- Board: Mulle
- Board: OpenMote
- Board: PCA1000x (nRF51822 Development Kit)
- Board: Phytec phyWAVE-KW22
- Board: RFduino
- Board: SAMR21-xpro
- Board: SAML21-xpro
- Board: Spark Core
- Board: STM32F0discovery
- Board: STM32F3discovery
- Board: STM32F4discovery
- Board: UDOO
- Board: yunjia-nrf51822
- Board: Zolertia remote
- Family: ATmega
- Board: Arduino Mega2560
- Family: MSP430
- Board: MSB-430H
- Board: TelosB
- Board: WSN430
- Board: Zolertia Z1
- Board: eZ430-Chronos
- Family: native
- Board: native
- Family: x86
- Board: Intel Galileo