Skip to content

Commit 6e17060

Browse files
committed
DM: added SAMD51 support
1 parent df76b3a commit 6e17060

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+69727
-2
lines changed

CMSIS-Atmel/CMSIS/Device/ATMEL/sam.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,20 @@
157157
#define SAMD21J18 ( \
158158
part_is_defined( SAMD21J18A ) )
159159

160+
#define SAMD51P20A ( \
161+
part_is_defined( SAMD51P20A ) )
162+
163+
#define SAMD51G19A ( \
164+
part_is_defined( SAMD51G19A ) )
165+
166+
#define SAMD51J20A ( \
167+
part_is_defined( SAMD51J20A ) )
168+
160169
/* Entire SAMD21 series */
161170
#define SAMD21_SERIES (SAMD21J17 || SAMD21G17A || SAMD21E15B || SAMD21E15 || SAMD21E16 || SAMD21E17 || SAMD21E18 || SAMD21E16B || SAMD21J15 || SAMD21J16 || SAMD21G16 || SAMD21G17 || SAMD21G18A || SAMD21G15 || SAMD21G18 || SAMD21J18)
162171

163172
/* Entire SAMD family */
164-
#define SAMD_SERIES (SAMD10_SERIES || SAMD11_SERIES || SAMD21_SERIES)
173+
#define SAMD_SERIES (SAMD10_SERIES || SAMD11_SERIES || SAMD21_SERIES || SAMD51_SERIES || SAMD51P20A || SAMD51G19A || SAMD51J20A)
165174

166175
/*
167176
* ----------------------------------------------------------------------------

CMSIS-Atmel/CMSIS/Device/ATMEL/samd.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,13 @@
2929
#ifndef _SAMD_INCLUDED_
3030
#define _SAMD_INCLUDED_
3131

32-
#if defined (__SAMD20E14__)
32+
#if defined (__SAMD51P20A__)
33+
#include "samd51/include/samd51.h"
34+
#elif defined (__SAMD51G19A__)
35+
#include "samd51/include/samd51.h"
36+
#elif defined (__SAMD51J20A__)
37+
#include "samd51/include/samd51.h"
38+
#elif defined (__SAMD20E14__)
3339
#include "samd20/include/samd20.h"
3440
#elif defined (__SAMD20E15__)
3541
#include "samd20/include/samd20.h"
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/**
2+
* \file
3+
*
4+
* \brief Component version header file
5+
*
6+
* Copyright (c) 2017 Atmel Corporation, a wholly owned subsidiary of Microchip Technology Inc.
7+
*
8+
* \license_start
9+
*
10+
* \page License
11+
*
12+
* Licensed under the Apache License, Version 2.0 (the "License");
13+
* you may not use this file except in compliance with the License.
14+
* You may obtain a copy of the License at
15+
*
16+
* http://www.apache.org/licenses/LICENSE-2.0
17+
*
18+
* Unless required by applicable law or agreed to in writing, software
19+
* distributed under the License is distributed on an "AS IS" BASIS,
20+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21+
* See the License for the specific language governing permissions and
22+
* limitations under the License.
23+
*
24+
* \license_stop
25+
*
26+
*/
27+
28+
#ifndef _COMPONENT_VERSION_H_INCLUDED
29+
#define _COMPONENT_VERSION_H_INCLUDED
30+
31+
#define COMPONENT_VERSION_MAJOR 0
32+
#define COMPONENT_VERSION_MINOR 1
33+
34+
//
35+
// The COMPONENT_VERSION define is composed of the major and the minor version number.
36+
//
37+
// The last four digits of the COMPONENT_VERSION is the minor version with leading zeros.
38+
// The rest of the COMPONENT_VERSION is the major version, with leading zeros. The COMPONENT_VERSION
39+
// is at least 8 digits long.
40+
//
41+
#define COMPONENT_VERSION 00000001
42+
43+
//
44+
// The build number does not refer to the component, but to the build number
45+
// of the device pack that provides the component.
46+
//
47+
#define BUILD_NUMBER 61
48+
49+
//
50+
// The COMPONENT_VERSION_STRING is a string (enclosed in ") that can be used for logging or embedding.
51+
//
52+
#define COMPONENT_VERSION_STRING "0.1"
53+
54+
//
55+
// The COMPONENT_DATE_STRING contains a timestamp of when the pack was generated.
56+
//
57+
// The COMPONENT_DATE_STRING is written out using the following strftime pattern.
58+
//
59+
// "%Y-%m-%d %H:%M:%S"
60+
//
61+
//
62+
#define COMPONENT_DATE_STRING "2017-01-26 16:39:41"
63+
64+
#endif/* #ifndef _COMPONENT_VERSION_H_INCLUDED */
65+

