text: <!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"/>
  <title>Registers Level</title>
  <link href="tabs.css" rel="stylesheet" type="text/css"/>
  <link href="cmsis.css" rel="stylesheet" type="text/css" />
  <link href="navtree.css" rel="stylesheet" type="text/css"/>
  <script type="text/javascript" src="jquery.js"></script>
  <script type="text/javascript" src="resize.js"></script>
  <script type="text/javascript" src="navtree.js"></script>
  <script type="text/javascript">
    $(document).ready(initResizable);
  </script>
  
  
  </head>
  <body>
  <div id="top"><!-- do not remove this div! -->
  
  <div id="titlearea">
  <table cellspacing="0" cellpadding="0">
   <tbody>
   <tr style="height: 46px;">
    <td id="proglogo"><img alt="CMSIS Logo" src="CMSIS_Logo_Final.png"></td>
    
    <td style="padding-left: 0.5em;">
     <div id="projectname">CMSIS-SVD
     &#160;<span id="projectnumber">Version 1.10</span>
     </div>
     <div id="projectbrief">CMSIS System View Description</div>
    </td>
    
    
    
   </tr>
   </tbody>
  </table>
  </div>
  
  <div id="CMSISnav" class="tabs1">
      <ul class="tablist">
        <li><a href="../../General/html/index.html"><span>CMSIS</span></a></li>
        <li><a href="../../Core/html/index.html"><span>CORE</span></a></li>
        <li><a href="../../DSP/html/index.html"><span>DSP</span></a></li>
        <li><a href="../../RTOS/html/index.html"><span>RTOS API</span></a></li>
        <li class="current"><a href="../../SVD/html/index.html"><span>SVD</span></a></li>
      </ul>
  </div>
  <!-- Generated by Doxygen 1.7.5.1 -->
  <script type="text/javascript" src="dynsections.js"></script>
    <div id="navrow1" class="tabs">
      <ul class="tablist">
        <li><a href="index.html"><span>Main&#160;Page</span></a></li>
        <li><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
        <li><a href="modules.html"><span>Reference</span></a></li>
      </ul>
    </div>
  </div>
  <div id="side-nav" class="ui-resizable side-nav-resizable">
    <div id="nav-tree">
      <div id="nav-tree-contents">
      </div>
    </div>
    <div id="splitbar" style="-moz-user-select:none;" 
         class="ui-resizable-handle">
    </div>
  </div>
  <script type="text/javascript">
    initNavTree('group__svd__xml__registers__gr.html','');
  </script>
  <div id="doc-content">
  <div class="header">
    <div class="headertitle">
  <div class="title">Registers Level</div>  </div>
  <div class="ingroups"><a class="el" href="group__svd___format__gr.html">SVD File Schema Levels</a></div></div>
  <div class="contents">
  <p>All registers of a peripheral are enclosed between the <b>&lt;registers&gt;</b> opening and closing tags.</p>
  <p>The description of registers is the most essential part of the SVD description. The register's name, detailed description, and the address-offset relative to the peripheral base address are the mandatory elements. If the size, access, reset value, and reset mask have not been specified on the device or peripheral level, or if the default values need to be redefined locally, these fields become mandatory.</p>
  <p>A register can represent a single value or can be subdivided into individual bit-fields of specific functionality and semantics. In schema-terms the <em>fields</em> section is optional, however, from a specification perspective, fields are mandatory when they are described in the device documentation.</p>
  <p>The SVD specification supports the array-of-registers concept. The single register description gets duplicated automatically into an array. The size of the array is specified by the &lt;dim&gt; element. The register names can be composed by the register name and an index specific substring define in &lt;dimIndex&gt;. The &lt;dimIncrement&gt; specifies the address offset between two registers.</p>
  <hr/>
  <pre>
  <span class="mand"><b>&lt;registers&gt;</b> </span></pre><pre><span class="mand">    <b>&lt;register <span class="opt">derivedFrom=<em>registerNameType</em></span>&gt;</b>
      <span class="opt">
          <em>&lt;!-- dimElementGroup --&gt; </em>
          &lt;dim&gt;<em>scaledNonNegativeInteger</em>&lt;/dim&gt;
          &lt;dimIncrement&gt;<em>scaledNonNegativeInteger</em>&lt;/dimIncrement&gt;
          &lt;dimIndex&gt;<em>xs:string</em>&lt;/dimIndex&gt;
          <em>&lt;!-- end of dimElementGroup --&gt; </em>
     </span>
          &lt;name&gt;<em>identifierType</em>&lt;/name&gt;
      <span class="opt">
          &lt;displayName&gt;<em>xs:string</em>&lt;/displayName&gt;
      </span>
          &lt;description&gt;<em>xs:string</em>&lt;/description&gt;
      <span class="opt">
          &lt;alternateGroup&gt;<em>xs:Name</em>&lt;/alternateGroup&gt;
      </span>
          &lt;addressOffset&gt;<em>scaledNonNegativeInteger</em>&lt;/addressOffset&gt;
      <span class="opt">
          <em>&lt;!-- registerPropertiesGroup --&gt; </em>
          &lt;size&gt;<em>scaledNonNegativeInteger</em>&lt;/size&gt;
          &lt;access&gt;<em>accessType</em>&lt;/access&gt;
          &lt;resetValue&gt;<em>scaledNonNegativeInteger</em>&lt;/resetValue&gt;
          &lt;resetMask&gt;<em>scaledNonNegativeInteger</em>&lt;/resetMask&gt;
          <em>&lt;!-- end of registerPropertiesGroup --&gt; </em>
      </span><span class="opt">
          &lt;modifiedWriteValues&gt;<em>writeValueType</em>&lt;/modifiedWriteValues&gt;
          &lt;writeConstraint&gt;<em>writeConstraintType</em>&lt;/writeConstraint&gt;
          &lt;readAction&gt;<em>readActionType</em>&lt;/readAction&gt;</span></span></pre><pre><span class="mand"><span class="opt">        &lt;fields&gt;
              ...
          &lt;/fields&gt;
      </span>
      <b>&lt;/register&gt;</b>
      <span class="opt">...
      &lt;register&gt;
          ...
      &lt;/register&gt;
      </span>
  <b>&lt;registers&gt;</b> </span>
  </pre><table  class="cmtable" summary="Register Level Schema">
  <tr>
  <th>Attribute Name </th><th>Description </th><th>Type </th><th>Occurrence  </th></tr>
  <tr>
  <td>derivedFrom </td><td>Specifies the name of the register from which to inherit the data. Elements being specified underneath will override the inherited values. <br/>
  <b>Remarks:</b> When deriving a register, it is mandatory to specify at least the name, the description, and the addressOffset. </td><td>xs:Name </td><td>0..1  </td></tr>
  <tr>
  <th>Element Name </th><th>Description </th><th>Type </th><th>Occurrence  </th></tr>
  <tr class="group1">
  <td colspan="4">See <a class="el" href="group__dim_element_group__gr.html">dimElementGroup</a> for details.  </td></tr>
  <tr class="group1">
  <td align="right">dimIncrement </td><td>The value defines the number of elements in an array of registers.  </td><td>scaledNonNegativeInteger  </td><td>1..1   </td></tr>
  <tr class="group1">
  <td align="right">dimIncrement </td><td>If <em>dim</em> is specified, this element becomes mandatory. The element specifies the address increment in between two neighboring registers of the register array in the address map. </td><td>scaledNonNegativeInteger  </td><td>1..1   </td></tr>
  <tr class="group1">
  <td align="right">dimIndex </td><td>Specifies the substrings that replaces the s placeholder within the register name. By default, the index is a decimal value starting with 0 for the first register.  </td><td>dimIndexType  </td><td>0..1   </td></tr>
  <tr>
  <td>name </td><td>Name string used to identify the register. Register names are required to be unique within the scope of a peripheral.  </td><td>registerNameType  </td><td>1..1   </td></tr>
  <tr>
  <td>displayName </td><td>When specified, the string is being used by a graphical frontend to visualize the register. Otherwise the name element is displayed. The <em>displayName</em> may contain special characters and white spaces. The place holder <b>s</b> can be used and is replaced by the <em>dimIndex</em> substring.  </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>addressOffset </td><td>Value defining the address of the register relative to the <em>baseAddress</em> defined by the peripheral of the register. </td><td>scaledNonNegativeInteger </td><td>1..1   </td></tr>
  <tr class="group1">
  <td colspan="4">See <a class="el" href="group__register_properties_group__gr.html">registerPropertiesGroup</a> for details.  </td></tr>
  <tr class="group1">
  <td align="right">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="group1">
  <td align="right">access </td><td>Defines the default access rights for all registers. </td><td>accessType </td><td>0..1   </td></tr>
  <tr class="group1">
  <td align="right">resetValue  </td><td>Defines the default value for all registers at RESET. </td><td>scaledNonNegativeInteger  </td><td>0..1   </td></tr>
  <tr class="group1">
  <td align="right">resetMask </td><td>Identifies which register bits have a defined reset value. </td><td>scaledNonNegativeInteger </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 class="choice">
  <td><em>writeConstraint</em> </td><td colspan="2">Three options exist to set write-constraints: </td><td>0..1  </td></tr>
  <tr class="choice">
  <td><em>1. writeAsRead</em> </td><td>If TRUE, only the last read value can be written. </td><td>xs:boolean </td><td>0..1  </td></tr>
  <tr class="choice">
  <td nowrap="nowrap"><em>2. useEnumeratedValues</em> </td><td>If TRUE, only the values listed in the <em>enumeratedValues</em> list are considered valid write values. </td><td>xs:boolean </td><td>0..1  </td></tr>
  <tr class="choice">
  <td><em>3. range</em> </td><td>Consists of the following two elements: </td><td>&#160; </td><td>0..1  </td></tr>
  <tr class="choice">
  <td align="right">minimum </td><td>Specifies 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>Specifies the largest number to be written to the field. </td><td>scaledNonNegativeInteger </td><td>1..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). Debuggers are not expected to read this register location unless explicitly instructed by the user. </li>
  </ul>
  </td><td>readActionType </td><td><p class="starttd">0..1  </p>
  <p class="endtd"></p>
  </td></tr>
  <tr>
  <td>fields  </td><td>Next lower level of description (see <a class="el" href="group__svd__xml__fields__gr.html">Fields Level</a> for details). Not all registers are further divided into fields, therefore, this level is optional. In case a register is subdivided into bit fields, it should be reflected in the description. The device header file can only contain bit access macros and bit-field structures if this information is contained in the description. </td><td>&#160; </td><td>0..1   </td></tr>
  </table>
  <h2><a class="anchor" id="reg_ex"></a>
  Example:</h2>
  <div class="fragment"><pre class="fragment">...
  &lt;<span class="keyword">register</span>&gt;
    &lt;name&gt;TimerCtrl0&lt;/name&gt;
    &lt;description&gt;Timer Control Register&lt;/description&gt;
    &lt;addressOffset&gt;0x0&lt;/addressOffset&gt;
    &lt;access&gt;read-write&lt;/access&gt;
    &lt;resetValue&gt;0x00008001&lt;/resetValue&gt;
    &lt;resetMask&gt;0x0000ffff&lt;/resetMask&gt;
    &lt;size&gt;32&lt;/size&gt;
    &lt;fields&gt;
      ...
    &lt;/fields&gt;
  &lt;/<span class="keyword">register</span>&gt;
  
  &lt;<span class="keyword">register</span> derivedFrom=<span class="stringliteral">&quot;TimerCtrl0&quot;</span>&gt;
    &lt;name&gt;TimerCtrl1&lt;/name&gt;
    &lt;description&gt;Derived Timer&lt;/description&gt;
    &lt;addressOffset&gt;0x4&lt;/addressOffset&gt;
  &lt;/<span class="keyword">register</span>&gt;
  ...
  </pre></div> </div>
  </div>
    <div id="nav-path" class="navpath">
      <ul>
  
      <li class="footer">Generated on Wed Mar 28 2012 15:38:11 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.7.5.1 </li>
      -->
      </li>
     </ul>
   </div>
  
  
  </body>
  </html>
  