diff options
author | Andrey Yurovsky <yurovsky@gmail.com> | 2013-12-23 10:27:28 -0800 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2014-01-15 11:38:25 +0000 |
commit | 32eea3f68e6d911788acbcdf35ccea709bf1e7ee (patch) | |
tree | d7e9234d74961ee987d2098885771053c4d08fb3 | |
parent | 178b5d072e2bd2038fc9065b9722da296e6f5e16 (diff) |
Atmel samd: add support for SAMD21
Tested with SAMD21J18A on the SAMD21 Xplained Pro board.
Change-Id: Ice9ebcd229ed038b3193baf92d910f9256d7ce91
Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-on: http://openocd.zylin.com/1873
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
-rw-r--r-- | src/flash/nor/at91samd.c | 22 | ||||
-rw-r--r-- | tcl/board/atmel_samd21_xplained_pro.cfg | 10 |
2 files changed, 32 insertions, 0 deletions
diff --git a/src/flash/nor/at91samd.c b/src/flash/nor/at91samd.c index 86acbc09..5de5a9a8 100644 --- a/src/flash/nor/at91samd.c +++ b/src/flash/nor/at91samd.c @@ -60,6 +60,7 @@ #define SAMD_PROCESSOR_M0 0x01 #define SAMD_FAMILY_D 0x00 #define SAMD_SERIES_20 0x00 +#define SAMD_SERIES_21 0x01 struct samd_part { uint8_t id; @@ -86,6 +87,25 @@ static struct samd_part samd20_parts[] = { { 0xE, "SAMD20E14A", 16, 2 }, }; +/* Known SAMD21 parts. */ +static struct samd_part samd21_parts[] = { + { 0x0, "SAMD21J18A", 256, 32 }, + { 0x1, "SAMD21J17A", 128, 16 }, + { 0x2, "SAMD21J16A", 64, 8 }, + { 0x3, "SAMD21J15A", 32, 4 }, + { 0x4, "SAMD21J14A", 16, 2 }, + { 0x5, "SAMD21G18A", 256, 32 }, + { 0x6, "SAMD21G17A", 128, 16 }, + { 0x7, "SAMD21G16A", 64, 8 }, + { 0x8, "SAMD21G15A", 32, 4 }, + { 0x9, "SAMD21G14A", 16, 2 }, + { 0xA, "SAMD21E18A", 256, 32 }, + { 0xB, "SAMD21E17A", 128, 16 }, + { 0xC, "SAMD21E16A", 64, 8 }, + { 0xD, "SAMD21E15A", 32, 4 }, + { 0xE, "SAMD21E14A", 16, 2 }, +}; + /* Each family of parts contains a parts table in the DEVSEL field of DID. The * processor ID, family ID, and series ID are used to determine which exact * family this is and then we can use the corresponding table. */ @@ -101,6 +121,8 @@ struct samd_family { static struct samd_family samd_families[] = { { SAMD_PROCESSOR_M0, SAMD_FAMILY_D, SAMD_SERIES_20, samd20_parts, ARRAY_SIZE(samd20_parts) }, + { SAMD_PROCESSOR_M0, SAMD_FAMILY_D, SAMD_SERIES_21, + samd21_parts, ARRAY_SIZE(samd21_parts) }, }; struct samd_info { diff --git a/tcl/board/atmel_samd21_xplained_pro.cfg b/tcl/board/atmel_samd21_xplained_pro.cfg new file mode 100644 index 00000000..843b0ce2 --- /dev/null +++ b/tcl/board/atmel_samd21_xplained_pro.cfg @@ -0,0 +1,10 @@ +# +# Atmel SAMD21 Xplained Pro evaluation kit. +# + +source [find interface/cmsis-dap.cfg] + +# chip name +set CHIPNAME at91samd21j18 + +source [find target/at91samdXX.cfg] |