CMSIS-Atmel/CMSIS/Device/ATMEL/samd51/include/component/ac.h

Lines changed: 597 additions & 0 deletions
Large diffs are not rendered by default.

CMSIS-Atmel/CMSIS/Device/ATMEL/samd51/include/component/adc.h

Lines changed: 870 additions & 0 deletions
Large diffs are not rendered by default.

CMSIS-Atmel/CMSIS/Device/ATMEL/samd51/include/component/aes.h

Lines changed: 374 additions & 0 deletions
Large diffs are not rendered by default.

CMSIS-Atmel/CMSIS/Device/ATMEL/samd51/include/component/can.h

Lines changed: 3207 additions & 0 deletions
Large diffs are not rendered by default.

CMSIS-Atmel/CMSIS/Device/ATMEL/samd51/include/component/ccl.h

Lines changed: 227 additions & 0 deletions
Large diffs are not rendered by default.

CMSIS-Atmel/CMSIS/Device/ATMEL/samd51/include/component/cmcc.h

Lines changed: 356 additions & 0 deletions
Large diffs are not rendered by default.

CMSIS-Atmel/CMSIS/Device/ATMEL/samd51/include/component/dac.h

Lines changed: 543 additions & 0 deletions
Large diffs are not rendered by default.

CMSIS-Atmel/CMSIS/Device/ATMEL/samd51/include/component/dmac.h

Lines changed: 1415 additions & 0 deletions
Large diffs are not rendered by default.

CMSIS-Atmel/CMSIS/Device/ATMEL/samd51/include/component/dsu.h

Lines changed: 1219 additions & 0 deletions
Large diffs are not rendered by default.

CMSIS-Atmel/CMSIS/Device/ATMEL/samd51/include/component/eic.h

Lines changed: 496 additions & 0 deletions
Large diffs are not rendered by default.

CMSIS-Atmel/CMSIS/Device/ATMEL/samd51/include/component/evsys.h

