xmclib/CMSIS/Documentation/SVD/html/elem_peripherals.html

302 lines
19 KiB
HTML
Raw Normal View History

2024-10-17 17:09:59 +02:00
<!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 element</title>
<title>CMSIS-SVD: /device/peripherals 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
&#160;<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&#160;Page</span></a></li>
<li class="current"><a href="pages.html"><span>Usage&#160;and&#160;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_peripherals.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">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</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 element </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>All peripherals of a device are enclosed within the tag <em>&lt;peripherals&gt;</em>.</p>
<p><b>Example:</b> </p>
<div class="fragment"><div class="line">&lt;device&gt;</div>
<div class="line"> ...</div>
<div class="line"> &lt;peripherals&gt;</div>
<div class="line"> ...</div>
<div class="line"> &lt;/peripherals&gt;</div>
<div class="line">&lt;device&gt;</div>
</div><!-- fragment --><p><a class="anchor" id="elem_peripherals_sc"></a> <b>/device/peripherals</b> </p>
<table class="cmtable" summary="Peripherals Level">
<tr>
<th style="white-space:nowrap">Parent Element </th><th colspan="3">Element Chain </th></tr>
<tr>
<td><a class="el" href="elem_device.html">device</a> </td><td colspan="3"><a class="el" href="elem_device.html">/device element</a> </td></tr>
<tr>
<th style="white-space:nowrap">Child Elements </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
<tr>
<td><a class="el" href="elem_peripherals.html#elem_peripheral">peripheral</a> </td><td>Define the sequence of peripherals. </td><td>peripheralType </td><td>1..* </td></tr>
</table>
<p>&#160;</p>
<hr/>
<h1><a class="anchor" id="elem_peripheral"></a>
/device/peripherals/peripheral element</h1>
<p>At least one peripheral has to be defined.</p>
<ul>
<li>Each peripheral describes all registers belonging to that peripheral.</li>
<li>The address range allocated by a peripheral is defined through one or more address blocks.</li>
<li>An address block and register addresses are specified relative to the base address of a peripheral. The address block information can be used for constructing a memory map for the device peripherals.</li>
</ul>
<p>Starting version 1.3 of the SVD specification, arrays of peripherals can be specified. The single peripheral description gets duplicated automatically into an array. The number of array elements is specified by the <em>&lt;dim&gt;</em> element. To define arrays, the <em>&lt;name&gt;</em> needs the format <em>myPeripheral[%s]</em>. The tag <em>&lt;dimIncrement&gt;</em> specifies the address offset between two peripherals. To create copies of a peripheral using different names, you must use the <em>derivedFrom</em> attribute.</p>
<dl class="section remark"><dt>Remarks</dt><dd>The memory map does not contain any information about physical memory. The memory of a device is described as part of the CMSIS-PACK device description.</dd></dl>
<p><b>Example:</b> </p>
<div class="fragment"><div class="line">&lt;peripherals&gt;</div>
<div class="line"> &lt;peripheral&gt;</div>
<div class="line"> &lt;name&gt;Timer1&lt;/name&gt;</div>
<div class="line"> &lt;version&gt;1.0&lt;/version&gt;</div>
<div class="line"> &lt;description&gt;Timer 1 is a standard timer ... &lt;/description&gt;</div>
<div class="line"> &lt;baseAddress&gt;0x40002000&lt;/baseAddress&gt;</div>
<div class="line"> &lt;addressBlock&gt;</div>
<div class="line"> &lt;offset&gt;0x0&lt;/offset&gt;</div>
<div class="line"> &lt;size&gt;0x400&lt;/size&gt;</div>
<div class="line"> &lt;usage&gt;registers&lt;/usage&gt;</div>
<div class="line"> &lt;protection&gt;s&lt;/protection&gt;</div>
<div class="line"> &lt;/addressBlock&gt;</div>
<div class="line"> &lt;interrupt&gt;&lt;name&gt;TIM0_INT&lt;/name&gt;&lt;value&gt;34&lt;/value&gt;&lt;/interrupt&gt;</div>
<div class="line"> &lt;registers&gt;</div>
<div class="line"> ...</div>
<div class="line"> &lt;/registers&gt;</div>
<div class="line"> &lt;/peripheral&gt;</div>
<div class="line"></div>
<div class="line"> &lt;peripheral&gt;</div>
<div class="line"> &lt;name&gt;Timer1_Alt&lt;/name&gt;</div>
<div class="line"> &lt;version&gt;1.0&lt;/version&gt;</div>
<div class="line"> &lt;description&gt;Alternate Timer 1 is a special timer execution mode ... &lt;/description&gt;</div>
<div class="line"> &lt;baseAddress&gt;0x40002000&lt;/baseAddress&gt;</div>
<div class="line"> &lt;alternatePeripheral&gt;Timer1&lt;/alternatePeripheral&gt;</div>
<div class="line"> ...</div>
<div class="line"> &lt;/peripheral&gt;</div>
<div class="line">&lt;/peripherals&gt;</div>
</div><!-- fragment --><p>Two timer peripheral descriptions are specified for the same memory block. No redefined addresses will be reported for both peripherals.</p>
<p><a class="anchor" id="elem_peripheral_sc"></a><b>/device/peripherals/peripheral</b> </p>
<table class="cmtable" summary="Peripheral 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_peripherals.html">peripherals</a> </td><td colspan="3"><a class="el" href="elem_peripherals.html">/device/peripherals element</a> </td></tr>
<tr>
<th style="white-space:nowrap">Attributes </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
<tr>
<td>derivedFrom </td><td>Specify the peripheral name from which to inherit data. Elements specified subsequently override inherited values. </td><td>dimableIdentifierType </td><td>0..1 </td></tr>
<tr>
<th style="white-space:nowrap">Child Elements </th><th>Description </th><th>Type </th><th>Occurrence </th></tr>
<tr class="group1">
<td>&#160; </td><td colspan="3">Refer to <a class="el" href="elem_special.html#dimElementGroup_gr">dimElementGroup</a> for details about the colored elements. </td></tr>
<tr class="group1">
<td>dim </td><td>Define the number of elements in an array. </td><td>scaledNonNegativeInteger </td><td>0..1 </td></tr>
<tr class="group1">
<td>dimIncrement </td><td>Specify the address increment, in <span class="XML-Token">Bytes</span>, between two neighboring array members in the address map. </td><td>scaledNonNegativeInteger </td><td>0..1 </td></tr>
<tr class="group1">
<td>dimIndex </td><td>Do not define on peripheral level. By default, <em>&lt;dimIndex&gt;</em> is an integer value starting at <span class="XML-Token">0</span>. </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>&lt;name&gt;</em> element is used. </td><td>idnetifierType </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>The string identifies the peripheral. Peripheral names are required to be unique for a device. The name needs to be an ANSI C identifier to generate the header file. You can use the placeholder <em>[%s]</em> to create arrays. </td><td>dimableIdentifierType </td><td>1..1 </td></tr>
<tr>
<td>version </td><td>The string specifies the version of this peripheral description. </td><td>xs:string </td><td>0..1 </td></tr>
<tr>
<td>description </td><td>The string provides an overview of the purpose and functionality of the peripheral. </td><td>xs:string </td><td>0..1 </td></tr>
<tr>
<td>alternatePeripheral </td><td>All address blocks in the memory space of a device are assigned to a unique peripheral by default. If multiple peripherals describe the same address blocks, then this needs to be specified explicitly. A peripheral redefining an address block needs to specify the name of the peripheral that is listed first in the description. </td><td>dimaleIdentifierType </td><td>0..1 </td></tr>
<tr>
<td>groupName </td><td>Define a name under which the System Viewer is showing this peripheral. </td><td>xs:Name </td><td>0..1 </td></tr>
<tr>
<td>prependToName </td><td>Define a string as prefix. All register names of this peripheral get this prefix. </td><td>identifierType </td><td>0..1 </td></tr>
<tr>
<td>appendToName </td><td>Define a string as suffix. All register names of this peripheral get this suffix. </td><td>identifierType </td><td>0..1 </td></tr>
<tr>
<td>headerStructName </td><td>Specify the base name of C structures. The headerfile generator uses the name of a peripheral as the base name for the C structure type. If <em>&lt;headerStructName&gt;</em> element is specfied, then this string is used instead of the peripheral name; useful when multiple peripherals get derived and a generic type name should be used. </td><td>dimableIdentifierType </td><td>0..1 </td></tr>
<tr>
<td>disableCondition </td><td>Define a C-language compliant logical expression returning a TRUE or FALSE result. If TRUE, refreshing the display for this peripheral is disabled and related accesses by the debugger are suppressed. <br/>
<br/>
Only constants and references to other registers contained in the description are allowed: <em>&lt;peripheral&gt;</em>-&gt;<em>&lt;register&gt;</em>-&gt;<em>&lt;field&gt;</em>, for example, (System-&gt;ClockControl-&gt;apbEnable == 0). The following operators are allowed in the expression [&amp;&amp;,||, ==, !=, &gt;&gt;, &lt;&lt;, &amp;, |]. <dl class="section attention"><dt>Attention</dt><dd>Use this feature only in cases where accesses from the debugger to registers of un-clocked peripherals result in severe debugging failures. SVD is intended to provide static information and does not include any run-time computation or functions. Such capabilities can be added by the tools, and is beyond the scope of this description language. </dd></dl>
</td><td>stringType </td><td>0..1 </td></tr>
<tr>
<td>baseAddress </td><td>Lowest address reserved or used by the peripheral. </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr class="group2">
<td>&#160; </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>Define 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>Define default access rights for all registers. </td><td>accessType </td><td>0..1 </td></tr>
<tr class="group2">
<td>protection </td><td>Define default protection rights for all registers. </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 which register bits have a defined reset value. </td><td>scaledNonNegativeInteger </td><td>0..1 </td></tr>
<tr>
<td><a class="el" href="elem_peripherals.html#elem_addressBlock">addressBlock</a> </td><td>Specify an address range uniquely mapped to this peripheral. A peripheral must have at least one address block, but can allocate multiple distinct address ranges. If a peripheral is derived from another peripheral, the addressBlock is not mandatory. </td><td>addressBlockType </td><td>0/1..* </td></tr>
<tr>
<td><a class="el" href="elem_peripherals.html#elem_interrupt">interrupt</a> </td><td>A peripheral can have multiple associated interrupts. This entry allows the debugger to show interrupt names instead of interrupt numbers. </td><td>interruptType </td><td>0..* </td></tr>
<tr>
<td><a class="el" href="elem_registers.html">registers</a> </td><td>Group to enclose register definitions. </td><td>registersType </td><td>0..1 </td></tr>
</table>
<p>&#160;</p>
<hr/>
<h1><a class="anchor" id="elem_addressBlock"></a>
/device/peripherals/peripheral/addressBlock element</h1>
<p>Specify an address range uniquely mapped to this peripheral. A peripheral must have at least one address block. If a peripheral is derived form another peripheral, the <em>&lt;addressBlock&gt;</em> is not mandatory.</p>
<p><b>/device/peripherals/peripheral/addressBlock</b> </p>
<table class="cmtable" summary="addressBlock 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>
<td>offset </td><td>Specifies the start address of an address block relative to the peripheral <em>baseAddress</em>. </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr>
<td>size </td><td>Specifies the number of addressUnitBits being covered by this address block. The end address of an address block results from the sum of baseAddress, offset, and (size - 1). </td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr>
<td>usage </td><td>The following predefined values can be used:<ul>
<li><span class="XML-Token">registers</span></li>
<li><span class="XML-Token">buffer</span></li>
<li><span class="XML-Token">reserved</span>. </li>
</ul>
</td><td>scaledNonNegativeInteger </td><td>1..1 </td></tr>
<tr>
<td><a class="el" href="elem_special.html#elem_protection">protection</a> </td><td>Set the protection level for an address block. </td><td>protectionStringType </td><td>0..1 </td></tr>
</table>
<p>&#160;</p>
<hr/>
<h1><a class="anchor" id="elem_interrupt"></a>
/device/peripherals/peripheral/interrupt element</h1>
<p>A peripheral can have multiple interrupts. This entry allows the debugger to show interrupt names instead of interrupt numbers.</p>
<p><a class="anchor" id="elem_interrupt_sc"></a><b>/device/peripherals/peripheral/interrupt</b> </p>
<table class="cmtable" summary="interrupt 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>
<td>name </td><td>The string represents the interrupt name. </td><td>stringType </td><td>1..1 </td></tr>
<tr>
<td>description </td><td>The string describes the interrupt. </td><td>xs:string </td><td>0..1 </td></tr>
<tr>
<td>value </td><td>Represents the enumeration index value associated to the interrupt. </td><td>xs:integer </td><td>1..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 Feb 8 2017 10:21:05 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>