Files
vos/ambiq-hal-sys/ambiq-sparkfun-sdk/docs/registers/apollo3/pages/systick_regs.html
T
2022-10-23 23:45:43 -07:00

674 lines
28 KiB
HTML

<!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" />
<meta name="generator" content="AmbiqMicro" />
<title>AmbiqSuite User Guide: AmbiqSuite Apollo Device Register Overview</title>
<link href="../resources/tabs.css" rel="stylesheet" type="text/css" />
<link href="../resources/bootstrap.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../resources/jquery.js"></script>
<script type="text/javascript" src="../resources/dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css" />
<link href="../resources/customdoxygen.css" 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: 56px;">
<td id="projectlogo">
<img alt="Logo" src="../resources/am_logo.png" />
</td>
<td style="padding-left: 0.5em;">
<div id="projectname">Apollo Register Documentation &#160;<span id="projectnumber">v2.4.2</span></div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li class="current"><a href="../index.html"><span>Main&#160;Page</span></a>
</li>
</div>
</li>
</ul>
</div>
</div>
<!-- top -->
<!-- window showing the filter options -->
<div class="header">
<div class="headertitle">
<div class="title">SYSTICK - ARM System Timer (SysTick) Block Registers.</div>
</div>
</div>
<!--header-->
<body>
<br>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"> SYSTICK Register Index</h3>
</div>
<div class="panel-body">
<table>
<tr id="row_0_0_">
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<span class="h5">0xE000E010:</span>
</td>
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<a class="el" href="#SYSTCSR" target="_self">SYSTCSR - SysTick Control and Status Register.</a>
</td>
</tr>
<tr id="row_0_0_">
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<span class="h5">0xE000E014:</span>
</td>
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<a class="el" href="#SYSTRVR" target="_self">SYSTRVR - SysTick Reload Value Register.</a>
</td>
</tr>
<tr id="row_0_0_">
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<span class="h5">0xE000E018:</span>
</td>
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<a class="el" href="#SYSTCVR" target="_self">SYSTCVR - SysTick Current Value Register.</a>
</td>
</tr>
<tr id="row_0_0_">
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<span class="h5">0xE000E01C:</span>
</td>
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<a class="el" href="#SYSTCALIB" target="_self">SYSTCALIB - SysTick Calibration Value Register.</a>
</td>
</tr>
</table>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 id="SYSTCSR" class="panel-title">SYSTCSR - SysTick Control and Status Register.</h3>
</div>
<div class="panel-body">
<h3>Address:</h3>
<table style="margin:10px">
<tr id="row_0_0_">
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<span class="h5">Instance 0 Address:</span>
</td>
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<span class="h5">0xE000E010</span>
</td>
</tr>
</table>
<h3>Description:</h3>
<p>SysTick Control and Status Register.</p>
<h3>Example Macro Usage:</h3>
<pre style="margin:10px" class="language-pascal"><span style='color:#3f7f59; '>//
// All macro-based register writes follow the same basic format. For
// single-instance modules, you may use the simpler AM_REG macro. For
// multi-instance macros, you will need to specify the instance number using
// the AM_REGn macro format.
//
// AM_REG(&lt;MODULE&gt;, &lt;REGISTER&gt;) |= AM_REG_&lt;MODULE&gt;_&lt;REGISTER&gt;_&lt;FIELD&gt;_&lt;VALUE&gt;;
// AM_REGn(&lt;MODULE&gt;, &lt;INSTANCE&gt;, &lt;REGISTER&gt;) |= AM_REG_&lt;MODULE&gt;_&lt;REGISTER&gt;_&lt;FIELD&gt;_&lt;VALUE&gt;;
//
// For registers that do not have specific enumeration values, you may use this alternate format instead.
//
// AM_REG(&lt;MODULE&gt;, &lt;REGISTER&gt;) |= AM_REG_&lt;MODULE&gt;_&lt;REGISTER&gt;_&lt;FIELD&gt;(&lt;NUMBER&gt;);
//
// For example, the following three lines of code are equivalent methods of
// writing the value for 12MHZ to the CLKSEL field in the ADC_CFG register.
//</span>
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REGn(ADC, 0, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL(0x1);</pre>
<h3>Register Fields:</h3>
<table style="margin:10px" class="table table-bordered table-condensed">
<thead>
<tr>
<th>31</th>
<th>30</th>
<th>29</th>
<th>28</th>
<th>27</th>
<th>26</th>
<th>25</th>
<th>24</th>
<th>23</th>
<th>22</th>
<th>21</th>
<th>20</th>
<th>19</th>
<th>18</th>
<th>17</th>
<th>16</th>
<th>15</th>
<th>14</th>
<th>13</th>
<th>12</th>
<th>11</th>
<th>10</th>
<th>9</th>
<th>8</th>
<th>7</th>
<th>6</th>
<th>5</th>
<th>4</th>
<th>3</th>
<th>2</th>
<th>1</th>
<th>0</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center" colspan="15">RSVD
<br>0x0</td>
<td align="center" colspan="1">COUNTFLAG
<br>0x0</td>
<td align="center" colspan="14">RSVD
<br>0x0</td>
<td align="center" colspan="1">TICKINT
<br>0x0</td>
<td align="center" colspan="1">ENABLE
<br>0x0</td>
</tr>
</tbody>
</table>
<br>
<table style="margin:10px" class="table table-bordered table-condensed">
<thead>
<tr>
<th>Bits</th>
<th>Name</th>
<th>RW</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>31:17</td>
<td>RSVD</td>
<td>RO</td>
<td>RESERVED.<br><br>
</td>
</tr>
<tr>
<td>16</td>
<td>COUNTFLAG</td>
<td>RO</td>
<td>Returns 1 if timer counted to 0 since last time this was read.<br><br>
</td>
</tr>
<tr>
<td>15:2</td>
<td>RSVD</td>
<td>RO</td>
<td>RESERVED.<br><br>
</td>
</tr>
<tr>
<td>1</td>
<td>TICKINT</td>
<td>RW</td>
<td>Enables SysTick exception request. Software can use COUNTFLAG to determine if SysTick has ever counted to zero. 0 = counting down to zero does not assert the SysTick exception request; 1 = counting down to zero asserts the SysTick exception request.<br><br>
</td>
</tr>
<tr>
<td>0</td>
<td>ENABLE</td>
<td>RW</td>
<td>Enables the counter. 0 = counter disabled; 1 = counter enabled.<br><br>
</td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 id="SYSTRVR" class="panel-title">SYSTRVR - SysTick Reload Value Register.</h3>
</div>
<div class="panel-body">
<h3>Address:</h3>
<table style="margin:10px">
<tr id="row_0_0_">
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<span class="h5">Instance 0 Address:</span>
</td>
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<span class="h5">0xE000E014</span>
</td>
</tr>
</table>
<h3>Description:</h3>
<p>SysTick Reload Value Register.</p>
<h3>Example Macro Usage:</h3>
<pre style="margin:10px" class="language-pascal"><span style='color:#3f7f59; '>//
// All macro-based register writes follow the same basic format. For
// single-instance modules, you may use the simpler AM_REG macro. For
// multi-instance macros, you will need to specify the instance number using
// the AM_REGn macro format.
//
// AM_REG(&lt;MODULE&gt;, &lt;REGISTER&gt;) |= AM_REG_&lt;MODULE&gt;_&lt;REGISTER&gt;_&lt;FIELD&gt;_&lt;VALUE&gt;;
// AM_REGn(&lt;MODULE&gt;, &lt;INSTANCE&gt;, &lt;REGISTER&gt;) |= AM_REG_&lt;MODULE&gt;_&lt;REGISTER&gt;_&lt;FIELD&gt;_&lt;VALUE&gt;;
//
// For registers that do not have specific enumeration values, you may use this alternate format instead.
//
// AM_REG(&lt;MODULE&gt;, &lt;REGISTER&gt;) |= AM_REG_&lt;MODULE&gt;_&lt;REGISTER&gt;_&lt;FIELD&gt;(&lt;NUMBER&gt;);
//
// For example, the following three lines of code are equivalent methods of
// writing the value for 12MHZ to the CLKSEL field in the ADC_CFG register.
//</span>
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REGn(ADC, 0, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL(0x1);</pre>
<h3>Register Fields:</h3>
<table style="margin:10px" class="table table-bordered table-condensed">
<thead>
<tr>
<th>31</th>
<th>30</th>
<th>29</th>
<th>28</th>
<th>27</th>
<th>26</th>
<th>25</th>
<th>24</th>
<th>23</th>
<th>22</th>
<th>21</th>
<th>20</th>
<th>19</th>
<th>18</th>
<th>17</th>
<th>16</th>
<th>15</th>
<th>14</th>
<th>13</th>
<th>12</th>
<th>11</th>
<th>10</th>
<th>9</th>
<th>8</th>
<th>7</th>
<th>6</th>
<th>5</th>
<th>4</th>
<th>3</th>
<th>2</th>
<th>1</th>
<th>0</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center" colspan="8">RSVD
<br>0x0</td>
<td align="center" colspan="24">RELOAD
<br>0x0</td>
</tr>
</tbody>
</table>
<br>
<table style="margin:10px" class="table table-bordered table-condensed">
<thead>
<tr>
<th>Bits</th>
<th>Name</th>
<th>RW</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>31:24</td>
<td>RSVD</td>
<td>RO</td>
<td>RESERVED.<br><br>
</td>
</tr>
<tr>
<td>23:0</td>
<td>RELOAD</td>
<td>RW</td>
<td>Value to load into the SYSTCVR register when the counter is enabled and when it reaches 0.<br><br>
</td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 id="SYSTCVR" class="panel-title">SYSTCVR - SysTick Current Value Register.</h3>
</div>
<div class="panel-body">
<h3>Address:</h3>
<table style="margin:10px">
<tr id="row_0_0_">
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<span class="h5">Instance 0 Address:</span>
</td>
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<span class="h5">0xE000E018</span>
</td>
</tr>
</table>
<h3>Description:</h3>
<p>SysTick Current Value Register.</p>
<h3>Example Macro Usage:</h3>
<pre style="margin:10px" class="language-pascal"><span style='color:#3f7f59; '>//
// All macro-based register writes follow the same basic format. For
// single-instance modules, you may use the simpler AM_REG macro. For
// multi-instance macros, you will need to specify the instance number using
// the AM_REGn macro format.
//
// AM_REG(&lt;MODULE&gt;, &lt;REGISTER&gt;) |= AM_REG_&lt;MODULE&gt;_&lt;REGISTER&gt;_&lt;FIELD&gt;_&lt;VALUE&gt;;
// AM_REGn(&lt;MODULE&gt;, &lt;INSTANCE&gt;, &lt;REGISTER&gt;) |= AM_REG_&lt;MODULE&gt;_&lt;REGISTER&gt;_&lt;FIELD&gt;_&lt;VALUE&gt;;
//
// For registers that do not have specific enumeration values, you may use this alternate format instead.
//
// AM_REG(&lt;MODULE&gt;, &lt;REGISTER&gt;) |= AM_REG_&lt;MODULE&gt;_&lt;REGISTER&gt;_&lt;FIELD&gt;(&lt;NUMBER&gt;);
//
// For example, the following three lines of code are equivalent methods of
// writing the value for 12MHZ to the CLKSEL field in the ADC_CFG register.
//</span>
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REGn(ADC, 0, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL(0x1);</pre>
<h3>Register Fields:</h3>
<table style="margin:10px" class="table table-bordered table-condensed">
<thead>
<tr>
<th>31</th>
<th>30</th>
<th>29</th>
<th>28</th>
<th>27</th>
<th>26</th>
<th>25</th>
<th>24</th>
<th>23</th>
<th>22</th>
<th>21</th>
<th>20</th>
<th>19</th>
<th>18</th>
<th>17</th>
<th>16</th>
<th>15</th>
<th>14</th>
<th>13</th>
<th>12</th>
<th>11</th>
<th>10</th>
<th>9</th>
<th>8</th>
<th>7</th>
<th>6</th>
<th>5</th>
<th>4</th>
<th>3</th>
<th>2</th>
<th>1</th>
<th>0</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center" colspan="8">RSVD
<br>0x0</td>
<td align="center" colspan="24">CURRENT
<br>0x0</td>
</tr>
</tbody>
</table>
<br>
<table style="margin:10px" class="table table-bordered table-condensed">
<thead>
<tr>
<th>Bits</th>
<th>Name</th>
<th>RW</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>31:24</td>
<td>RSVD</td>
<td>RO</td>
<td>RESERVED.<br><br>
</td>
</tr>
<tr>
<td>23:0</td>
<td>CURRENT</td>
<td>RW</td>
<td>Reads return the current value of the SysTick counter. A write of any value clears the field to 0, and also clears the SYSTCSR COUNTFLAG bit to 0.<br><br>
</td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading">
<h3 id="SYSTCALIB" class="panel-title">SYSTCALIB - SysTick Calibration Value Register.</h3>
</div>
<div class="panel-body">
<h3>Address:</h3>
<table style="margin:10px">
<tr id="row_0_0_">
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<span class="h5">Instance 0 Address:</span>
</td>
<td class="entry">
<span style="width:32px;display:inline-block;">&#160;</span>
<span class="h5">0xE000E01C</span>
</td>
</tr>
</table>
<h3>Description:</h3>
<p>SysTick Calibration Value Register.</p>
<h3>Example Macro Usage:</h3>
<pre style="margin:10px" class="language-pascal"><span style='color:#3f7f59; '>//
// All macro-based register writes follow the same basic format. For
// single-instance modules, you may use the simpler AM_REG macro. For
// multi-instance macros, you will need to specify the instance number using
// the AM_REGn macro format.
//
// AM_REG(&lt;MODULE&gt;, &lt;REGISTER&gt;) |= AM_REG_&lt;MODULE&gt;_&lt;REGISTER&gt;_&lt;FIELD&gt;_&lt;VALUE&gt;;
// AM_REGn(&lt;MODULE&gt;, &lt;INSTANCE&gt;, &lt;REGISTER&gt;) |= AM_REG_&lt;MODULE&gt;_&lt;REGISTER&gt;_&lt;FIELD&gt;_&lt;VALUE&gt;;
//
// For registers that do not have specific enumeration values, you may use this alternate format instead.
//
// AM_REG(&lt;MODULE&gt;, &lt;REGISTER&gt;) |= AM_REG_&lt;MODULE&gt;_&lt;REGISTER&gt;_&lt;FIELD&gt;(&lt;NUMBER&gt;);
//
// For example, the following three lines of code are equivalent methods of
// writing the value for 12MHZ to the CLKSEL field in the ADC_CFG register.
//</span>
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REGn(ADC, 0, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL(0x1);</pre>
<h3>Register Fields:</h3>
<table style="margin:10px" class="table table-bordered table-condensed">
<thead>
<tr>
<th>31</th>
<th>30</th>
<th>29</th>
<th>28</th>
<th>27</th>
<th>26</th>
<th>25</th>
<th>24</th>
<th>23</th>
<th>22</th>
<th>21</th>
<th>20</th>
<th>19</th>
<th>18</th>
<th>17</th>
<th>16</th>
<th>15</th>
<th>14</th>
<th>13</th>
<th>12</th>
<th>11</th>
<th>10</th>
<th>9</th>
<th>8</th>
<th>7</th>
<th>6</th>
<th>5</th>
<th>4</th>
<th>3</th>
<th>2</th>
<th>1</th>
<th>0</th>
</tr>
</thead>
<tbody>
<tr>
<td align="center" colspan="1">NOREF
<br>0x0</td>
<td align="center" colspan="1">SKEW
<br>0x0</td>
<td align="center" colspan="6">RSVD
<br>0x0</td>
<td align="center" colspan="24">TENMS
<br>0x0</td>
</tr>
</tbody>
</table>
<br>
<table style="margin:10px" class="table table-bordered table-condensed">
<thead>
<tr>
<th>Bits</th>
<th>Name</th>
<th>RW</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>31</td>
<td>NOREF</td>
<td>RO</td>
<td>Indicates whether the device provides a reference clock to the processor. 0 = reference clock provided; 1 = no reference clock provided. If your device does not provide a reference clock, the SYST_CSR.CLKSOURCE bit reads-as-one and ignores writes.<br><br>
</td>
</tr>
<tr>
<td>30</td>
<td>SKEW</td>
<td>RO</td>
<td>Indicates whether the TENMS value is exact. 0 = TENMS value is exact; 1 = TENMS value is inexact, or not given. An inexact TENMS value can affect the suitability of SysTick as a software real time clock.<br><br>
</td>
</tr>
<tr>
<td>29:24</td>
<td>RSVD</td>
<td>RO</td>
<td>RESERVED.<br><br>
</td>
</tr>
<tr>
<td>23:0</td>
<td>TENMS</td>
<td>RW</td>
<td>Reload value for 10ms (100Hz) timing, subject to system clock skew errors. If the value reads as zero, the calibration value is not known.<br><br>
</td>
</tr>
</tbody>
</table>
<br>
</div>
</div>
</body>
<hr size="1">
<body>
<div id="footer" align="right">
<small>
AmbiqSuite Register Documentation&nbsp;
<a href="http://www.ambiqmicro.com">
<img class="footer" src="../resources/ambiqmicro_logo.png" alt="Ambiq Micro"/></a>&nbsp&nbsp Copyright &copy; 2014&nbsp&nbsp<br />
This documentation is licensed and distributed under the <a rel="license" href="http://opensource.org/licenses/BSD-3-Clause">BSD 3-Clause License</a>.&nbsp&nbsp<br/>
</small>
</div>
</body>
</html>