From 2132f5b85bd9ffb8407f614b3cc6e7e880885c33 Mon Sep 17 00:00:00 2001
From: Dylan Laduranty <dylan.laduranty@mesotic.com>
Date: Mon, 21 Jan 2019 17:07:42 +0100
Subject: [PATCH] board/saml10-xpro: add support for SAML10-XPRO board

---
 boards/saml10-xpro/Makefile          |  4 ++
 boards/saml10-xpro/Makefile.dep      |  1 +
 boards/saml10-xpro/Makefile.features |  1 +
 boards/saml10-xpro/Makefile.include  |  5 ++
 boards/saml10-xpro/doc.txt           | 75 ++++++++++++++++++++++++++++
 5 files changed, 86 insertions(+)
 create mode 100644 boards/saml10-xpro/Makefile
 create mode 100644 boards/saml10-xpro/Makefile.dep
 create mode 100644 boards/saml10-xpro/Makefile.features
 create mode 100644 boards/saml10-xpro/Makefile.include
 create mode 100644 boards/saml10-xpro/doc.txt

diff --git a/boards/saml10-xpro/Makefile b/boards/saml10-xpro/Makefile
new file mode 100644
index 0000000000..fe947dca9c
--- /dev/null
+++ b/boards/saml10-xpro/Makefile
@@ -0,0 +1,4 @@
+MODULE = board
+DIRS = $(RIOTBOARD)/common/saml1x
+
+include $(RIOTBASE)/Makefile.base
diff --git a/boards/saml10-xpro/Makefile.dep b/boards/saml10-xpro/Makefile.dep
new file mode 100644
index 0000000000..1ab3db90ae
--- /dev/null
+++ b/boards/saml10-xpro/Makefile.dep
@@ -0,0 +1 @@
+include $(RIOTBOARD)/common/saml1x/Makefile.dep
diff --git a/boards/saml10-xpro/Makefile.features b/boards/saml10-xpro/Makefile.features
new file mode 100644
index 0000000000..daae835a23
--- /dev/null
+++ b/boards/saml10-xpro/Makefile.features
@@ -0,0 +1 @@
+include $(RIOTBOARD)/common/saml1x/Makefile.features
diff --git a/boards/saml10-xpro/Makefile.include b/boards/saml10-xpro/Makefile.include
new file mode 100644
index 0000000000..16a729339d
--- /dev/null
+++ b/boards/saml10-xpro/Makefile.include
@@ -0,0 +1,5 @@
+export CPU_FAM  = saml10
+export CPU_MODEL = saml10e16a
+export CFLAGS += -D__SAML10E16A__
+
+include $(RIOTBOARD)/common/saml1x/Makefile.include
diff --git a/boards/saml10-xpro/doc.txt b/boards/saml10-xpro/doc.txt
new file mode 100644
index 0000000000..8a7f0d6a37
--- /dev/null
+++ b/boards/saml10-xpro/doc.txt
@@ -0,0 +1,75 @@
+/**
+@defgroup    boards_saml10-xpro Microchip SAML10 Xplained Pro
+@ingroup     boards
+@brief       Support for the Microchip SAML10 Xplained Pro board.
+
+## Overview
+
+The `SAML10 Xplained Pro` is an ultra-low power evaluation board by Microchip
+featuring a ATSAML10E16A SoC. The SoC includes a SAML10 ARM Cortex-M23 micro-
+controller. For programming the MCU comes with 16KB of RAM and 64KB of flash
+memory.
+
+## Hardware
+
+![saml10-xpro image](https://www.microchip.com/_ImagedCopy/SAML10%20Xpro%20Front%20Title.jpg)
+
+
+### MCU
+| MCU        | ATSAML10E16A      |
+|:------------- |:--------------------- |
+| Family | ARM Cortex-M23    |
+| Vendor | Microchip |
+| RAM        | 16KB |
+| Flash      | 64KB             |
+| Frequency  | up to 32MHz |
+| FPU        | no                |
+| Timers | 3 (16-bit)    |
+| ADCs       | 1x 12-bit (10 channels)           |
+| UARTs      | max 3 (shared with SPI and I2C)               |
+| SPIs       | max 3 (see UART)                  |
+| I2Cs       | max 3 (see UART)              |
+| Vcc        | 1.6V - 3.6V           |
+| Datasheet  | [Datasheet](http://ww1.microchip.com/downloads/en/DeviceDoc/SAM-L10L11%20Family-DataSheet%20-%20DS60001513B.pdf) |
+| Board Manual   | [Board Manual](http://ww1.microchip.com/downloads/en/DeviceDoc/70005359B.pdf)|
+
+### User Interface
+
+1 User button and 1 LED:
+
+| Device | PIN |
+|:------ |:--- |
+| LED0   | PA07 |
+| SW0 (button) | PA27 |
+
+
+## Implementation Status
+
+| Device | ID        | Supported | Comments  |
+|:------------- |:------------- |:------------- |:------------- |
+| MCU        | saml10    | partly    | PLL clock not implemented |
+| Low-level driver | GPIO    | yes       | |
+|        | PWM       | no            | |
+|        | UART      | yes           | |
+|        | I2C       | no        | |
+|        | SPI       | no        | |
+|        | USB       | no        | |
+|        | RTT       | no        | |
+|        | RTC       | no       |  |
+|        | RNG       | no        |  |
+|        | Timer     | yes           | |
+|        | ADC       | no          | |
+
+## Flashing the device
+
+Connect the device to your Micro-USB cable.
+
+The standard method for flashing RIOT to the saml10-xpro is using EDBG.
+
+## Supported Toolchains
+
+For using the saml10-xpro board we strongly recommend the usage of the
+[GNU Tools for ARM Embedded Processors](https://launchpad.net/gcc-arm-embedded)
+toolchain.
+
+ */
-- 
GitLab