Files @ 872ec99b2dff
Branch filter:

Location: therm/libraries/CMSIS/Documentation/SVD/html/group__svd__xml__fields__gr.html

Ethan Zonca
SPI setup using stdperiph
<!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>CMSIS-SVD: Fields Level</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>
<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="stylsheetf" rel="stylesheet" type="text/css" />
</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.10</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">
      <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.8.3.1 -->
  <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><!-- 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('group__svd__xml__fields__gr.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Fields Level<div class="ingroups"><a class="el" href="group__svd___format__gr.html">SVD File Schema Levels</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p>All fields of a register are enclosed between the &lt;fields&gt; 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 is either described by the combination of the least significant bit's position (lsb) and the most significant bit's position (msb), or the lsb and the bit-width of the field. A field may define an <em>enumeratedValue</em> in order to make the display more intuitive to read. </p>
<hr/>
 <pre><span class="mand">
<b>&lt;fields&gt;</b></span></pre><pre><span class="mand"><b>    &lt;field <span class="opt">derivedFrom=<em>"identifierType"</em></span>&gt;</b></span></pre><pre><span class="mand">        &lt;name&gt;<em>xs:Name</em>&lt;/name&gt;
        &lt;description&gt;<em>xs:string</em>&lt;/description&gt;</span></pre><pre><span class="mand">        &lt;choice&gt;
            <em> &lt;!-- bitRangeLsbMsbStyle --&gt; </em>
            &lt;bitOffset&gt;<em>scaledNonNegativeInteger</em>&lt;bitOffset&gt;
            &lt;bitWidth&gt;<em>scaledNonNegativeInteger</em>&lt;/bitWidth&gt;
            <em>or</em>
            <em> &lt;!-- bitRangeOffsetWidthStyle --&gt; </em>
            &lt;lsb&gt;<em>scaledNonNegativeInteger</em>&lt;/lsb&gt; 
            &lt;msb&gt;<em>scaledNonNegativeInteger</em>&lt;/msb&gt;
            <em>or</em>
            <em> &lt;!-- bitRangePattern --&gt; </em>
            &lt;bitRange&gt;<em>pattern</em>&lt;/bitRange&gt;
        &lt;/choice&gt;
        <span class="opt">
        &lt;access&gt;<em>accessType</em>&lt;/access&gt;
        &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;enumeratedValues&gt;
            ...
        &lt;/enumeratedValues&gt;</span></span></pre><pre><span class="mand">    <b>&lt;/field&gt;
    <span class="opt">...
    &lt;field&gt;
       ...
    &lt;/field&gt;
    </span>
&lt;fields&gt;
</b></span>
</pre><table  class="cmtable" summary="Field Level Schema">
<tr>
<th>Attribute Name </th><th>Description </th><th>Type </th><th>Occurrence  </th></tr>
<tr>
<td>derivedFrom </td><td>The field is cloned from a previously defined field with a unique name. </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>
<td>name </td><td>Name string used to identify the field. Field names must be unique within a register. </td><td>xs:string  </td><td>1..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 class="choice">
<td><em>Choice of</em> </td><td colspan="2">Three options exist to describe the field's bit-range. The options are to be used mutually exclusive: </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 it belongs to. </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 it belongs to.  </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 it belongs to. </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 it belongs to.  </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: "[&lt;msb&gt;:&lt;lsb&gt;]" </td><td>bitRangeType  </td><td>0..1   </td></tr>
<tr>
<td>access </td><td>Predefined strings can be used to define the allowed access types for this field: <span class="XML-Token">read-only<em>,</em> write-only<em>,</em> read-write<em>, </em> writeOnce<em>, and</em> read-writeOnce</span>. Can be omitted if it matches the access permission set for the parent register.  </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 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 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). Debuggers are not expected to read this field location unless explicitly instructed by the user. </li>
</ul>
</td><td>readActionType </td><td>0..1 register  </td></tr>
<tr>
<td>enumeratedValues </td><td>Next lower level of description. See section <a class="el" href="group__svd__xml__enum__gr.html">Enumerated Values Level</a> for details. </td><td>&#160; </td><td>0..2  </td></tr>
</table>
<h1><a class="anchor" id="field_ex"></a>
Example:</h1>
<div class="fragment"><div class="line">...</div>
<div class="line">&lt;field&gt;</div>
<div class="line">  &lt;name&gt;TimerCtrl0_IntSel&lt;/name&gt;</div>
<div class="line">  &lt;description&gt;Select interrupt line that is triggered by timer overflow.&lt;/description&gt;</div>
<div class="line">  &lt;bitOffset&gt;1&lt;/bitOffset&gt;</div>
<div class="line">  &lt;bitWidth&gt;3&lt;/bitWidth&gt;</div>
<div class="line">  &lt;access&gt;read-write&lt;/access&gt;</div>
<div class="line">  &lt;resetValue&gt;0x0&lt;/resetValue&gt;</div>
<div class="line">  &lt;modifiedWriteValues&gt;oneToSet&lt;/modifiedWriteValues&gt;</div>
<div class="line">  &lt;writeConstraint&gt;</div>
<div class="line">    &lt;range&gt;</div>
<div class="line">      &lt;minimum&gt;0&lt;/minimum&gt;</div>
<div class="line">      &lt;maximum&gt;5&lt;/maximum&gt;</div>
<div class="line">    &lt;/range&gt;</div>
<div class="line">  &lt;/writeConstraint&gt;</div>
<div class="line">  &lt;readAction&gt;clear&lt;/readAction&gt;</div>
<div class="line"> </div>
<div class="line">  &lt;enumeratedValues&gt;</div>
<div class="line">    ...</div>
<div class="line">  &lt;/enumeratedValues&gt;</div>
<div class="line">&lt;/field&gt;</div>
<div class="line">...</div>
</div><!-- fragment --> </div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon Mar 18 2013 13:38:02 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.3.1 
	-->
	</li>
  </ul>
</div>
</body>
</html>