blob: a3b9d0847cc2288680e753fb96804277433a2696 [file] [log] [blame]
Robert Rostoharba96a2c2016-07-01 22:42:12 +02001<?xml version="1.0" encoding="UTF-8"?>
2<!--
Joachim Krechae9507d2016-09-23 14:01:37 +02003
Robert Rostoharba96a2c2016-07-01 22:42:12 +02004 Copyright (c) 2013-2016 ARM Limited. All rights reserved.
5
6 SPDX-License-Identifier: Apache-2.0
7
8 Licensed under the Apache License, Version 2.0 (the License); you may
9 not use this file except in compliance with the License.
10 You may obtain a copy of the License at
11
12 http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an AS IS BASIS, WITHOUT
16 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
Joachim Krechae9507d2016-09-23 14:01:37 +020019
20 $Date: 23. September 2016
21 $Revision: 1.3.3
Robert Rostoharba96a2c2016-07-01 22:42:12 +020022
Joachim Krechae9507d2016-09-23 14:01:37 +020023 Version 1.3.3:
24 - update file header to Apache 2.0 License
25 - add dimableIdentifierType, as a copy of previous identifierType adding "%s",
26 - update identifierType to only allow names without %s included.
27 - remove enumerationNameType.
28 - add headerEnumName to enumerationType and to dimArrayIndexType for peripheral arrays
29 overwriting hierarchically generated names
30 - add dimName to dimElementGroup. Only valid in <cluster> context, ignored otherwise.
Robert Rostoharba96a2c2016-07-01 22:42:12 +020031
32 Version 1.3.2:
33 adding dimIndexArray to peripheral-, cluster- and register-array to describe
34 enumeration of array indices.
35
36 Version 1.3.1:
37 fixed peripheral name element type to identifierType to support %s for peripheral arrays
38 added optional protection element to addressBlockType and added p=privileged
39
40 Version 1.3:
41 added dim to peripherals to describe an array of peripherals.
42 added nesting of clusters to support hierarchical register structures.
43 added protection element as part of the registerPropertiesGroup indicating
44 special permissions are required for accessing a register.
45 CPU Section extended with description of the Secure Attribution Unit.
46
47 Version 1.2:
48 Cortex-M7 support items have been added as optional tags for the device header file generation:
49 fpuDP, icachePresent, dcachePresent, itcmPresent, dtcmPresent
50
51 Version 1.1:
52 For backward compatibility all additional tags have been made optional.
53 Extensions may be mandatory for successful device header file generation
54 Other changes are related to some restructuring of the schema.
55
56 Note that the memory section has been removed since this would limit the
57 reuse of descriptions for a series of devices.
58 -->
59
60<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified" version="1.3">
61 <!-- stringType requires a none empty string of a least one character length -->
62 <xs:simpleType name="stringType">
63 <xs:restriction base="xs:string">
64 <xs:minLength value="1"/>
65 </xs:restriction>
66 </xs:simpleType>
67 <!-- cpuType specifies a selection of Cortex-M and Secure-Cores. This list will get extended as new processors are released -->
68 <xs:simpleType name="cpuNameType">
69 <xs:restriction base="xs:token">
70 <xs:enumeration value="CM0"/>
71 <xs:enumeration value="CM0PLUS"/>
72 <xs:enumeration value="CM0+"/>
73 <xs:enumeration value="CM1"/>
74 <xs:enumeration value="SC000"/>
75 <xs:enumeration value="CM3"/>
76 <xs:enumeration value="SC300"/>
77 <xs:enumeration value="CM4"/>
78 <xs:enumeration value="CM7"/>
Joachim Krechae9507d2016-09-23 14:01:37 +020079 <xs:enumeration value="ARMV8MML"/>
80 <xs:enumeration value="ARMV8MBL"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +020081 <xs:enumeration value="CA5"/>
82 <xs:enumeration value="CA7"/>
83 <xs:enumeration value="CA8"/>
84 <xs:enumeration value="CA9"/>
85 <xs:enumeration value="CA15"/>
86 <xs:enumeration value="CA17"/>
87 <xs:enumeration value="CA53"/>
88 <xs:enumeration value="CA57"/>
89 <xs:enumeration value="CA72"/>
90 <xs:enumeration value="other"/>
91 </xs:restriction>
92 </xs:simpleType>
93 <!-- revisionType specifies the CPU revision format as defined by ARM (rNpM) -->
94 <xs:simpleType name="revisionType">
95 <xs:restriction base="xs:string">
96 <xs:pattern value="r[0-9]*p[0-9]*"/>
97 </xs:restriction>
98 </xs:simpleType>
99 <!-- EndianType pre-defines the tokens for specifying the endianess of the device -->
100 <xs:simpleType name="endianType">
101 <xs:restriction base="xs:token">
102 <xs:enumeration value="little"/>
103 <xs:enumeration value="big"/>
104 <xs:enumeration value="selectable"/>
105 <xs:enumeration value="other"/>
106 </xs:restriction>
107 </xs:simpleType>
108 <!-- dataType pre-defines the tokens in line with CMSIS data type definitions -->
109 <xs:simpleType name="dataTypeType">
110 <xs:restriction base="xs:token">
111 <xs:enumeration value="uint8_t"/>
112 <xs:enumeration value="uint16_t"/>
113 <xs:enumeration value="uint32_t"/>
114 <xs:enumeration value="uint64_t"/>
115 <xs:enumeration value="int8_t"/>
116 <xs:enumeration value="int16_t"/>
117 <xs:enumeration value="int32_t"/>
118 <xs:enumeration value="int64_t"/>
119 <xs:enumeration value="uint8_t *"/>
120 <xs:enumeration value="uint16_t *"/>
121 <xs:enumeration value="uint32_t *"/>
122 <xs:enumeration value="uint64_t *"/>
123 <xs:enumeration value="int8_t *"/>
124 <xs:enumeration value="int16_t *"/>
125 <xs:enumeration value="int32_t *"/>
126 <xs:enumeration value="int64_t *"/>
127 </xs:restriction>
128 </xs:simpleType>
129 <!-- nvicPrioBitsType specifies the integer value range for the number of bits used in NVIC to encode priority levels -->
130 <xs:simpleType name="nvicPrioBitsType">
131 <xs:restriction base="xs:integer">
132 <xs:minInclusive value="2"/>
133 <xs:maxInclusive value="8"/>
134 </xs:restriction>
135 </xs:simpleType>
Joachim Krechae9507d2016-09-23 14:01:37 +0200136 <!-- dimableIdentifierType specifies the subset and sequence of characters used for specifying identifiers that may contain %s from dim. -->
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200137 <!-- this is particularly important as these are used in ANSI C Structures during the device header file generation -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200138 <xs:simpleType name="dimableIdentifierType">
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200139 <xs:restriction base="xs:string">
Joachim Krechae9507d2016-09-23 14:01:37 +0200140 <xs:pattern value="((%s)|(%s)[_A-Za-z]{1}[_A-Za-z0-9]*)|([_A-Za-z]{1}[_A-Za-z0-9]*(\[%s\])?)|([_A-Za-z]{1}[_A-Za-z0-9]*(%s)?[_A-Za-z0-9]*)"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200141 </xs:restriction>
142 </xs:simpleType>
Joachim Krechae9507d2016-09-23 14:01:37 +0200143 <!-- identifierType specifies the subset and sequence of characters used for specifying identifiers that must not contain %s from dim. -->
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200144 <!-- this is particularly important as these are used in ANSI C Structures during the device header file generation -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200145 <xs:simpleType name="identifierType">
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200146 <xs:restriction base="xs:string">
147 <xs:pattern value="[_A-Za-z0-9]*"/>
148 </xs:restriction>
149 </xs:simpleType>
150 <!-- V1.3: Protection Access Attribute Strings -->
151 <xs:simpleType name="protectionStringType">
152 <xs:restriction base="xs:string">
153 <!-- s = Secure -->
154 <!-- n = Non-secure -->
155 <!-- p = Privileged -->
156 <xs:pattern value="[snp]"/>
157 </xs:restriction>
158 </xs:simpleType>
159 <!-- V1.3: SAU Access Type -->
160 <xs:simpleType name="sauAccessType">
161 <xs:restriction base="xs:string">
162 <!-- c = non-secure Callable / Secure -->
163 <!-- n = Non-secure -->
164 <xs:pattern value="[cn]"/>
165 </xs:restriction>
166 </xs:simpleType>
167
168 <!-- dimIndexType specifies the subset and sequence of characters used for specifying the sequence of indices in register arrays -->
169 <xs:simpleType name="dimIndexType">
170 <xs:restriction base="xs:string">
171 <xs:pattern value="[0-9]+\-[0-9]+|[A-Z]-[A-Z]|[_0-9a-zA-Z]+(,\s*[_0-9a-zA-Z]+)+"/>
172 </xs:restriction>
173 </xs:simpleType>
174 <!-- scaledNonNegativeInteger specifies the format in which numbers are represented in hexadecimal or decimar format -->
175 <xs:simpleType name="scaledNonNegativeInteger">
176 <xs:restriction base="xs:string">
177 <xs:pattern value="[+]?(0x|0X|#)?[0-9a-fA-F]+[kmgtKMGT]?"/>
178 </xs:restriction>
179 </xs:simpleType>
180 <!-- enumeratedValueDataType specifies the number formats for the values in enumeratedValues -->
181 <xs:simpleType name="enumeratedValueDataType">
182 <xs:restriction base="xs:string">
183 <xs:pattern value="[+]?(0x|0X|#)?[0-9a-fxA-FX]+"/>
184 </xs:restriction>
185 </xs:simpleType>
186 <!-- accessType specfies the pre-defined tokens for the available accesses -->
187 <xs:simpleType name="accessType">
188 <xs:restriction base="xs:token">
189 <xs:enumeration value="read-only"/>
190 <xs:enumeration value="write-only"/>
191 <xs:enumeration value="read-write"/>
192 <xs:enumeration value="writeOnce"/>
193 <xs:enumeration value="read-writeOnce"/>
194 </xs:restriction>
195 </xs:simpleType>
196 <!-- modifiedWriteValuesType specifies the pre-defined tokens for the write side effects -->
197 <xs:simpleType name="modifiedWriteValuesType">
198 <xs:restriction base="xs:token">
199 <xs:enumeration value="oneToClear"/>
200 <xs:enumeration value="oneToSet"/>
201 <xs:enumeration value="oneToToggle"/>
202 <xs:enumeration value="zeroToClear"/>
203 <xs:enumeration value="zeroToSet"/>
204 <xs:enumeration value="zeroToToggle"/>
205 <xs:enumeration value="clear"/>
206 <xs:enumeration value="set"/>
207 <xs:enumeration value="modify"/>
208 </xs:restriction>
209 </xs:simpleType>
210 <!-- readAction type specifies the pre-defined tokens for read side effects -->
211 <xs:simpleType name="readActionType">
212 <xs:restriction base="xs:token">
213 <xs:enumeration value="clear"/>
214 <xs:enumeration value="set"/>
215 <xs:enumeration value="modify"/>
216 <xs:enumeration value="modifyExternal"/>
217 </xs:restriction>
218 </xs:simpleType>
219 <!-- enumUsageType specifies the pre-defined tokens for selecting what access types an enumeratedValues set is associated with -->
220 <xs:simpleType name="enumUsageType">
221 <xs:restriction base="xs:token">
222 <xs:enumeration value="read"/>
223 <xs:enumeration value="write"/>
224 <xs:enumeration value="read-write"/>
225 </xs:restriction>
226 </xs:simpleType>
227 <!-- bitRangeType specifies the bit numbers to be restricted values from 0 - 69 -->
228 <xs:simpleType name="bitRangeType">
229 <xs:restriction base="xs:token">
230 <xs:pattern value="\[([0-4])?[0-9]:([0-4])?[0-9]\]"/>
231 </xs:restriction>
232 </xs:simpleType>
233 <!-- writeContraintType specifies how to describe the restriction of the allowed values that can be written to a resource -->
234 <xs:complexType name="writeConstraintType">
235 <xs:choice>
236 <xs:element name="writeAsRead" type="xs:boolean"/>
237 <xs:element name="useEnumeratedValues" type="xs:boolean"/>
238 <xs:element name="range">
239 <xs:complexType>
240 <xs:sequence>
241 <xs:element name="minimum" type="scaledNonNegativeInteger"/>
242 <xs:element name="maximum" type="scaledNonNegativeInteger"/>
243 </xs:sequence>
244 </xs:complexType>
245 </xs:element>
246 </xs:choice>
247 </xs:complexType>
248 <!-- addressBlockType specifies the elements to describe an address block -->
249 <xs:complexType name="addressBlockType">
250 <xs:sequence>
251 <xs:element name="offset" type="scaledNonNegativeInteger"/>
252 <xs:element name="size" type="scaledNonNegativeInteger"/>
253 <xs:element name="usage">
254 <xs:simpleType>
255 <xs:restriction base="xs:token">
256 <xs:enumeration value="registers"/>
257 <xs:enumeration value="buffer"/>
258 <xs:enumeration value="reserved"/>
259 </xs:restriction>
260 </xs:simpleType>
261 </xs:element>
262 <!-- Version 1.3.2: optional access protection for an address block s=secure n=non-secure p=privileged -->
263 <xs:element name="protection" type="protectionStringType" minOccurs="0"/>
264 </xs:sequence>
265 </xs:complexType>
266 <!-- interruptType specifies how to describe an interrupt associated with a peripheral -->
267 <xs:complexType name="interruptType">
268 <xs:sequence>
269 <xs:element name="name" type="stringType"/>
270 <xs:element name="description" type="xs:string" minOccurs="0"/>
271 <xs:element name="value" type="xs:integer"/>
272 </xs:sequence>
273 </xs:complexType>
274 <!-- register properties group specifies register size, access permission and reset value
275 this is used in multiple locations. Settings are inherited downstream. -->
276 <xs:group name="registerPropertiesGroup">
277 <xs:sequence>
278 <xs:element name="size" type="scaledNonNegativeInteger" minOccurs="0"/>
279 <xs:element name="access" type="accessType" minOccurs="0"/>
280 <!-- V 1.3: extended register access protection -->
281 <xs:element name="protection" type="protectionStringType" minOccurs="0"/>
282 <xs:element name="resetValue" type="scaledNonNegativeInteger" minOccurs="0"/>
283 <xs:element name="resetMask" type="scaledNonNegativeInteger" minOccurs="0"/>
284 </xs:sequence>
285 </xs:group>
286 <!-- bitRangeLsbMsbStyle specifies the bit position of a field within a register
287 by specifying the least significant and the most significant bit position -->
288 <xs:group name="bitRangeLsbMsbStyle">
289 <xs:sequence>
290 <xs:element name="lsb" type="scaledNonNegativeInteger"/>
291 <xs:element name="msb" type="scaledNonNegativeInteger"/>
292 </xs:sequence>
293 </xs:group>
294 <!-- bitRangeOffsetWidthStyle specifies the bit position of a field within a register
295 by specifying the least significant bit position and the bitWidth of the field -->
296 <xs:group name="bitRangeOffsetWidthStyle">
297 <xs:sequence>
298 <xs:element name="bitOffset" type="scaledNonNegativeInteger"/>
299 <xs:element name="bitWidth" type="scaledNonNegativeInteger" minOccurs="0"/>
300 </xs:sequence>
301 </xs:group>
302
Joachim Krechae9507d2016-09-23 14:01:37 +0200303 <!-- dimElementGroup specifies the number of array elements (dim), the address offset
304 between to consecutive array elements and an a comma seperated list of strings
305 being used for identifying each element in the array -->
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200306 <xs:group name="dimElementGroup">
307 <xs:sequence>
308 <xs:element name="dim" type="scaledNonNegativeInteger"/>
309 <xs:element name="dimIncrement" type="scaledNonNegativeInteger"/>
310 <xs:element name="dimIndex" type="dimIndexType" minOccurs="0"/>
Joachim Krechae9507d2016-09-23 14:01:37 +0200311 <xs:element name="dimName" type="identifierType" minOccurs="0"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200312 <xs:element name="dimArrayIndex" type="dimArrayIndexType" minOccurs="0"/>
313 </xs:sequence>
314 </xs:group>
315
316 <xs:complexType name="cpuType">
317 <xs:sequence>
318 <!-- V1.1: ARM processor name: Cortex-Mx / SCxxx -->
319 <xs:element name="name" type="cpuNameType"/>
320 <!-- V1.1: ARM defined revision of the cpu -->
321 <xs:element name="revision" type="revisionType"/>
322 <!-- V1.1: Endian specifies the endianess of the processor/device -->
323 <xs:element name="endian" type="endianType"/>
324 <!-- V1.1: mpuPresent specifies whether or not a memory protection unit is physically present -->
325 <xs:element name="mpuPresent" type="xs:boolean"/>
326 <!-- V1.1: fpuPresent specifies whether or not a floating point hardware unit is physically present -->
327 <xs:element name="fpuPresent" type="xs:boolean"/>
328 <!-- V1.2: fpuDP specifies a double precision floating point hardware unit is physically present-->
329 <xs:element name="fpuDP" type="xs:boolean" minOccurs="0"/>
330 <!-- V1.2: icachePresent specifies that an instruction cache is physically present-->
331 <xs:element name="icachePresent" type="xs:boolean" minOccurs="0"/>
332 <!-- V1.2: dcachePresent specifies that a data cache is physically present-->
333 <xs:element name="dcachePresent" type="xs:boolean" minOccurs="0"/>
334 <!-- V1.2: itcmPresent specifies that an instruction tightly coupled memory is physically present-->
335 <xs:element name="itcmPresent" type="xs:boolean" minOccurs="0"/>
336 <!-- V1.2: dtcmPresent specifies that an data tightly coupled memory is physically present-->
337 <xs:element name="dtcmPresent" type="xs:boolean" minOccurs="0"/>
338 <!-- V1.1: vtorPresent is used for Cortex-M0+ based devices only. It indicates whether the Vector -->
339 <!-- Table Offset Register is implemented in the device or not -->
340 <xs:element name="vtorPresent" type="xs:boolean" minOccurs="0"/>
341 <!-- V1.1: nvicPrioBits specifies the number of bits used by the Nested Vectored Interrupt Controller -->
342 <!-- for defining the priority level = # priority levels -->
343 <xs:element name="nvicPrioBits" type="scaledNonNegativeInteger"/>
344 <!-- V1.1: vendorSystickConfig is set true if a custom system timer is implemented in the device -->
345 <!-- instead of the ARM specified SysTickTimer -->
346 <xs:element name="vendorSystickConfig" type="xs:boolean"/>
347 <!-- V1.3: reports the total number of interrupts implemented by the device (optional) -->
348 <xs:element name="deviceNumInterrupts" type="scaledNonNegativeInteger" minOccurs="0"/>
349 <!-- V1.3: sauRegions specifies the available number of address regions -->
350 <!-- if not specified a value of zero is assumed -->
351 <xs:element name="sauNumRegions" type="scaledNonNegativeInteger" minOccurs="0"/>
352 <!-- V1.3: SAU Regions Configuration (if fully or partially predefined) -->
353 <xs:element name="sauRegionsConfig" minOccurs="0">
354 <xs:complexType>
355 <xs:sequence>
356 <xs:element name="region" minOccurs="0" maxOccurs="unbounded">
357 <!-- addressBlockType specifies the elements to describe an address block -->
358 <xs:complexType>
359 <xs:sequence minOccurs="1" maxOccurs="unbounded">
360 <xs:element name="base" type="scaledNonNegativeInteger"/>
361 <xs:element name="limit" type="scaledNonNegativeInteger"/>
362 <xs:element name="access" type="sauAccessType"/>
363 </xs:sequence>
364 <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
365 <xs:attribute name="name" type="xs:string" use="optional"/>
366 </xs:complexType>
367 </xs:element>
368 </xs:sequence>
369 <xs:attribute name="enabled" type="xs:boolean" use="optional" default="true"/>
370 <xs:attribute name="protectionWhenDisabled" type="protectionStringType" use="optional" default="s"/>
371 </xs:complexType>
372 </xs:element>
373 </xs:sequence>
374 </xs:complexType>
375
376 <xs:complexType name="enumeratedValueType">
377 <xs:sequence>
378 <!-- name is a ANSI C indentifier representing the value (C Enumeration) -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200379 <xs:element name="name" type="identifierType"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200380 <!-- description contains the details about the semantics/behavior specified by this value -->
381 <xs:element name="description" type="stringType" minOccurs="0"/>
382 <xs:choice>
383 <xs:element name="value" type="enumeratedValueDataType"/>
384 <!-- isDefault specifies the name and description for all values that are not
385 specifically described individually -->
386 <xs:element name="isDefault" type="xs:boolean"/>
387 </xs:choice>
388 </xs:sequence>
389 </xs:complexType>
390
391 <xs:complexType name="enumerationType">
392 <xs:sequence>
393 <!-- name specfies a reference to this enumeratedValues section for reuse purposes
394 this name does not appear in the System Viewer nor the Header File. -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200395 <xs:element name="name" type="identifierType" minOccurs="0"/>
396 <!-- overrides the hierarchical enumeration type in the device header file. User is responsible for uniqueness across description -->
397 <xs:element name="headerEnumName" type="identifierType" minOccurs="0"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200398 <!-- usage specifies whether this enumeration is to be used for read or write or
399 (read and write) accesses -->
400 <xs:element name="usage" type="enumUsageType" minOccurs="0"/>
401 <!-- enumeratedValue derivedFrom=<identifierType> -->
402 <xs:element name="enumeratedValue" type="enumeratedValueType" minOccurs="1" maxOccurs="unbounded"/>
403 </xs:sequence>
Joachim Krechae9507d2016-09-23 14:01:37 +0200404 <xs:attribute name="derivedFrom" type="identifierType" use="optional"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200405 </xs:complexType>
406
407 <xs:complexType name="dimArrayIndexType">
408 <xs:sequence>
Joachim Krechae9507d2016-09-23 14:01:37 +0200409 <xs:element name="headerEnumName" type="identifierType" minOccurs="0"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200410 <xs:element name="enumeratedValue" type="enumeratedValueType" minOccurs="1" maxOccurs="unbounded"/>
411 </xs:sequence>
412 </xs:complexType>
413
414 <xs:complexType name="fieldType">
415 <xs:sequence>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200416 <xs:group ref="dimElementGroup" minOccurs="0"/>
417 <!-- name specifies a field's name. The System Viewer and the device header file will
418 use the name of the field as identifier -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200419 <xs:element name="name" type="dimableIdentifierType"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200420 <!-- description contains reference manual level information about the function and
421 options of a field -->
422 <xs:element name="description" type="stringType" minOccurs="0"/>
423 <!-- alternative specifications of the bit position of the field within the register -->
424 <xs:choice minOccurs="1" maxOccurs="1">
425 <!-- bit field described by lsb followed by msb tag -->
426 <xs:group ref="bitRangeLsbMsbStyle"/>
427 <!-- bit field described by bit offset relative to Bit0 + bit width of field -->
428 <xs:group ref="bitRangeOffsetWidthStyle"/>
429 <!-- bit field described by [<msb>:<lsb>] -->
430 <xs:element name="bitRange" type="bitRangeType"/>
431 </xs:choice>
432 <!-- access describes the predefined permissions for the field. -->
433 <xs:element name="access" type="accessType" minOccurs="0"/>
434 <!-- predefined description of write side effects -->
435 <xs:element name="modifiedWriteValues" type="modifiedWriteValuesType" minOccurs="0"/>
436 <!-- writeContstraint specifies the subrange of allowed values -->
437 <xs:element name="writeConstraint" type="writeConstraintType" minOccurs="0"/>
438 <!-- readAction specifies the read side effects. -->
439 <xs:element name="readAction" type="readActionType" minOccurs="0"/>
440 <!-- enumeratedValues derivedFrom=<identifierType> -->
441 <xs:element name="enumeratedValues" type="enumerationType" minOccurs="0" maxOccurs="2">
442 </xs:element>
443 </xs:sequence>
Joachim Krechae9507d2016-09-23 14:01:37 +0200444 <xs:attribute name="derivedFrom" type="dimableIdentifierType" use="optional"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200445 </xs:complexType>
446
447 <xs:complexType name="fieldsType">
448 <xs:sequence>
449 <!-- field derivedFrom=<identifierType> -->
450 <xs:element name="field" type="fieldType" minOccurs="1" maxOccurs="unbounded"/>
451 </xs:sequence>
452 </xs:complexType>
453
454 <xs:complexType name="registerType">
455 <xs:sequence>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200456 <xs:group ref="dimElementGroup" minOccurs="0"/>
457 <!-- name specifies the name of the register. The register name is used by System Viewer and
458 device header file generator to represent a register -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200459 <xs:element name="name" type="dimableIdentifierType"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200460 <!-- display name specifies a register name without the restritions of an ANSIS C identifier.
461 The use of this tag is discouraged because it does not allow consistency between
462 the System View and the device header file. -->
463 <xs:element name="displayName" type="stringType" minOccurs="0"/>
464 <!-- description contains a reference manual level description about the register and it's purpose -->
465 <xs:element name="description" type="stringType" minOccurs="0"/>
466 <xs:choice>
467 <!-- alternateGroup specifies the identifier of the subgroup a register belongs to.
468 This is useful if a register has a different description per mode but a single name -->
469 <xs:element name="alternateGroup" type="identifierType" minOccurs="0"/>
470 <!-- V1.1: alternateRegister specifies an alternate register description for an address that is
471 already fully described. In this case the register name must be unique within the peripheral -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200472 <xs:element name="alternateRegister" type="dimableIdentifierType" minOccurs="0"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200473 </xs:choice>
474 <!-- addressOffset describes the address of the register relative to the baseOffset of the peripheral -->
475 <xs:element name="addressOffset" type="scaledNonNegativeInteger"/>
476 <!-- registerPropertiesGroup elements specify the default values for register size, access permission and
477 reset value. These default values are inherited to all fields contained in this register -->
478 <xs:group ref="registerPropertiesGroup" minOccurs="0"/>
479 <!-- V1.1: dataType specifies a CMSIS compliant native dataType for a register (i.e. signed, unsigned, pointer) -->
480 <xs:element name="dataType" type="dataTypeType" minOccurs="0"/>
481 <!-- modifiedWriteValues specifies the write side effects -->
482 <xs:element name="modifiedWriteValues" type="modifiedWriteValuesType" minOccurs="0"/>
483 <!-- writeConstraint specifies the subset of allowed write values -->
484 <xs:element name="writeConstraint" type="writeConstraintType" minOccurs="0"/>
485 <!-- readAcction specifies the read side effects -->
486 <xs:element name="readAction" type="readActionType" minOccurs="0"/>
487 <!-- fields section contains all fields that belong to this register -->
488 <xs:element name="fields" type="fieldsType" minOccurs="0" maxOccurs="1"/>
489 </xs:sequence>
Joachim Krechae9507d2016-09-23 14:01:37 +0200490 <xs:attribute name="derivedFrom" type="dimableIdentifierType" use="optional"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200491 </xs:complexType>
492
493 <!-- V1.1: A cluster is a set of registers that are composed into a C data structure in the device header file -->
494 <xs:complexType name="clusterType">
495 <xs:sequence>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200496 <xs:group ref="dimElementGroup" minOccurs="0"/>
Joachim Krechae9507d2016-09-23 14:01:37 +0200497 <xs:element name="name" type="dimableIdentifierType"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200498 <xs:element name="description" type="xs:string"/>
499 <!-- V1.1: alternateCluster specifies an alternative description for a cluster address range that is
500 already fully described. In this case the cluster name must be unique within the peripheral -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200501 <xs:element name="alternateCluster" type="dimableIdentifierType" minOccurs="0"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200502 <!-- V1.1: headerStructName specifies the name for the cluster structure typedef
503 used in the device header generation instead of the cluster name -->
504 <xs:element name="headerStructName" type="identifierType" minOccurs="0"/>
505 <xs:element name="addressOffset" type="scaledNonNegativeInteger"/>
506 <!-- registerPropertiesGroup elements specify the default values for register size, access permission and
507 reset value. These default values are inherited to all registers contained in this peripheral -->
508 <xs:group ref="registerPropertiesGroup" minOccurs="0"/>
509 <xs:sequence>
510 <xs:choice minOccurs="1" maxOccurs="unbounded">
511 <xs:element name="register" type="registerType" minOccurs="0" maxOccurs="unbounded"/>
512 <!-- 1.3: nesting of cluster is supported -->
513 <xs:element name="cluster" type="clusterType" minOccurs="0" maxOccurs="unbounded"/>
514 </xs:choice>
515 </xs:sequence>
516 </xs:sequence>
Joachim Krechae9507d2016-09-23 14:01:37 +0200517 <xs:attribute name="derivedFrom" type="dimableIdentifierType" use="optional"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200518 </xs:complexType>
519
520 <!-- the registers section can have an arbitrary list of cluster and register sections -->
521 <xs:complexType name="registersType">
522 <xs:choice minOccurs="1" maxOccurs="unbounded">
523 <xs:element name="cluster" type="clusterType"/>
524 <xs:element name="register" type="registerType"/>
525 </xs:choice>
526 </xs:complexType>
527
528 <xs:complexType name="peripheralType">
529 <xs:sequence>
530 <!-- 1.3: specify uni-dimensional array of peripheral - requires name="<name>[%s]" -->
531 <xs:group ref="dimElementGroup" minOccurs="0"/>
532 <!-- name specifies the name of a peripheral. This name is used for the System View and device header file -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200533 <xs:element name="name" type="dimableIdentifierType"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200534 <!-- version specifies the version of the peripheral descriptions -->
535 <xs:element name="version" type="stringType" minOccurs="0"/>
536 <!-- description provides a high level functional description of the peripheral -->
537 <xs:element name="description" type="stringType" minOccurs="0"/>
538 <!-- V1.1: alternatePeripheral specifies an alternative description for an address range that is
539 already fully by a peripheral described. In this case the peripheral name must be unique within the device description -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200540 <xs:element name="alternatePeripheral" type="dimableIdentifierType" minOccurs="0"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200541 <!-- groupName assigns this peripheral to a group of peripherals. This is only used bye the System View -->
542 <xs:element name="groupName" type="xs:Name" minOccurs="0"/>
543 <!-- prependToName specifies a prefix that is placed in front of each register name of this peripheral.
544 The device header file will show the registers in a C-Struct of the peripheral without the prefix. -->
545 <xs:element name="prependToName" type="identifierType" minOccurs="0"/>
546 <!-- appendToName is a postfix that is appended to each register name of this peripheral. The device header
547 file will sho the registers in a C-Struct of the peripheral without the postfix -->
548 <xs:element name="appendToName" type="identifierType" minOccurs="0"/>
549 <!-- V1.1: headerStructName specifies the name for the peripheral structure typedef
550 used in the device header generation instead of the peripheral name -->
Joachim Krechae9507d2016-09-23 14:01:37 +0200551 <xs:element name="headerStructName" type="dimableIdentifierType" minOccurs="0"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200552 <!-- disableCondition contains a logical expression based on constants and register or bit-field values
553 if the condition is evaluated to true, the peripheral display will be disabled -->
554 <xs:element name="disableCondition" type="stringType" minOccurs="0"/>
555 <!-- baseAddress specifies the absolute base address of a peripheral. For derived peripherals it is mandatory
556 to specify a baseAddress. -->
557 <xs:element name="baseAddress" type="scaledNonNegativeInteger"/>
558 <!-- registerPropertiesGroup elements specify the default values for register size, access permission and
559 reset value. These default values are inherited to all registers contained in this peripheral -->
560 <xs:group ref="registerPropertiesGroup" minOccurs="0"/>
561 <!-- addressBlock specifies one or more address ranges that are assigned exclusively to this peripheral.
562 derived peripherals may have no addressBlock, however none-derived peripherals are required to specify
563 at least one address block -->
564 <xs:element name="addressBlock" type="addressBlockType" minOccurs="0" maxOccurs="unbounded"/>
565 <!-- interrupt specifies can specify one or more interrtupts by name, description and value -->
566 <xs:element name="interrupt" type="interruptType" minOccurs="0" maxOccurs="unbounded"/>
567 <!-- registers section contains all registers owned by the peripheral. In case a peripheral gets derived it does
568 not have its own registers section, hence this section is optional. A unique peripheral without a
569 registers section is not allowed -->
570 <xs:element name="registers" type="registersType" minOccurs="0" maxOccurs="1">
571 </xs:element>
572 </xs:sequence>
Joachim Krechae9507d2016-09-23 14:01:37 +0200573 <xs:attribute name="derivedFrom" type="dimableIdentifierType" use="optional"/>
Robert Rostoharba96a2c2016-07-01 22:42:12 +0200574 </xs:complexType>
575
576 <!-- ==================================================== -->
577 <!-- The top level element of a description is the device -->
578 <!-- ==================================================== -->
579 <xs:element name="device" nillable="true">
580 <xs:complexType>
581 <xs:sequence>
582 <!-- V1.1: Vendor Name -->
583 <xs:element name="vendor" type="stringType" minOccurs="0"/>
584 <!-- V1.1: Vendor ID - a short name for referring to the vendor (e.g. Texas Instruments = TI) -->
585 <xs:element name="vendorID" type="identifierType" minOccurs="0"/>
586 <!-- name specifies the device name being described -->
587 <xs:element name="name" type="identifierType"/>
588 <!-- V1.1: series specifies the device series or family name -->
589 <xs:element name="series" type="stringType" minOccurs="0"/>
590 <!-- version specifies the version of the device description -->
591 <xs:element name="version" type="stringType"/>
592 <!-- description is a string describing the device features (e.g. memory size, peripherals, etc.) -->
593 <xs:element name="description" type="stringType"/>
594 <!-- V1.1: licenseText specifies the file header section to be included in any derived file -->
595 <xs:element name="licenseText" type="stringType" minOccurs="0"/>
596 <!-- V1.1: cpu specifies the details of the processor included in the device -->
597 <xs:element name="cpu" type="cpuType" minOccurs="0"/>
598 <!-- V1.1: the tag specifies the filename without extension of the CMSIS System Device include file.
599 This tag is used by the header file generator for customizing the include statement referencing the
600 CMSIS system file within the CMSIS device header file. By default the filename is "system_<device.name>"
601 In cases a device series shares a single system header file, the name of the series shall be used
602 instead of the individual device name. -->
603 <xs:element name="headerSystemFilename" type="identifierType" minOccurs="0"/>
604 <!-- V1.1: headerDefinitionPrefix specifies the string being prepended to all names of types defined in
605 generated device header file -->
606 <xs:element name="headerDefinitionsPrefix" type="identifierType" minOccurs="0"/>
607 <!-- addressUnitBits specifies the size of the minimal addressable unit in bits -->
608 <xs:element name="addressUnitBits" type="scaledNonNegativeInteger"/>
609 <!-- width specifies the number of bits for the maximum single transfer size allowed by the bus interface.
610 This sets the maximum size of a single register that can be defined for an address space -->
611 <xs:element name="width" type="scaledNonNegativeInteger"/>
612 <!-- registerPropertiesGroup elements specify the default values for register size, access permission and
613 reset value -->
614 <xs:group ref="registerPropertiesGroup" minOccurs="0"/>
615
616 <!-- peripherals is containing all peripherals -->
617 <xs:element name="peripherals">
618 <xs:complexType>
619 <xs:sequence>
620 <xs:element name="peripheral" type="peripheralType" minOccurs="1" maxOccurs="unbounded"/>
621 </xs:sequence>
622 </xs:complexType>
623 </xs:element>
624
625 <!-- Vendor Extensions: this section captures custom extensions. This section will be ignored by default -->
626 <xs:element name="vendorExtensions" minOccurs="0" maxOccurs="1">
627 <xs:complexType>
628 <xs:sequence>
629 <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded">
630 </xs:any>
631 </xs:sequence>
632 </xs:complexType>
633 </xs:element>
634 </xs:sequence>
635 <xs:attribute name="schemaVersion" type="xs:decimal" use="required"/>
636 </xs:complexType>
637 </xs:element>
638</xs:schema>
639
Joachim Krechc4773412016-02-18 09:17:07 +0100640<!-- END OF FILE -->