aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gencfg/schema/hal/stm32f4xx/Copy of stm32f4xx_adc_cfg.xsd
blob: ff700b621e9d75dd6d061b7525c273e746de94ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="qualified"
  xmlns:xs="http://www.w3.org/2001/XMLSchema">

  <xs:include schemaLocation="../abstract_adc_cfg.xsd" />

  <xs:complexType name="STM32F4AdcCfgType">
    <xs:complexContent>
      <xs:extension base="AbstractAdcCfgType">
        <xs:sequence>
          <xs:element name="groups" minOccurs="1" maxOccurs="1">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="group" maxOccurs="unbounded"
                  minOccurs="1" type="STM32F4xxAdcGroupCfgType"></xs:element>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

  <xs:complexType name="STM32F4xxAdcChannelType">
    <xs:attribute name="sample" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="ADC_SAMPLE_3"></xs:enumeration>
          <xs:enumeration value="ADC_SAMPLE_15"></xs:enumeration>
          <xs:enumeration value="ADC_SAMPLE_28"></xs:enumeration>
          <xs:enumeration value="ADC_SAMPLE_56"></xs:enumeration>
          <xs:enumeration value="ADC_SAMPLE_84"></xs:enumeration>
          <xs:enumeration value="ADC_SAMPLE_112"></xs:enumeration>
          <xs:enumeration value="ADC_SAMPLE_144"></xs:enumeration>
          <xs:enumeration value="ADC_SAMPLE_480"></xs:enumeration>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>

  <xs:complexType name="STM32F4xxAdcGroupCfgType">
    <xs:complexContent>
      <xs:extension base="DocumentedItem">

        <xs:sequence>

      <xs:element name="sample_time" maxOccurs="1" minOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="IN0" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="IN1" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="IN2" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="IN3" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="IN4" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="IN5" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="IN6" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="IN7" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="IN8" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="IN9" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="IN10" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="IN11" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="IN12" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="IN13" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="IN14" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="IN15" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="SENSOR" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="VREFINT" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
            <xs:element name="VBAT" type="STM32F4xxAdcChannelType"
              maxOccurs="1" minOccurs="1">
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="channels_sequence" maxOccurs="1"
        minOccurs="1">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="channel" maxOccurs="unbounded"
              minOccurs="1">
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="ADC_CHANNEL_IN0"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_IN1"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_IN2"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_IN3"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_IN4"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_IN5"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_IN6"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_IN7"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_IN8"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_IN9"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_IN10"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_IN11"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_IN12"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_IN13"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_IN14"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_IN15"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_SENSOR"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_VREFINT"></xs:enumeration>
                  <xs:enumeration value="ADC_CHANNEL_VBAT"></xs:enumeration>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>

        </xs:sequence>
        <xs:attribute name="alignment" use="required">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="0 Samples are Right Aligned"></xs:enumeration>
              <xs:enumeration value="1 Samples are Left Aligned"></xs:enumeration>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>

        <xs:attribute name="resolution" use="required">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="0 Resolution 12 bits"></xs:enumeration>
              <xs:enumeration value="1 Resolution 10 bits"></xs:enumeration>
              <xs:enumeration value="2 Resolution 8 bits"></xs:enumeration>
              <xs:enumeration value="3 Resolution 6 bits"></xs:enumeration>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>

        <xs:attribute name="trigger_mode" use="required">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="0 Software"></xs:enumeration>
              <xs:enumeration value="1 Rising Edge"></xs:enumeration>
              <xs:enumeration value="2 Falling Edge"></xs:enumeration>
              <xs:enumeration value="3 Both Edges"></xs:enumeration>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>

        <xs:attribute name="trigger_source" use="required">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="0 Timer 1 CC1 event"></xs:enumeration>
              <xs:enumeration value="1 Timer 1 CC2 event"></xs:enumeration>
              <xs:enumeration value="2 Timer 1 CC3 event"></xs:enumeration>
              <xs:enumeration value="3 Timer 2 CC2 event"></xs:enumeration>
              <xs:enumeration value="4 Timer 2 CC3 event"></xs:enumeration>
              <xs:enumeration value="5 Timer 2 CC4 event"></xs:enumeration>
              <xs:enumeration value="6 Timer 2 TRGO event"></xs:enumeration>
              <xs:enumeration value="7 Timer 3 CC1 event"></xs:enumeration>
              <xs:enumeration value="8 Timer 3 TRGO event"></xs:enumeration>
              <xs:enumeration value="9 Timer 4 CC4 event"></xs:enumeration>
              <xs:enumeration value="10 Timer 5 CC1 event"></xs:enumeration>
              <xs:enumeration value="11 Timer 5 CC2 event"></xs:enumeration>
              <xs:enumeration value="12 Timer 5 CC3 event"></xs:enumeration>
              <xs:enumeration value="13 Timer 8 CC1 event"></xs:enumeration>
              <xs:enumeration value="14 Timer 8 CC4 event"></xs:enumeration>
              <xs:enumeration value="15 EXTI line15"></xs:enumeration>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>

        <xs:attribute name="discontinuous_mode" type="xs:boolean"
          use="required">
        </xs:attribute>

        <xs:attribute name="discontinuous_number" use="required">
          <xs:simpleType>
            <xs:restriction base="xs:int">

              <xs:minInclusive value="1"></xs:minInclusive>

              <xs:maxInclusive value="8"></xs:maxInclusive>
              <xs:whiteSpace value="collapse"></xs:whiteSpace>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>


      </xs:extension>
    </xs:complexContent>
  </xs:complexType>

</xs:schema>