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
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>/device/peripherals/peripheral/registers element</title>
<title>CMSIS-SVD: /device/peripherals/peripheral/registers element</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 46px;">
<td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">CMSIS-SVD
 <span id="projectnumber">Version 1.3.3</span>
</div>
<div id="projectbrief">CMSIS System View Description</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
<ul class="tablist">
<script type="text/javascript">
<!--
writeComponentTabs.call(this);
//-->
</script>
</ul>
</div>
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="pages.html"><span>Usage and Description</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('elem_registers.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">/device/peripherals/peripheral/registers element </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>All registers of a peripheral are enclosed between the <em><registers></em> opening and closing tags. Clusters define a set of registers. You can either use the <em><cluster></em> or the <em><register></em> element.</p>
<p><b>Example:</b> </p>
<div class="fragment"><div class="line">...</div>
<div class="line"><peripheral></div>
<div class="line"> <registers></div>
<div class="line"> ...</div>
<div class="line"> </registers></div>
<div class="line"></peripheral></div>
<div class="line">...</div>
</div><!-- fragment --><p><a class="anchor" id="elem_registers_sc"></a> <b>/device/peripherals/peripheral/registers</b> </p>
<table class="cmtable" summary="Registers Type Table">
<tr>
<th style="white-space:nowrap">Parent Element </th><th colspan="3">Element Chain </th></tr>
<tr>
<td><a class="el" href="elem_peripherals.html#elem_peripheral">peripheral</a> </td><td colspan="3"><a class="el" href="elem_peripherals.html#elem_peripheral">/device/peripherals/peripheral element</a> </td></tr>
<tr>
<th style="white-space:nowrap">Child Elements </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
<tr class="choice">
<td><a class="el" href="elem_registers.html#elem_cluster">cluster</a> </td><td>Define the sequence of register clusters. </td><td>clusterType </td><td>0..* </td></tr>
<tr class="choice">
<td><a class="el" href="elem_registers.html#elem_register">register</a> </td><td>Define the sequence of registers. </td><td>registerType </td><td>1..* </td></tr>
</table>
<p> </p>
<hr/>
<h1><a class="anchor" id="elem_cluster"></a>
/device/pripherals/peripheral/registers/.../cluster element</h1>
<p><b>Cluster</b> describes a sequence of neighboring registers within a peripheral. A <em><cluster></em> specifies the <em>addressOffset</em> relative to the <em>baseAddress</em> of the grouping element. All <em><register></em> elements within a <em><cluster></em> specify their <em>addressOffset</em> relative to the cluster base address (<em><peripheral.baseAddress></em> + <em><cluster.addressOffset></em>).</p>
<p>Multiple <em><register></em> and <em><cluster></em> sections may occur in any order. Since version 1.3 of the specification, the nesting of <em><cluster></em> elements is supported. Nested clusters express hierarchical structures of registers. It is predominantely targeted at the generation of device header files to create a C-data structure within the peripheral structure instead of a flat list of registers. Note, you can also specify an array of a cluster using the <em><dim></em> element.</p>
<p><a class="anchor" id="elem_cluster_sc"></a><b>/device/pripherals/peripheral/registers/.../cluster</b> </p>
<table class="cmtable" summary="Cluster Level Schema">
<tr>
<th style="white-space:nowrap">Parent Element </th><th colspan="3">Element Chain </th></tr>
<tr>
<td><a class="el" href="elem_registers.html">registers</a> </td><td colspan="3"><a class="el" href="elem_registers.html">/device/peripherals/peripheral/registers element</a> </td></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_cluster">cluster</a> </td><td colspan="3"><a class="el" href="elem_registers.html#elem_cluster">/device/pripherals/peripheral/registers/.../cluster element</a> </td></tr>
<tr>
<th>Attributes </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
<tr>
<td><p class="starttd">derivedFrom</p>
<p class="endtd"></p>
</td><td>Specify the cluster name from which to inherit data. Elements specified subsequently override inherited values. <br/>
<b>Usage:</b><ul>
<li>Always use the full qualifying path, which must start with the peripheral <em><name></em>, when deriving from another scope. (for example, in periperhal <span class="XML-Token">B</span>, derive from <span class="XML-Token">peripheralA.clusterX</span>).</li>
<li>You can use the cluster <em><name></em> when both clusters are in the same scope.</li>
<li>No relative paths will work. <br/>
<b>Remarks:</b> When deriving a cluster, it is mandatory to specify at least the <em><name></em>, the <em><description></em>, and the <em><addressOffset></em>. </li>
</ul>
</td><td>registerType </td><td>0..1 </td></tr>
<tr>
<th>Child Elements </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
<tr class="group1">
<td>  </td><td colspan="3">Refer to <a class="el" href="elem_special.html#dimElementGroup_gr">dimElementGroup</a> for details. </td></tr>
<tr class="group1">
<td>dim </td><td>Define the number of elements in an array of clusters. </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr class="group1">
<td>dimIncrement </td><td>Specify the address increment, in <span class="XML-Token">Bytes</span>, between two neighboring clusters of the cluster array. </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr class="group1">
<td>dimIndex </td><td>Specify the strings that substitute the placeholder <em>[%s]</em> within the cluster <em><name></em>. Use the placeholder <em>%s</em> in <em><name></em> when <em><dimIndex></em> is specified. </td><td>dimIndexType </td><td>0..1 </td></tr>
<tr class="group1">
<td>dimName </td><td>Specify the name of the C-type structure. If not defined, then the entry of the <em><name></em> element is used. </td><td>identifierType </td><td>0..1 </td></tr>
<tr class="group1">
<td><a class="el" href="elem_special.html#elem_dimArrayIndex">dimArrayIndex</a> </td><td>Grouping element to create enumerations in the header file. </td><td>dimArrayIndexType </td><td>0..1 </td></tr>
<tr>
<td>name </td><td>String to identify the cluster. Cluster names are required to be unique within the scope of a peripheral. A list of cluster names can be build using the placeholder <em>%s</em>. Use the placeholder <em>[%s]</em> at the end of the identifier to generate arrays in the header file. The placeholder <em>[%s]</em> cannot be used together with <em><dimIndex></em>. </td><td>dimableIdentifierType </td><td>1..1 </td></tr>
<tr>
<td>description </td><td>String describing the details of the register cluster. </td><td>xs:string </td><td>0..1 </td></tr>
<tr>
<td>alternateCluster </td><td>Specify the name of the original cluster if this cluster provides an alternative description. </td><td>dimableIdentifierType </td><td>0..1 </td></tr>
<tr>
<td>headerStructName </td><td>Specify the struct type name created in the device header file. If not specified, then the name of the cluster is used. </td><td>identifierType </td><td>0..1 </td></tr>
<tr>
<td>addressOffset </td><td>Cluster address relative to the <em><baseAddress></em> of the peripheral. </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr class="group2">
<td>  </td><td colspan="3">Refer to <a class="el" href="elem_special.html#registerPropertiesGroup_gr">registerPropertiesGroup</a> for details. </td></tr>
<tr class="group2">
<td>size </td><td>Define the default bit-width of any device register (implicit inheritance). </td><td>scaledNonNegativeInteger </td><td>0..1 </td></tr>
<tr class="group2">
<td>access </td><td>Define access rights. </td><td>accessType </td><td>0..1 </td></tr>
<tr class="group2">
<td>protection </td><td>Specify the security privilege to access an address region. </td><td>protectionStringType </td><td>0..1 </td></tr>
<tr class="group2">
<td>resetValue </td><td>Define the default value for all registers at RESET. </td><td>scaledNonNegativeInteger </td><td>0..1 </td></tr>
<tr class="group2">
<td>resetMask </td><td>Identify register bits that have a defined reset value. </td><td>scaledNonNegativeInteger </td><td>0..1 </td></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_register">register</a> </td><td>Define a sequence of register within a cluster. </td><td>registerType </td><td>0..* </td></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_cluster">cluster</a> </td><td>Element to nest cluster definitions. </td><td>clusterType </td><td>0..* </td></tr>
</table>
<p> </p>
<hr/>
<h1><a class="anchor" id="elem_register"></a>
/device/peripherals/peripheral/registers/.../register element</h1>
<p>The description of registers is the most essential part of SVD. If the elements <em><size></em>, <em><access></em>, <em><resetValue></em>, and <em><resetMask></em> have not been specified on a higher level, then these elements are mandatory on register level.</p>
<p>A register can represent a single value or can be subdivided into individual bit-fields of specific functionality and semantics. From a schema perspective, the element <em><fields></em> is optional, however, from a specification perspective, <em><fields></em> are mandatory when they are described in the device documentation.</p>
<p>You can define register arrays where the single description gets duplicated automatically. The size of the array is specified by the <em><dim></em> element. Register names get composed by the element <em><name></em> and the index-specific string defined in <em><dimIndex></em>. The element <em><dimIncrement></em> specifies the address offset between two registers.</p>
<p><b>Example:</b> </p>
<div class="fragment"><div class="line">...</div>
<div class="line"><<span class="keyword">register</span>></div>
<div class="line"> <name>TimerCtrl0</name></div>
<div class="line"> <description>Timer Control Register</description></div>
<div class="line"> <addressOffset>0x0</addressOffset></div>
<div class="line"> <access>read-write</access></div>
<div class="line"> <resetValue>0x00008001</resetValue></div>
<div class="line"> <resetMask>0x0000ffff</resetMask></div>
<div class="line"> <size>32</size></div>
<div class="line"></<span class="keyword">register</span>></div>
<div class="line"></div>
<div class="line"><<span class="keyword">register</span> derivedFrom=<span class="stringliteral">"TimerCtrl0"</span>></div>
<div class="line"> <name>TimerCtrl1</name></div>
<div class="line"> <description>Derived Timer</description></div>
<div class="line"> <addressOffset>0x4</addressOffset></div>
<div class="line"></<span class="keyword">register</span>></div>
<div class="line">...</div>
</div><!-- fragment --><p>This example describes two registers, <b>TimerCtrl0</b> and <b>TimerCtrl1</b>. The values defined for <b>TimerCtrl0</b> are inherited by the derived register <b>TimerCtrl1</b>, except for the value in <em><addressOffset></em>.</p>
<p><b>Example:</b> </p>
<div class="fragment"><div class="line">...</div>
<div class="line"><<span class="keyword">register</span>></div>
<div class="line"> <name>TIM_MODEA</name></div>
<div class="line"> <description>In mode A <span class="keyword">this</span> <span class="keyword">register</span> acts as a reload value</description></div>
<div class="line"> <addressOffset>0xC</addressOffset></div>
<div class="line"></<span class="keyword">register</span>></div>
<div class="line"><<span class="keyword">register</span>></div>
<div class="line"> <name>TIM_MODEB</name></div>
<div class="line"> <description>In mode B <span class="keyword">this</span> <span class="keyword">register</span> acts as the compare value</description></div>
<div class="line"> <alternateRegister>TIM_MODEA</alternateRegister></div>
<div class="line"> <addressOffset>0xC</addressOffset></div>
<div class="line"></<span class="keyword">register</span>></div>
<div class="line"><<span class="keyword">register</span>></div>
<div class="line"> <name>DMA_DATA</name></div>
<div class="line"> <description>This <span class="keyword">register</span> contains the address of the data being transferred</description></div>
<div class="line"> <dataType>uint32_t *</dataType></div>
<div class="line"> <addressOffset>0xf0</addressOffset></div>
<div class="line"></<span class="keyword">register</span>></div>
<div class="line">...</div>
</div><!-- fragment --><p>This example describes two registers, <b>TIM_MODEA</b> and <b>TIM_MODEB</b>. Both have the same address offset. Based on the configured operation model being A or B, the register acts as reload or compare value. The register DMA_DATA is specified as a pointer to unsigned word data. The code generated for the device header file is:</p>
<div class="fragment"><div class="line"><span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"> <span class="keyword">union </span>{</div>
<div class="line"> __IO uint32_t TIM_MODEA;</div>
<div class="line"> __IO uint32_t TIM_MODEB;</div>
<div class="line"> };</div>
<div class="line"> __IO uint32_t * DMA_DATA; </div>
<div class="line"> ...</div>
<div class="line">} <peripheral:name>_Type;</div>
</div><!-- fragment --><p><a class="anchor" id="elem_register_sc"></a> <b>/device/peripherals/peripheral/registers/.../register</b> </p>
<table class="cmtable" summary="Register Level Schema">
<tr>
<th style="white-space:nowrap">Parent Element </th><th colspan="3">Element Chain </th></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_cluster">cluster</a> </td><td colspan="3"><a class="el" href="elem_registers.html#elem_cluster">/device/pripherals/peripheral/registers/.../cluster element</a> </td></tr>
<tr>
<td><a class="el" href="elem_registers.html">registers</a> </td><td colspan="3"><a class="el" href="elem_registers.html">/device/peripherals/peripheral/registers element</a> </td></tr>
<tr>
<th>Attributes </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
<tr>
<td><p class="starttd">derivedFrom</p>
<p class="endtd"></p>
</td><td>Specify the register name from which to inherit data. Elements specified subsequently override inherited values. <br/>
<b>Usage:</b><ul>
<li>Always use the full qualifying path, which must start with the peripheral <em><name></em>, when deriving from another scope. (for example, in periperhal <span class="XML-Token">B</span>, derive from <span class="XML-Token">peripheralA.registerX</span>.</li>
<li>You can use the register <em><name></em> only when both registers are in the same scope.</li>
<li>No relative paths will work. <br/>
<b>Remarks:</b> When deriving, it is mandatory to specify at least the <em><name></em>, the <em><description></em>, and the <em><addressOffset></em>. </li>
</ul>
</td><td>xs:Name </td><td>0..1 </td></tr>
<tr>
<th>Child Elements </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
<tr class="group1">
<td>  </td><td colspan="3">Refer to <a class="el" href="elem_special.html#dimElementGroup_gr">dimElementGroup</a> for details. </td></tr>
<tr class="group1">
<td>dim </td><td>Define the number of elements in an array of registers. If <em><dimIncrement></em> is specified, this element becomes mandatory. </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr class="group1">
<td>dimIncrement </td><td>Specify the address increment, in <span class="XML-Token">Bytes</span>, between two neighboring registers. </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr class="group1">
<td>dimIndex </td><td>Specify the substrings that replaces the <em>%s</em> placeholder within <em>name</em> and <em>displayName</em>. By default, the index is a decimal value starting with 0 for the first register. <em>dimIndex</em> should not be used together with the placeholder <em>[%s]</em>, but rather with <em>%s</em>. </td><td>dimIndexType </td><td>0..1 </td></tr>
<tr class="group1">
<td>dimName </td><td>Specify the name of the C-type structure. If not defined, then the entry of the <em><name></em> element is used. </td><td>identifyerType </td><td>0..1 </td></tr>
<tr class="group1">
<td><a class="el" href="elem_special.html#elem_dimArrayIndex">dimArrayIndex</a> </td><td>Grouping element to create enumerations in the header file. </td><td>dimArrayIndexType </td><td>0..1 </td></tr>
<tr>
<td>name </td><td>String to identify the register. Register names are required to be unique within the scope of a peripheral. You can use the placeholder <em>%s</em>, which is replaced by the <em>dimIndex</em> substring. Use the placeholder <em>[%s]</em> only at the end of the identifier to generate arrays in the header file. The placeholder <em>[%s]</em> cannot be used together with <em>dimIndex</em>. </td><td>registerNameType </td><td>1..1 </td></tr>
<tr>
<td>displayName </td><td>When specified, then this string can be used by a graphical frontend to visualize the register. Otherwise the <em>name</em> element is displayed. <em>displayName</em> may contain special characters and white spaces. You can use the placeholder <em>%s</em>, which is replaced by the <em>dimIndex</em> substring. Use the placeholder <em>[%s]</em> only at the end of the identifier. The placeholder <em>[%s]</em> cannot be used together with <em>dimIndex</em>. </td><td>xs:string </td><td>0..1 </td></tr>
<tr>
<td>description </td><td>String describing the details of the register. </td><td>xs:string </td><td>0..1 </td></tr>
<tr>
<td>alternateGroup </td><td>Specifies a group name associated with all alternate register that have the same name. At the same time, it indicates that there is a register definition allocating the same absolute address in the address space. </td><td>xs:Name </td><td>0..1 </td></tr>
<tr>
<td>alternateRegister </td><td>This tag can reference a register that has been defined above to current location in the description and that describes the memory location already. This tells the SVDConv's address checker that the redefinition of this particular register is intentional. The register name needs to be unique within the scope of the current peripheral. A register description is defined either for a unique address location or could be a redefinition of an already described address. In the latter case, the register can be either marked <em>alternateRegister</em> and needs to have a unique name, or it can have the same register name but is assigned to a register subgroup through the tag <em>alternateGroup</em> (specified in version 1.0). </td><td>identifierType </td><td>0..1 </td></tr>
<tr>
<td>addressOffset </td><td>Define the address offset relative to the enclosing element. </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr class="group2">
<td>  </td><td colspan="3" style="white-space:pre-wrap;">Refer to <a class="el" href="elem_special.html#registerPropertiesGroup_gr">registerPropertiesGroup</a> for details about the colored elements. </td></tr>
<tr class="group2">
<td>size </td><td>Defines the default bit-width of any register contained in the device (implicit inheritance). </td><td>scaledNonNegativeInteger </td><td>0..1 </td></tr>
<tr class="group2">
<td>access </td><td>Defines the default access rights for all registers. </td><td>accessType </td><td>0..1 </td></tr>
<tr class="group2">
<td>protection </td><td>Defines the protection rights for all registers. </td><td>protectionStringType </td><td>0..1 </td></tr>
<tr class="group2">
<td>resetValue </td><td>Defines the default value for all registers at RESET. </td><td>scaledNonNegativeInteger </td><td>0..1 </td></tr>
<tr class="group2">
<td>resetMask </td><td>Identifies which register bits have a defined reset value. </td><td>scaledNonNegativeInteger </td><td>0..1 </td></tr>
<tr>
<td>dataType </td><td>It can be useful to assign a specific native C datatype to a register. This helps avoiding type casts. For example, if a 32 bit register shall act as a pointer to a 32 bit unsigned data item, then <em>dataType</em> can be set to "uint32_t *". The following simple data types are predefined:<ul>
<li><span class="XML-Token">uint8_t</span>: unsigned byte</li>
<li><span class="XML-Token">uint16_t</span>: unsigned half word</li>
<li><span class="XML-Token">uint32_t</span>: unsigned word</li>
<li><span class="XML-Token">uint64_t</span>: unsigned double word</li>
<li><span class="XML-Token">int8_t</span>: signed byte</li>
<li><span class="XML-Token">int16_t</span>: signed half word</li>
<li><span class="XML-Token">int32_t</span>: signed world</li>
<li><span class="XML-Token">int64_t</span>: signed double word</li>
<li><span class="XML-Token">uint8_t *</span>: pointer to unsigned byte</li>
<li><span class="XML-Token">uint16_t *</span>: pointer to unsigned half word</li>
<li><span class="XML-Token">uint32_t *</span>: pointer to unsigned word</li>
<li><span class="XML-Token">uint64_t *</span>: pointer to unsigned double word</li>
<li><span class="XML-Token">int8_t *</span>: pointer to signed byte</li>
<li><span class="XML-Token">int16_t *</span>: pointer to signed half word</li>
<li><span class="XML-Token">int32_t *</span>: pointer to signed world</li>
<li><span class="XML-Token">int64_t *</span>: pointer to signed double word </li>
</ul>
</td><td>dataTypeType </td><td>0..1 </td></tr>
<tr>
<td>modifiedWriteValues </td><td>Element to describe the manipulation of data written to a register. If not specified, the value written to the field is the value stored in the field. The other options define bitwise operations: <ul>
<li><span class="XML-Token">oneToClear</span>: write data bits of one shall clear (set to zero) the corresponding bit in the register. </li>
<li><span class="XML-Token">oneToSet</span>: write data bits of one shall set (set to one) the corresponding bit in the register. </li>
<li><span class="XML-Token">oneToToggle</span>: write data bits of one shall toggle (invert) the corresponding bit in the register. </li>
<li><span class="XML-Token">zeroToClear</span>: write data bits of zero shall clear (set to zero) the corresponding bit in the register. </li>
<li><span class="XML-Token">zeroToSet</span>: write data bits of zero shall set (set to one) the corresponding bit in the register. </li>
<li><span class="XML-Token">zeroToToggle</span>: write data bits of zero shall toggle (invert) the corresponding bit in the register. </li>
<li><span class="XML-Token">clear</span>: after a write operation all bits in the field are cleared (set to zero). </li>
<li><span class="XML-Token">set</span>: after a write operation all bits in the field are set (set to one). </li>
<li><span class="XML-Token">modify</span>: after a write operation all bit in the field may be modified (default). </li>
</ul>
</td><td>modifiedWriteValuesType </td><td>0..1 </td></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_writeConstraint">writeConstraint</a> </td><td>Three mutually exclusive options exist to set write-constraints. </td><td>writeConstraintType </td><td>0..1 </td></tr>
<tr>
<td>readAction </td><td>If set, it specifies the side effect following a read operation. If not set, the register is not modified. The defined side effects are: <ul>
<li><span class="XML-Token">clear</span>: The register is cleared (set to zero) following a read operation. </li>
<li><span class="XML-Token">set</span>: The register is set (set to ones) following a read operation. </li>
<li><span class="XML-Token">modify</span>: The register is modified in some way after a read operation. </li>
<li><span class="XML-Token">modifyExternal</span>: One or more dependent resources other than the current register are immediately affected by a read operation (it is recommended that the register description specifies these dependencies).</li>
</ul>
Debuggers are not expected to read this register location unless explicitly instructed by the user. </td><td>readActionType </td><td>0..1 </td></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_fields">fields</a> </td><td>In case a register is subdivided into bit fields, it should be reflected in the SVD description file to create bit-access macros and bit-field structures in the header file. </td><td>fieldsType </td><td>0..1 </td></tr>
</table>
<p> </p>
<hr/>
<h1><a class="anchor" id="elem_writeConstraint"></a>
/device/peripherals/peripheral/registers/.../register/.../writeConstraint element</h1>
<p>Define constraints for writing values to a field. You can choose between three options, which are mutualy exclusive.</p>
<p><b>Example:</b> </p>
<div class="fragment"><div class="line"><<span class="keyword">register</span>></div>
<div class="line"> ...</div>
<div class="line"> <writeConstraint></div>
<div class="line"> <useEnumeratedValues><span class="keyword">true</span></useEnumeratedValues></div>
<div class="line"> </writeConstraint></div>
<div class="line"> ...</div>
<div class="line"> <field></div>
<div class="line"> <name>F_ONE</name></div>
<div class="line"> ...</div>
<div class="line"> <writeConstraint></div>
<div class="line"> <range></div>
<div class="line"> <minimum>2</minimum></div>
<div class="line"> <maximum>4</maximum></div>
<div class="line"> </range></div>
<div class="line"> </writeConstraint></div>
<div class="line"> ...</div>
<div class="line"> <field></div>
<div class="line"> <field></div>
<div class="line"> <name>F_TWO</name></div>
<div class="line"> ...</div>
<div class="line"> <writeConstraint></div>
<div class="line"> <writeAsRead><span class="keyword">true</span></writeAsRead></div>
<div class="line"> </writeConstraint></div>
<div class="line"> ...</div>
<div class="line"> <field></div>
<div class="line"> <field></div>
<div class="line"> <name>F_N</name></div>
<div class="line"> ...</div>
<div class="line"> <field></div>
<div class="line"> ... </div>
<div class="line"><<span class="keyword">register</span>> </div>
</div><!-- fragment --><p>The example shows write constraints defined on different levels. The write constrains on <em><register></em> level are propagated as default to all subsequent fields, especially to field <b>F_N</b>. Field <b>F_ONE</b> overwrites the default and sets the write range between <span class="XML-Token">2..4</span>. Other values cannot be written to this field. Field <b>F_TWO</b> overwrites the default and allows to write only the last read value.</p>
<p><a class="anchor" id="elem_writeConstraint_sc"></a><b>/device/peripherals/peripheral/registers/.../register/.../writeConstraint</b> </p>
<table class="cmtable" summary="Write Constraints table">
<tr>
<th style="white-space:nowrap">Parent Element </th><th colspan="3">Element Chain </th></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_register">register</a> </td><td colspan="3"><a class="el" href="elem_registers.html#elem_register">/device/peripherals/peripheral/registers/.../register element</a> </td></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_field">field</a> </td><td colspan="3"><a class="el" href="elem_registers.html#elem_field">/device/peripherals/peripheral/registers/.../fields/field element</a> </td></tr>
<tr>
<th>Child Elements </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
<tr class="choice">
<td>writeAsRead </td><td>If <span class="XML-Token">true</span>, only the last read value can be written. </td><td>xs:boolean </td><td>0..1 </td></tr>
<tr class="choice">
<td>useEnumeratedValues </td><td>If <span class="XML-Token">true</span>, only the values listed in the <a class="el" href="elem_registers.html#elem_enumeratedValues">enumeratedValues</a> list can be written. </td><td>xs:boolean </td><td>0..1 </td></tr>
<tr class="choice">
<td>range </td><td>Contains the following two elements: </td><td>  </td><td>0..1 </td></tr>
<tr class="choice">
<td align="right">minimum </td><td>Specify the smallest number to be written to the field. </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr class="choice">
<td align="right">maximum </td><td>Specify the largest number to be written to the field. </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
</table>
<p> </p>
<hr/>
<h1><a class="anchor" id="elem_fields"></a>
/device/peripherals/peripheral/registers/.../register/fields element</h1>
<p>Grouping element to define bit-field properties of a register.</p>
<p><b>Example:</b> </p>
<div class="fragment"><div class="line">...</div>
<div class="line"><fields></div>
<div class="line"> ...</div>
<div class="line"> <field></div>
<div class="line"> <name>TimerCtrl0_IntSel</name></div>
<div class="line"> <description>Select interrupt line that is triggered by timer overflow.</description></div>
<div class="line"> <bitOffset>1</bitOffset></div>
<div class="line"> <bitWidth>3</bitWidth></div>
<div class="line"> <access>read-write</access></div>
<div class="line"> <resetValue>0x0</resetValue></div>
<div class="line"> <modifiedWriteValues>oneToSet</modifiedWriteValues></div>
<div class="line"> <writeConstraint></div>
<div class="line"> <range></div>
<div class="line"> <minimum>0</minimum></div>
<div class="line"> <maximum>5</maximum></div>
<div class="line"> </range></div>
<div class="line"> </writeConstraint></div>
<div class="line"> <readAction>clear</readAction></div>
<div class="line"> <field></div>
<div class="line"> ...</div>
<div class="line"> <field></div>
<div class="line"> <name>BIT1</name> </div>
<div class="line"> <description>test</description></div>
<div class="line"> <bitRange>[7:0]</bitRange> </div>
<div class="line"> <access>read-write</access></div>
<div class="line"> </field></div>
<div class="line"> ... </div>
<div class="line"></fields></div>
<div class="line">...</div>
</div><!-- fragment --><p>The example creates two bit-files <b>TimerCtrl0_IntSel</b> and <b>BIT1</b>. The bit-field <b>TimerCtrl0_IntSel</b> has an bit offset of <span class="XML-Token">1</span> and a depth of <span class="XML-Token">3</span> bits, with unrestricted read and write access, a reset value of <span class="XML-Token">0</span> and a write constraint of <span class="XML-Token">oneToSet</span>, which means that only the written bit is changed. The value allowed to be written to the field range between <span class="XML-Token">0-5</span>. After a read operation, all bits are set to <span class="XML-Token">zero</span>.</p>
<p>The bit-field <b>BIT1</b>, described as a test field, has the size of <span class="XML-Token">8</span> bits and can be unlimited read and written.</p>
<p><a class="anchor" id="elem_fields_sc"></a> <b>/device/peripherals/peripheral/registers/.../register/fields</b> </p>
<table class="cmtable" summary="Fields Level Schema">
<tr>
<th style="white-space:nowrap">Parent Element </th><th colspan="3">Element Chain </th></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_register">register</a> </td><td colspan="3"><a class="el" href="elem_registers.html#elem_register">/device/peripherals/peripheral/registers/.../register element</a> </td></tr>
<tr>
<th>Child Elements </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_field">field</a> </td><td>Define the bit-field properties of a register. </td><td>fieldType </td><td>1..* </td></tr>
</table>
<p> </p>
<hr/>
<h1><a class="anchor" id="elem_field"></a>
/device/peripherals/peripheral/registers/.../fields/field element</h1>
<p>All fields of a register are enclosed between the <em><fields></em> opening and closing tags.</p>
<p>A bit-field has a name that is unique within the register. The position and size within the register can be decsribed in two ways:</p>
<ul>
<li>by the combination of the least significant bit's position (lsb) and the most significant bit's position (msb), or</li>
<li>the lsb and the bit-width of the field.</li>
</ul>
<p>A field may define an <em>enumeratedValue</em> in order to make the display more intuitive to read.</p>
<p><a class="anchor" id="elem_field_sc"></a> <b>/device/peripherals/peripheral/registers/.../fields/field</b> </p>
<table class="cmtable" summary="Field Level Schema">
<tr>
<th style="white-space:nowrap">Parent Element </th><th colspan="3">Element Chain </th></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_fields">fields</a> </td><td colspan="3"><a class="el" href="elem_registers.html#elem_fields">/device/peripherals/peripheral/registers/.../register/fields element</a> </td></tr>
<tr>
<th>Attributes </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
<tr>
<td>derivedFrom </td><td>Specify the field name from which to inherit data. Elements specified subsequently override inherited values. <br/>
<b>Usage:</b><ul>
<li>Always use the full qualifying path, which must start with the peripheral <em><name></em>, when deriving from another scope. (for example, in periperhal <span class="XML-Token">A</span> and <span class="XML-Token">registerX</span>, derive from <span class="XML-Token">peripheralA.registerYY.fieldYY</span>.</li>
<li>You can use the field <em><name></em> only when both fields are in the same scope.</li>
<li>No relative paths will work. <br/>
<b>Remarks:</b> When deriving, it is mandatory to specify at least the <em><name></em> and <em><description></em>. </li>
</ul>
</td><td>xs:Name </td><td>0..1 </td></tr>
<tr>
<th>Child Elements </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
<tr class="group1">
<td>  </td><td colspan="3">Refer to <a class="el" href="elem_special.html#dimElementGroup_gr">dimElementGroup</a> for details. </td></tr>
<tr class="group1">
<td>dim </td><td>Defines the number of elements in a list. </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr class="group1">
<td>dimIncrement </td><td>Specify the address increment, in <span class="XML-Token">bits</span>, between two neighboring list members in the address map. </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr class="group1">
<td>dimIndex </td><td>Specify the strings that substitue the placeholder <em>%s</em> within <em><name></em> and <em><displayName></em>. </td><td>dimIndexType </td><td>0..1 </td></tr>
<tr class="group1">
<td>dimName </td><td>Specify the name of the C-type structure. If not defined, then the entry in the <em><name></em> element is used. </td><td>identifierType </td><td>0..1 </td></tr>
<tr class="group1">
<td><a class="el" href="elem_special.html#elem_dimArrayIndex">dimArrayIndex</a> </td><td>Grouping element to create enumerations in the header file. </td><td>dimArrayIndexType </td><td>0..1 </td></tr>
<tr>
<td>name </td><td>Name string used to identify the field. Field names must be unique within a register. </td><td>dimableIdentifierType </td><td>1..1 </td></tr>
<tr>
<td>description </td><td>String describing the details of the register. </td><td>stringType </td><td>0..1 </td></tr>
<tr class="choice">
<td><em>Choice of</em> </td><td colspan="2">Three mutually exclusive options exist to describe the bit-range: </td><td>1..1 </td></tr>
<tr class="choice">
<td colspan="4"><em>1. bitRangeLsbMsbStyle</em> </td></tr>
<tr class="choice">
<td align="right">bitOffset </td><td>Value defining the position of the least significant bit of the field within the register. </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr class="choice">
<td align="right">bitWidth </td><td>Value defining the bit-width of the bitfield within the register. </td><td>scaledNonNegativeInteger </td><td>0..1 </td></tr>
<tr class="choice">
<td colspan="4"><em>2. bitRangeOffsetWidthStyle</em> </td></tr>
<tr class="choice">
<td align="right">lsb </td><td>Value defining the bit position of the least significant bit within the register. </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr class="choice">
<td align="right">msb </td><td>Value defining the bit position of the most significant bit within the register. </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr class="choice">
<td colspan="4"><em>3. bitRangePattern</em> </td></tr>
<tr class="choice">
<td align="right">bitRange </td><td>A string in the format: "[<msb>:<lsb>]" </td><td>bitRangeType </td><td>0..1 </td></tr>
<tr>
<td><a class="el" href="elem_special.html#elem_access">access</a> </td><td>Predefined strings set the access type. The element can be omitted if access rights get inherited from parent elements. </td><td>accessType </td><td>0..1 </td></tr>
<tr>
<td>modifiedWriteValues </td><td>Describe the manipulation of data written to a field. If not specified, the value written to the field is the value stored in the field. The other options are bitwise operations: <ul>
<li><span class="XML-Token">oneToClear</span>: write data bit of one shall clear (set to zero) the corresponding bit in the field. </li>
<li><span class="XML-Token">oneToSet</span>: write data bit of one shall set (set to one) the corresponding bit in the field. </li>
<li><span class="XML-Token">oneToToggle</span>: write data bit of one shall toggle (invert) the corresponding bit in the field. </li>
<li><span class="XML-Token">zeroToClear</span>: write data bit of zero shall clear (set to zero) the corresponding bit in the field. </li>
<li><span class="XML-Token">zeroToSet</span>: write data bit of zero shall set (set to one) the corresponding bit in the field. </li>
<li><span class="XML-Token">zeroToToggle</span>: write data bit of zero shall toggle (invert) the corresponding bit in the field. </li>
<li><span class="XML-Token">clear</span>: after a write operation all bits in the field are cleared (set to zero). </li>
<li><span class="XML-Token">set</span>: after a write operation all bits in the field are set (set to one). </li>
<li><span class="XML-Token">modify</span>: after a write operation all bit in the field may be modified (default). </li>
</ul>
</td><td>modifiedWriteValuesType </td><td>0..1 </td></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_writeConstraint">writeConstraint</a> </td><td>Three mutually exclusive options exist to set write-constraints. </td><td>writeConstraintType </td><td>0..1 </td></tr>
<tr>
<td>readAction </td><td>If set, it specifies the side effect following a read operation. If not set, the field is not modified after a read. The defined side effects are: <ul>
<li><span class="XML-Token">clear</span>: The field is cleared (set to zero) following a read operation. </li>
<li><span class="XML-Token">set</span>: The field is set (set to ones) following a read operation. </li>
<li><span class="XML-Token">modify</span>: The field is modified in some way after a read operation. </li>
<li><span class="XML-Token">modifyExternal</span>: One or more dependent resources other than the current field are immediately affected by a read operation (it is recommended that the field description specifies these dependencies).</li>
</ul>
Debuggers are not expected to read this field location unless explicitly instructed by the user. </td><td>readActionType </td><td>0..1 register </td></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_enumeratedValues">enumeratedValues</a> </td><td>Next lower level of description. </td><td>enumerationType </td><td>0..2 </td></tr>
</table>
<p> </p>
<hr/>
<h1><a class="anchor" id="elem_enumeratedValues"></a>
/device/peripherals/peripheral/registers/.../field/enumeratedValues element</h1>
<p>The concept of enumerated values creates a map between unsigned integers and an identifier string. In addition, a description string can be associated with each entry in the map.</p>
<pre>
0 <-> disabled -> "The clock source clk0 is turned off."
1 <-> enabled -> "The clock source clk1 is running."
2 <-> reserved -> "Reserved values. Do not use."
3 <-> reserved -> "Reserved values. Do not use."
</pre><p>This information generates an <em>enum</em> in the device header file. The debugger may use this information to display the identifier string as well as the description. Just like symbolic constants making source code more readable, the system view in the debugger becomes more instructive. The detailed description can provide reference manual level details within the debugger.</p>
<p><b>Example:</b> </p>
<div class="fragment"><div class="line"><enumeratedValues></div>
<div class="line"></div>
<div class="line"> <name>TimerIntSelect</name></div>
<div class="line"> <usage>read-write</usage></div>
<div class="line"></div>
<div class="line"> <enumeratedValue></div>
<div class="line"> <name>disabled</name></div>
<div class="line"> <description>The clock source clk0 is turned off.</description></div>
<div class="line"> <value>0</value></div>
<div class="line"> </enumeratedValue></div>
<div class="line"></div>
<div class="line"> <enumeratedValue></div>
<div class="line"> <name>enabled</name></div>
<div class="line"> <description>The clock source clk1 is running.</description></div>
<div class="line"> <value>1</value></div>
<div class="line"> </enumeratedValue></div>
<div class="line"></div>
<div class="line"> <enumeratedValue></div>
<div class="line"> <name>reserved</name></div>
<div class="line"> <description>Reserved values. Do not use.</description></div>
<div class="line"> <isDefault><span class="keyword">true</span></isDefault></div>
<div class="line"> </enumeratedValue></div>
<div class="line"></div>
<div class="line"></enumeratedValues></div>
</div><!-- fragment --><p><a class="anchor" id="elem_enumeratedValues_sc"></a><b>/device/peripherals/peripheral/registers/.../field/enumeratedValues</b> </p>
<table class="cmtable" summary="Enumerated Values Level Schema">
<tr>
<th style="white-space:nowrap">Parent Element </th><th colspan="3">Element Chain </th></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_field">field</a> </td><td colspan="3"><a class="el" href="elem_registers.html#elem_field">/device/peripherals/peripheral/registers/.../fields/field element</a> </td></tr>
<tr>
<th>Attributes </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
<tr>
<td>derivedFrom </td><td>Makes a copy from a previously defined <em>enumeratedValues</em> section. No modifications are allowed. An <em>enumeratedValues</em> entry is referenced by its name. If the name is not unique throughout the description, it needs to be further qualified by specifying the associated field, register, and peripheral as required. For example: <pre>
field: clk.dis_en_enum
register + field: ctrl.clk.dis_en_enum
peripheral + register + field: timer0.ctrl.clk.dis_en_enum
</pre> </td><td>xs:Name </td><td>0..1 </td></tr>
<tr>
<th>Child Elements </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
<tr>
<td>name </td><td>Identifier for the whole enumeration section. </td><td>xs:Name </td><td>0..1 </td></tr>
<tr>
<td>headerEnumName </td><td>Identifier for the enumeration section. Overwrites the hierarchical enumeration type in the device header file. User is responsible for uniqueness across description. </td><td>identifierType </td><td>0..1 </td></tr>
<tr>
<td>usage </td><td>Possible values are <span class="XML-Token">read<em>,</em> write<em>, or</em> read-write</span>. This allows specifying two different enumerated values depending whether it is to be used for a read or a write access. If not specified, the default value <span class="XML-Token">read-write</span> is used. </td><td>enumUsageType </td><td>0..1 </td></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_enumeratedValue">enumeratedValue</a> </td><td>Describes a single entry in the enumeration. The number of required items depends on the bit-width of the associated field. </td><td>enumeratedValueType </td><td>1..* </td></tr>
</table>
<p> </p>
<hr/>
<h1><a class="anchor" id="elem_enumeratedValue"></a>
/device/peripherals/peripheral/registers/.../enumeratedValue element</h1>
<p>An <em>enumeratedValue</em> defines a map between an unsigned integer and a string.</p>
<p><a class="anchor" id="elem_enumeratedValue_sc"></a><b>/device/peripherals/peripheral/registers/.../enumeratedValue</b> </p>
<table class="cmtable" summary="Enumerated Value">
<tr>
<th style="white-space:nowrap">Parent Element </th><th colspan="3">Element Chain </th></tr>
<tr>
<td><a class="el" href="elem_registers.html#elem_enumeratedValues">enumeratedValues</a> </td><td colspan="3"><a class="el" href="elem_registers.html#elem_enumeratedValues">/device/peripherals/peripheral/registers/.../field/enumeratedValues element</a> </td></tr>
<tr>
<td><a class="el" href="elem_special.html#elem_dimArrayIndex">dimArrayIndex</a> </td><td colspan="3"><a class="el" href="elem_special.html#elem_dimArrayIndex">/device/peripherals/peripheral/.../dimArrayIndex element</a> </td></tr>
<tr>
<th>Child Elements </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
<tr>
<td>name </td><td>String describing the semantics of the value. Can be displayed instead of the value. </td><td>identifierType </td><td>0..1 </td></tr>
<tr>
<td>description </td><td>Extended string describing the value. </td><td>xs:string </td><td>0..1 </td></tr>
<tr class="choice">
<td colspan="3"><em>choice of</em> </td><td>1..1 </td></tr>
<tr class="choice">
<td align="right">value </td><td>Defines the constant for the bit-field as decimal, hexadecimal (0x...) or binary (0b... or #...) number. E.g.: <pre>
<value>15</value>
<value>0xf</value>
<value>0b1111</value>
<value>#1111</value>
</pre> In addition the binary format supports <em>'do not care'</em> bits represented by <b><span class="XML-Token">x</span></b>. E.g. specifying value 14 and 15 as: <pre>
<value>0b111x</value>
<value>#111x</value>
</pre> </td><td style="white-space:nowrap">scaledNonNegativeInteger </td><td>0..1 </td></tr>
<tr class="choice">
<td align="right">isDefault </td><td>Defines the name and description for all other values that are not listed explicitly. </td><td>xs:boolean </td><td>0..1 </td></tr>
</table>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="svd_Format_pg.html">SVD Description (*.svd) Format</a></li>
<li class="footer">Generated on Wed Aug 1 2018 17:12:47 for CMSIS-SVD by Arm Ltd. All rights reserved.
<!--
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6
-->
</li>
</ul>
</div>
</body>
</html>
|