Lines changed: 586 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
/**
2+
* \file
3+
*
4+
* \brief Component description for FREQM
5+
*
6+
* Copyright (c) 2017 Atmel Corporation,
7+
* a wholly owned subsidiary of Microchip Technology Inc.
8+
*
9+
* \asf_license_start
10+
*
11+
* \page License
12+
*
13+
* Licensed under the Apache License, Version 2.0 (the "License");
14+
* you may not use this file except in compliance with the License.
15+
* You may obtain a copy of the Licence at
16+
*
17+
* http://www.apache.org/licenses/LICENSE-2.0
18+
*
19+
* Unless required by applicable law or agreed to in writing, software
20+
* distributed under the License is distributed on an "AS IS" BASIS,
21+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22+
* See the License for the specific language governing permissions and
23+
* limitations under the License.
24+
*
25+
* \asf_license_stop
26+
*
27+
*/
28+
29+
#ifndef _SAMD51_FREQM_COMPONENT_
30+
#define _SAMD51_FREQM_COMPONENT_
31+
32+
/* ========================================================================== */
33+
/** SOFTWARE API DEFINITION FOR FREQM */
34+
/* ========================================================================== */
35+
/** \addtogroup SAMD51_FREQM Frequency Meter */
36+
/*@{*/
37+
38+
#define FREQM_U2257
39+
#define REV_FREQM 0x110
40+
41+
/* -------- FREQM_CTRLA : (FREQM Offset: 0x00) (R/W 8) Control A Register -------- */
42+
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
43+
typedef union {
44+
struct {
45+
uint8_t SWRST:1; /*!< bit: 0 Software Reset */
46+
uint8_t ENABLE:1; /*!< bit: 1 Enable */
47+
uint8_t :6; /*!< bit: 2.. 7 Reserved */
48+
} bit; /*!< Structure used for bit access */
49+
uint8_t reg; /*!< Type used for register access */
50+
} FREQM_CTRLA_Type;
51+
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
52+
53+
#define FREQM_CTRLA_OFFSET 0x00 /**< \brief (FREQM_CTRLA offset) Control A Register */
54+
#define FREQM_CTRLA_RESETVALUE _U(0x00) /**< \brief (FREQM_CTRLA reset_value) Control A Register */
55+
56+
#define FREQM_CTRLA_SWRST_Pos 0 /**< \brief (FREQM_CTRLA) Software Reset */
57+
#define FREQM_CTRLA_SWRST (_U(0x1) << FREQM_CTRLA_SWRST_Pos)
58+
#define FREQM_CTRLA_ENABLE_Pos 1 /**< \brief (FREQM_CTRLA) Enable */
59+
#define FREQM_CTRLA_ENABLE (_U(0x1) << FREQM_CTRLA_ENABLE_Pos)
60+
#define FREQM_CTRLA_MASK _U(0x03) /**< \brief (FREQM_CTRLA) MASK Register */
61+
62+
/* -------- FREQM_CTRLB : (FREQM Offset: 0x01) ( /W 8) Control B Register -------- */
63+
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
64+
typedef union {
65+
struct {
66+
uint8_t START:1; /*!< bit: 0 Start Measurement */
67+
uint8_t :7; /*!< bit: 1.. 7 Reserved */
68+
} bit; /*!< Structure used for bit access */
69+
uint8_t reg; /*!< Type used for register access */
70+
} FREQM_CTRLB_Type;
71+
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
72+
73+
#define FREQM_CTRLB_OFFSET 0x01 /**< \brief (FREQM_CTRLB offset) Control B Register */
74+
#define FREQM_CTRLB_RESETVALUE _U(0x00) /**< \brief (FREQM_CTRLB reset_value) Control B Register */
75+
76+
#define FREQM_CTRLB_START_Pos 0 /**< \brief (FREQM_CTRLB) Start Measurement */
77+
#define FREQM_CTRLB_START (_U(0x1) << FREQM_CTRLB_START_Pos)
78+
#define FREQM_CTRLB_MASK _U(0x01) /**< \brief (FREQM_CTRLB) MASK Register */
79+
80+
/* -------- FREQM_CFGA : (FREQM Offset: 0x02) (R/W 16) Config A register -------- */
81+
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
82+
typedef union {
83+
struct {
84+
uint16_t REFNUM:8; /*!< bit: 0.. 7 Number of Reference Clock Cycles */
85+
uint16_t :8; /*!< bit: 8..15 Reserved */
86+
} bit; /*!< Structure used for bit access */
87+
uint16_t reg; /*!< Type used for register access */
88+
} FREQM_CFGA_Type;
89+
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
90+
91+
#define FREQM_CFGA_OFFSET 0x02 /**< \brief (FREQM_CFGA offset) Config A register */
92+
#define FREQM_CFGA_RESETVALUE _U(0x0000) /**< \brief (FREQM_CFGA reset_value) Config A register */
93+
94+
#define FREQM_CFGA_REFNUM_Pos 0 /**< \brief (FREQM_CFGA) Number of Reference Clock Cycles */
95+
#define FREQM_CFGA_REFNUM_Msk (_U(0xFF) << FREQM_CFGA_REFNUM_Pos)
96+
#define FREQM_CFGA_REFNUM(value) (FREQM_CFGA_REFNUM_Msk & ((value) << FREQM_CFGA_REFNUM_Pos))
97+
#define FREQM_CFGA_MASK _U(0x00FF) /**< \brief (FREQM_CFGA) MASK Register */
98+
99+
/* -------- FREQM_INTENCLR : (FREQM Offset: 0x08) (R/W 8) Interrupt Enable Clear Register -------- */
100+
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
101+
typedef union {
102+
struct {
103+
uint8_t DONE:1; /*!< bit: 0 Measurement Done Interrupt Enable */
104+
uint8_t :7; /*!< bit: 1.. 7 Reserved */
105+
} bit; /*!< Structure used for bit access */
106+
uint8_t reg; /*!< Type used for register access */
107+
} FREQM_INTENCLR_Type;
108+
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
109+
110+
#define FREQM_INTENCLR_OFFSET 0x08 /**< \brief (FREQM_INTENCLR offset) Interrupt Enable Clear Register */
111+
#define FREQM_INTENCLR_RESETVALUE _U(0x00) /**< \brief (FREQM_INTENCLR reset_value) Interrupt Enable Clear Register */
112+
113+
#define FREQM_INTENCLR_DONE_Pos 0 /**< \brief (FREQM_INTENCLR) Measurement Done Interrupt Enable */
114+
#define FREQM_INTENCLR_DONE (_U(0x1) << FREQM_INTENCLR_DONE_Pos)
115+
#define FREQM_INTENCLR_MASK _U(0x01) /**< \brief (FREQM_INTENCLR) MASK Register */
116+
117+
/* -------- FREQM_INTENSET : (FREQM Offset: 0x09) (R/W 8) Interrupt Enable Set Register -------- */
118+
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
119+
typedef union {
120+
struct {
121+
uint8_t DONE:1; /*!< bit: 0 Measurement Done Interrupt Enable */
122+
uint8_t :7; /*!< bit: 1.. 7 Reserved */
123+
} bit; /*!< Structure used for bit access */
124+
uint8_t reg; /*!< Type used for register access */
125+
} FREQM_INTENSET_Type;
126+
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
127+
128+
#define FREQM_INTENSET_OFFSET 0x09 /**< \brief (FREQM_INTENSET offset) Interrupt Enable Set Register */
129+
#define FREQM_INTENSET_RESETVALUE _U(0x00) /**< \brief (FREQM_INTENSET reset_value) Interrupt Enable Set Register */
130+
131+
#define FREQM_INTENSET_DONE_Pos 0 /**< \brief (FREQM_INTENSET) Measurement Done Interrupt Enable */
132+
#define FREQM_INTENSET_DONE (_U(0x1) << FREQM_INTENSET_DONE_Pos)
133+
#define FREQM_INTENSET_MASK _U(0x01) /**< \brief (FREQM_INTENSET) MASK Register */
134+
135+
/* -------- FREQM_INTFLAG : (FREQM Offset: 0x0A) (R/W 8) Interrupt Flag Register -------- */
136+
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
137+
typedef union { // __I to avoid read-modify-write on write-to-clear register
138+
struct {
139+
__I uint8_t DONE:1; /*!< bit: 0 Measurement Done */
140+
__I uint8_t :7; /*!< bit: 1.. 7 Reserved */
141+
} bit; /*!< Structure used for bit access */
142+
uint8_t reg; /*!< Type used for register access */
143+
} FREQM_INTFLAG_Type;
144+
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
145+
146+
#define FREQM_INTFLAG_OFFSET 0x0A /**< \brief (FREQM_INTFLAG offset) Interrupt Flag Register */
147+
#define FREQM_INTFLAG_RESETVALUE _U(0x00) /**< \brief (FREQM_INTFLAG reset_value) Interrupt Flag Register */
148+
149+
#define FREQM_INTFLAG_DONE_Pos 0 /**< \brief (FREQM_INTFLAG) Measurement Done */
150+
#define FREQM_INTFLAG_DONE (_U(0x1) << FREQM_INTFLAG_DONE_Pos)
151+
#define FREQM_INTFLAG_MASK _U(0x01) /**< \brief (FREQM_INTFLAG) MASK Register */
152+
153+
/* -------- FREQM_STATUS : (FREQM Offset: 0x0B) (R/W 8) Status Register -------- */
154+
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
155+
typedef union {
156+
struct {
157+
uint8_t BUSY:1; /*!< bit: 0 FREQM Status */
158+
uint8_t OVF:1; /*!< bit: 1 Sticky Count Value Overflow */
159+
uint8_t :6; /*!< bit: 2.. 7 Reserved */
160+
} bit; /*!< Structure used for bit access */
161+
uint8_t reg; /*!< Type used for register access */
162+
} FREQM_STATUS_Type;
163+
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
164+
165+
#define FREQM_STATUS_OFFSET 0x0B /**< \brief (FREQM_STATUS offset) Status Register */
166+
#define FREQM_STATUS_RESETVALUE _U(0x00) /**< \brief (FREQM_STATUS reset_value) Status Register */
167+
168+
#define FREQM_STATUS_BUSY_Pos 0 /**< \brief (FREQM_STATUS) FREQM Status */
169+
#define FREQM_STATUS_BUSY (_U(0x1) << FREQM_STATUS_BUSY_Pos)
170+
#define FREQM_STATUS_OVF_Pos 1 /**< \brief (FREQM_STATUS) Sticky Count Value Overflow */
171+
#define FREQM_STATUS_OVF (_U(0x1) << FREQM_STATUS_OVF_Pos)
172+
#define FREQM_STATUS_MASK _U(0x03) /**< \brief (FREQM_STATUS) MASK Register */
173+
174+
/* -------- FREQM_SYNCBUSY : (FREQM Offset: 0x0C) (R/ 32) Synchronization Busy Register -------- */
175+
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
176+
typedef union {
177+
struct {
178+
uint32_t SWRST:1; /*!< bit: 0 Software Reset */
179+
uint32_t ENABLE:1; /*!< bit: 1 Enable */
180+
uint32_t :30; /*!< bit: 2..31 Reserved */
181+
} bit; /*!< Structure used for bit access */
182+
uint32_t reg; /*!< Type used for register access */
183+
} FREQM_SYNCBUSY_Type;
184+
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
185+
186+
#define FREQM_SYNCBUSY_OFFSET 0x0C /**< \brief (FREQM_SYNCBUSY offset) Synchronization Busy Register */
187+
#define FREQM_SYNCBUSY_RESETVALUE _U(0x00000000) /**< \brief (FREQM_SYNCBUSY reset_value) Synchronization Busy Register */
188+
189+
#define FREQM_SYNCBUSY_SWRST_Pos 0 /**< \brief (FREQM_SYNCBUSY) Software Reset */
190+
#define FREQM_SYNCBUSY_SWRST (_U(0x1) << FREQM_SYNCBUSY_SWRST_Pos)
191+
#define FREQM_SYNCBUSY_ENABLE_Pos 1 /**< \brief (FREQM_SYNCBUSY) Enable */
192+
#define FREQM_SYNCBUSY_ENABLE (_U(0x1) << FREQM_SYNCBUSY_ENABLE_Pos)
193+
#define FREQM_SYNCBUSY_MASK _U(0x00000003) /**< \brief (FREQM_SYNCBUSY) MASK Register */
194+
195+
/* -------- FREQM_VALUE : (FREQM Offset: 0x10) (R/ 32) Count Value Register -------- */
196+
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
197+
typedef union {
198+
struct {
199+
uint32_t VALUE:24; /*!< bit: 0..23 Measurement Value */
200+
uint32_t :8; /*!< bit: 24..31 Reserved */
201+
} bit; /*!< Structure used for bit access */
202+
uint32_t reg; /*!< Type used for register access */
203+
} FREQM_VALUE_Type;
204+
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
205+
206+
#define FREQM_VALUE_OFFSET 0x10 /**< \brief (FREQM_VALUE offset) Count Value Register */
207+
#define FREQM_VALUE_RESETVALUE _U(0x00000000) /**< \brief (FREQM_VALUE reset_value) Count Value Register */
208+
209+
#define FREQM_VALUE_VALUE_Pos 0 /**< \brief (FREQM_VALUE) Measurement Value */
210+
#define FREQM_VALUE_VALUE_Msk (_U(0xFFFFFF) << FREQM_VALUE_VALUE_Pos)
211+
#define FREQM_VALUE_VALUE(value) (FREQM_VALUE_VALUE_Msk & ((value) << FREQM_VALUE_VALUE_Pos))
212+
#define FREQM_VALUE_MASK _U(0x00FFFFFF) /**< \brief (FREQM_VALUE) MASK Register */
213+
214+
/** \brief FREQM hardware registers */
215+
#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
216+
typedef struct {
217+
__IO FREQM_CTRLA_Type CTRLA; /**< \brief Offset: 0x00 (R/W 8) Control A Register */
218+
__O FREQM_CTRLB_Type CTRLB; /**< \brief Offset: 0x01 ( /W 8) Control B Register */
219+
__IO FREQM_CFGA_Type CFGA; /**< \brief Offset: 0x02 (R/W 16) Config A register */
220+
RoReg8 Reserved1[0x4];
221+
__IO FREQM_INTENCLR_Type INTENCLR; /**< \brief Offset: 0x08 (R/W 8) Interrupt Enable Clear Register */
222+
__IO FREQM_INTENSET_Type INTENSET; /**< \brief Offset: 0x09 (R/W 8) Interrupt Enable Set Register */
223+
__IO FREQM_INTFLAG_Type INTFLAG; /**< \brief Offset: 0x0A (R/W 8) Interrupt Flag Register */
224+
__IO FREQM_STATUS_Type STATUS; /**< \brief Offset: 0x0B (R/W 8) Status Register */
225+
__I FREQM_SYNCBUSY_Type SYNCBUSY; /**< \brief Offset: 0x0C (R/ 32) Synchronization Busy Register */
226+
__I FREQM_VALUE_Type VALUE; /**< \brief Offset: 0x10 (R/ 32) Count Value Register */
227+
} Freqm;
228+
#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
229+
230+
/*@}*/
231+
232+
#endif /* _SAMD51_FREQM_COMPONENT_ */

0 commit comments

Comments
 (0)