A bundled STM32F10x Std Periph and CMSIS library
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

287 lines
14 KiB

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. date: 07.12.2011
  4. Copyright (C) 2011 - 2012 ARM Limited. All rights reserved.
  5. Redistribution and use in source and binary forms, with or without
  6. modification, are permitted provided that the following conditions are met:
  7. - Redistributions of source code must retain the above copyright
  8. notice, this list of conditions and the following disclaimer.
  9. - Redistributions in binary form must reproduce the above copyright
  10. notice, this list of conditions and the following disclaimer in the
  11. documentation and/or other materials provided with the distribution.
  12. - Neither the name of ARM nor the names of its contributors may be used
  13. to endorse or promote products derived from this software without
  14. specific prior written permission.
  15. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  16. AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  17. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  18. ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE
  19. LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  20. CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  21. SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  22. INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  23. CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  24. ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  25. POSSIBILITY OF SUCH DAMAGE.
  26. -->
  27. <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified" version="1.0">
  28. <xs:simpleType name="registerNameType">
  29. <xs:restriction base="xs:string">
  30. <xs:pattern value="((%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]*)"/>
  31. </xs:restriction>
  32. </xs:simpleType>
  33. <xs:simpleType name="dimIndexType">
  34. <xs:restriction base="xs:string">
  35. <xs:pattern value="[0-9]+\-[0-9]+|[A-Z]-[A-Z]|[_0-9a-zA-Z]+(,\s*[_0-9a-zA-Z]+)+"/>
  36. </xs:restriction>
  37. </xs:simpleType>
  38. <xs:simpleType name="scaledNonNegativeInteger">
  39. <xs:restriction base="xs:string">
  40. <xs:pattern value="[+]?(0x|0X|#)?[0-9a-fA-F]+[kmgtKMGT]?"/>
  41. </xs:restriction>
  42. </xs:simpleType>
  43. <xs:simpleType name="enumeratedValueDataType">
  44. <xs:restriction base="xs:string">
  45. <xs:pattern value="[+]?(0x|0X|#)?[0-9a-fxA-FX]+"/>
  46. </xs:restriction>
  47. </xs:simpleType>
  48. <xs:simpleType name="accessType">
  49. <xs:restriction base="xs:token">
  50. <xs:enumeration value="read-only"/>
  51. <xs:enumeration value="write-only"/>
  52. <xs:enumeration value="read-write"/>
  53. <xs:enumeration value="writeOnce"/>
  54. <xs:enumeration value="read-writeOnce"/>
  55. </xs:restriction>
  56. </xs:simpleType>
  57. <xs:simpleType name="modifiedWriteValuesType">
  58. <xs:restriction base="xs:token">
  59. <xs:enumeration value="oneToClear"/>
  60. <xs:enumeration value="oneToSet"/>
  61. <xs:enumeration value="oneToToggle"/>
  62. <xs:enumeration value="zeroToClear"/>
  63. <xs:enumeration value="zeroToSet"/>
  64. <xs:enumeration value="zeroToToggle"/>
  65. <xs:enumeration value="clear"/>
  66. <xs:enumeration value="set"/>
  67. <xs:enumeration value="modify"/>
  68. </xs:restriction>
  69. </xs:simpleType>
  70. <xs:simpleType name="readActionType">
  71. <xs:restriction base="xs:token">
  72. <xs:enumeration value="clear"/>
  73. <xs:enumeration value="set"/>
  74. <xs:enumeration value="modify"/>
  75. <xs:enumeration value="modifyExternal"/>
  76. </xs:restriction>
  77. </xs:simpleType>
  78. <xs:simpleType name="enumUsageType">
  79. <xs:restriction base="xs:token">
  80. <xs:enumeration value="read"/>
  81. <xs:enumeration value="write"/>
  82. <xs:enumeration value="read-write"/>
  83. </xs:restriction>
  84. </xs:simpleType>
  85. <xs:simpleType name="bitRangeType">
  86. <xs:restriction base="xs:token">
  87. <xs:pattern value="\[([0-3])?[0-9]:([0-3])?[0-9]\]"/>
  88. </xs:restriction>
  89. </xs:simpleType>
  90. <xs:complexType name="writeConstraintType">
  91. <xs:choice>
  92. <xs:element name="writeAsRead" type="xs:boolean"/>
  93. <xs:element name="useEnumeratedValues" type="xs:boolean"/>
  94. <xs:element name="range">
  95. <xs:complexType>
  96. <xs:sequence>
  97. <xs:element name="minimum" type="scaledNonNegativeInteger"/>
  98. <xs:element name="maximum" type="scaledNonNegativeInteger"/>
  99. </xs:sequence>
  100. </xs:complexType>
  101. </xs:element>
  102. </xs:choice>
  103. </xs:complexType>
  104. <xs:complexType name="addressBlockType">
  105. <xs:sequence>
  106. <xs:element name="offset" type="scaledNonNegativeInteger"/>
  107. <xs:element name="size" type="scaledNonNegativeInteger"/>
  108. <xs:element name="usage">
  109. <xs:simpleType>
  110. <xs:restriction base="xs:token">
  111. <xs:enumeration value="registers"/>
  112. <xs:enumeration value="buffer"/>
  113. <xs:enumeration value="reserved"/>
  114. </xs:restriction>
  115. </xs:simpleType>
  116. </xs:element>
  117. </xs:sequence>
  118. </xs:complexType>
  119. <xs:complexType name="interruptType">
  120. <xs:sequence>
  121. <xs:element name="name" type="xs:string"/>
  122. <xs:element name="value" type="xs:integer"/>
  123. </xs:sequence>
  124. </xs:complexType>
  125. <xs:group name="registerPropertiesGroup">
  126. <xs:sequence>
  127. <xs:element name="size" type="scaledNonNegativeInteger" minOccurs="0"/>
  128. <xs:element name="access" type="accessType" minOccurs="0"/>
  129. <xs:element name="resetValue" type="scaledNonNegativeInteger" minOccurs="0"/>
  130. <xs:element name="resetMask" type="scaledNonNegativeInteger" minOccurs="0"/>
  131. </xs:sequence>
  132. </xs:group>
  133. <xs:group name="bitRangeLsbMsbStyle">
  134. <xs:sequence>
  135. <xs:element name="lsb" type="scaledNonNegativeInteger"/>
  136. <xs:element name="msb" type="scaledNonNegativeInteger"/>
  137. </xs:sequence>
  138. </xs:group>
  139. <xs:group name="bitRangeOffsetWidthStyle">
  140. <xs:sequence>
  141. <xs:element name="bitOffset" type="scaledNonNegativeInteger"/>
  142. <xs:element name="bitWidth" type="scaledNonNegativeInteger" minOccurs="0"/>
  143. </xs:sequence>
  144. </xs:group>
  145. <xs:group name="dimElementGroup">
  146. <xs:sequence>
  147. <xs:element name="dim" type="scaledNonNegativeInteger"/>
  148. <xs:element name="dimIncrement" type="scaledNonNegativeInteger"/>
  149. <xs:element name="dimIndex" type="dimIndexType" minOccurs="0"/>
  150. </xs:sequence>
  151. </xs:group>
  152. <xs:element name="device" nillable="true">
  153. <xs:complexType>
  154. <xs:sequence>
  155. <xs:element name="name" type="xs:string"/>
  156. <xs:element name="version" type="xs:string"/>
  157. <xs:element name="description" type="xs:string"/>
  158. <xs:element name="addressUnitBits" type="scaledNonNegativeInteger"/>
  159. <xs:element name="width" type="scaledNonNegativeInteger"/>
  160. <xs:group ref="registerPropertiesGroup" minOccurs="0"/>
  161. <xs:element name="peripherals">
  162. <xs:complexType>
  163. <xs:sequence>
  164. <xs:element name="peripheral" minOccurs="1" maxOccurs="unbounded">
  165. <xs:complexType>
  166. <xs:sequence>
  167. <xs:element name="name" type="xs:Name"/>
  168. <xs:element name="version" type="xs:string" minOccurs="0"/>
  169. <xs:element name="description" type="xs:string" minOccurs="0"/>
  170. <xs:element name="groupName" type="xs:string" minOccurs="0"/>
  171. <xs:element name="prependToName" type="xs:string" minOccurs="0"/>
  172. <xs:element name="appendToName" type="xs:string" minOccurs="0"/>
  173. <xs:element name="disableCondition" type="xs:string" minOccurs="0"/>
  174. <xs:element name="baseAddress" type="scaledNonNegativeInteger"/>
  175. <xs:group ref="registerPropertiesGroup" minOccurs="0"/>
  176. <xs:element name="addressBlock" type="addressBlockType" minOccurs="0" maxOccurs="unbounded"/>
  177. <xs:element name="interrupt" type="interruptType" minOccurs="0" maxOccurs="unbounded"/>
  178. <xs:element name="registers" minOccurs="0" maxOccurs="1">
  179. <xs:complexType>
  180. <xs:sequence>
  181. <xs:element name="register" minOccurs="1" maxOccurs="unbounded">
  182. <xs:complexType>
  183. <xs:sequence>
  184. <xs:group ref="dimElementGroup" minOccurs="0"/>
  185. <xs:element name="name" type="registerNameType"/> <!-- was xs:Name -->
  186. <xs:element name="displayName" type="xs:string" minOccurs="0"/>
  187. <xs:element name="description" type="xs:string" minOccurs="0"/>
  188. <xs:element name="alternateGroup" type="xs:Name" minOccurs="0"/>
  189. <xs:element name="addressOffset" type="scaledNonNegativeInteger"/>
  190. <xs:group ref="registerPropertiesGroup" minOccurs="0"/>
  191. <xs:element name="modifiedWriteValues" type="modifiedWriteValuesType" minOccurs="0"/>
  192. <xs:element name="writeConstraint" type="writeConstraintType" minOccurs="0"/>
  193. <xs:element name="readAction" type="readActionType" minOccurs="0"/>
  194. <xs:element name="fields" minOccurs="0" maxOccurs="1">
  195. <xs:complexType>
  196. <xs:sequence>
  197. <xs:element name="field" minOccurs="1" maxOccurs="unbounded">
  198. <xs:complexType>
  199. <xs:sequence>
  200. <xs:element name="name" type="xs:string"/>
  201. <xs:element name="description" type="xs:string" minOccurs="0"/>
  202. <xs:choice>
  203. <xs:group ref="bitRangeLsbMsbStyle" minOccurs="0"/>
  204. <xs:group ref="bitRangeOffsetWidthStyle" minOccurs="0"/>
  205. <xs:element name="bitRange" type="bitRangeType" minOccurs="0"/>
  206. </xs:choice>
  207. <xs:element name="access" type="accessType" minOccurs="0"/>
  208. <xs:element name="modifiedWriteValues" type="modifiedWriteValuesType" minOccurs="0"/>
  209. <xs:element name="writeConstraint" type="writeConstraintType" minOccurs="0"/>
  210. <xs:element name="readAction" type="readActionType" minOccurs="0"/>
  211. <xs:element name="enumeratedValues" minOccurs="0" maxOccurs="2">
  212. <xs:complexType>
  213. <xs:sequence>
  214. <xs:element name="name" type="xs:Name" minOccurs="0"/>
  215. <xs:element name="usage" type="enumUsageType" minOccurs="0"/>
  216. <xs:element name="enumeratedValue" minOccurs="1" maxOccurs="unbounded">
  217. <xs:complexType>
  218. <xs:sequence>
  219. <xs:element name="name" type="xs:string"/>
  220. <xs:element name="description" type="xs:string" minOccurs="0"/>
  221. <xs:choice>
  222. <xs:element name="value" type="enumeratedValueDataType"/>
  223. <xs:element name="isDefault" type="xs:boolean"/>
  224. </xs:choice>
  225. </xs:sequence>
  226. </xs:complexType>
  227. </xs:element>
  228. </xs:sequence>
  229. <xs:attribute name="derivedFrom" type="xs:Name" use="optional"/>
  230. </xs:complexType>
  231. </xs:element>
  232. </xs:sequence>
  233. <xs:attribute name="derivedFrom" type="xs:Name" use="optional"/>
  234. </xs:complexType>
  235. </xs:element>
  236. </xs:sequence>
  237. </xs:complexType>
  238. </xs:element>
  239. </xs:sequence>
  240. <xs:attribute name="derivedFrom" type="xs:Name" use="optional"/>
  241. </xs:complexType>
  242. </xs:element>
  243. </xs:sequence>
  244. </xs:complexType>
  245. </xs:element>
  246. </xs:sequence>
  247. <xs:attribute name="derivedFrom" type="xs:Name" use="optional"/>
  248. </xs:complexType>
  249. </xs:element>
  250. </xs:sequence>
  251. </xs:complexType>
  252. </xs:element>
  253. <xs:element name="vendorExtensions" minOccurs="0" maxOccurs="1">
  254. <xs:complexType>
  255. <xs:sequence>
  256. <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded">
  257. </xs:any>
  258. </xs:sequence>
  259. </xs:complexType>
  260. </xs:element>
  261. </xs:sequence>
  262. <xs:attribute name="schemaVersion" type="xs:decimal" use="required" fixed="1.0"/>
  263. </xs:complexType>
  264. </xs:element>
  265. </xs:schema>