deploy: af18673e1a
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
||||
<meta name="generator" content="Doxygen 1.9.5"/>
|
||||
<meta name="generator" content="Doxygen 1.9.8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
<title>Sensor Watch: Sleep Control</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
@@ -30,7 +30,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.5 -->
|
||||
<!-- Generated by Doxygen 1.9.8 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
||||
@@ -81,31 +81,31 @@ $(function() {
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:gacad726423f5f38697c87474ab25244ca"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deepsleep.html#gacad726423f5f38697c87474ab25244ca">watch_register_extwake_callback</a> (uint8_t pin, ext_irq_cb_t callback, bool level)</td></tr>
|
||||
<tr class="memdesc:gacad726423f5f38697c87474ab25244ca"><td class="mdescLeft"> </td><td class="mdescRight">Registers a callback on one of the RTC's external wake pins, which can wake the device from Sleep, Deep Sleep and BACKUP modes (but see warning re: BACKUP mode). <a href="group__deepsleep.html#gacad726423f5f38697c87474ab25244ca">More...</a><br /></td></tr>
|
||||
<tr class="memitem:gacad726423f5f38697c87474ab25244ca" id="r_gacad726423f5f38697c87474ab25244ca"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deepsleep.html#gacad726423f5f38697c87474ab25244ca">watch_register_extwake_callback</a> (uint8_t pin, ext_irq_cb_t callback, bool level)</td></tr>
|
||||
<tr class="memdesc:gacad726423f5f38697c87474ab25244ca"><td class="mdescLeft"> </td><td class="mdescRight">Registers a callback on one of the RTC's external wake pins, which can wake the device from Sleep, Deep Sleep and BACKUP modes (but see warning re: BACKUP mode). <br /></td></tr>
|
||||
<tr class="separator:gacad726423f5f38697c87474ab25244ca"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaae4dfbad44338b179a7b2d8a286bacbe"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deepsleep.html#gaae4dfbad44338b179a7b2d8a286bacbe">watch_disable_extwake_interrupt</a> (uint8_t pin)</td></tr>
|
||||
<tr class="memdesc:gaae4dfbad44338b179a7b2d8a286bacbe"><td class="mdescLeft"> </td><td class="mdescRight">Unregisters the RTC interrupt on one of the EXTWAKE pins. This will prevent a value change on one of these pins from waking the device. <a href="group__deepsleep.html#gaae4dfbad44338b179a7b2d8a286bacbe">More...</a><br /></td></tr>
|
||||
<tr class="memitem:gaae4dfbad44338b179a7b2d8a286bacbe" id="r_gaae4dfbad44338b179a7b2d8a286bacbe"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deepsleep.html#gaae4dfbad44338b179a7b2d8a286bacbe">watch_disable_extwake_interrupt</a> (uint8_t pin)</td></tr>
|
||||
<tr class="memdesc:gaae4dfbad44338b179a7b2d8a286bacbe"><td class="mdescLeft"> </td><td class="mdescRight">Unregisters the RTC interrupt on one of the EXTWAKE pins. This will prevent a value change on one of these pins from waking the device. <br /></td></tr>
|
||||
<tr class="separator:gaae4dfbad44338b179a7b2d8a286bacbe"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga385b36922ec76c5fe697772f97a05846"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deepsleep.html#ga385b36922ec76c5fe697772f97a05846">watch_store_backup_data</a> (uint32_t data, uint8_t reg)</td></tr>
|
||||
<tr class="memdesc:ga385b36922ec76c5fe697772f97a05846"><td class="mdescLeft"> </td><td class="mdescRight">Stores data in one of the RTC's backup registers, which retain their data in BACKUP mode. <a href="group__deepsleep.html#ga385b36922ec76c5fe697772f97a05846">More...</a><br /></td></tr>
|
||||
<tr class="memitem:ga385b36922ec76c5fe697772f97a05846" id="r_ga385b36922ec76c5fe697772f97a05846"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deepsleep.html#ga385b36922ec76c5fe697772f97a05846">watch_store_backup_data</a> (uint32_t data, uint8_t reg)</td></tr>
|
||||
<tr class="memdesc:ga385b36922ec76c5fe697772f97a05846"><td class="mdescLeft"> </td><td class="mdescRight">Stores data in one of the RTC's backup registers, which retain their data in BACKUP mode. <br /></td></tr>
|
||||
<tr class="separator:ga385b36922ec76c5fe697772f97a05846"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga2de1f1012475654c4741f60808581196"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deepsleep.html#ga2de1f1012475654c4741f60808581196">watch_get_backup_data</a> (uint8_t reg)</td></tr>
|
||||
<tr class="memdesc:ga2de1f1012475654c4741f60808581196"><td class="mdescLeft"> </td><td class="mdescRight">Gets 32 bits of data from the RTC's BACKUP register. <a href="group__deepsleep.html#ga2de1f1012475654c4741f60808581196">More...</a><br /></td></tr>
|
||||
<tr class="memitem:ga2de1f1012475654c4741f60808581196" id="r_ga2de1f1012475654c4741f60808581196"><td class="memItemLeft" align="right" valign="top">uint32_t </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deepsleep.html#ga2de1f1012475654c4741f60808581196">watch_get_backup_data</a> (uint8_t reg)</td></tr>
|
||||
<tr class="memdesc:ga2de1f1012475654c4741f60808581196"><td class="mdescLeft"> </td><td class="mdescRight">Gets 32 bits of data from the RTC's BACKUP register. <br /></td></tr>
|
||||
<tr class="separator:ga2de1f1012475654c4741f60808581196"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga9f7a625290748f0df6ba2ceb27e0d81b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deepsleep.html#ga9f7a625290748f0df6ba2ceb27e0d81b">watch_enter_sleep_mode</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga9f7a625290748f0df6ba2ceb27e0d81b"><td class="mdescLeft"> </td><td class="mdescRight">enters Sleep Mode by disabling all pins and peripherals except the RTC and the LCD. <a href="group__deepsleep.html#ga9f7a625290748f0df6ba2ceb27e0d81b">More...</a><br /></td></tr>
|
||||
<tr class="memitem:ga9f7a625290748f0df6ba2ceb27e0d81b" id="r_ga9f7a625290748f0df6ba2ceb27e0d81b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deepsleep.html#ga9f7a625290748f0df6ba2ceb27e0d81b">watch_enter_sleep_mode</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga9f7a625290748f0df6ba2ceb27e0d81b"><td class="mdescLeft"> </td><td class="mdescRight">enters Sleep Mode by disabling all pins and peripherals except the RTC and the LCD. <br /></td></tr>
|
||||
<tr class="separator:ga9f7a625290748f0df6ba2ceb27e0d81b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaea469761889ff203385f3bfd88bb2451"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deepsleep.html#gaea469761889ff203385f3bfd88bb2451">watch_enter_deep_sleep_mode</a> (void)</td></tr>
|
||||
<tr class="memdesc:gaea469761889ff203385f3bfd88bb2451"><td class="mdescLeft"> </td><td class="mdescRight">enters Deep Sleep Mode by disabling all pins and peripherals except the RTC. <a href="group__deepsleep.html#gaea469761889ff203385f3bfd88bb2451">More...</a><br /></td></tr>
|
||||
<tr class="memitem:gaea469761889ff203385f3bfd88bb2451" id="r_gaea469761889ff203385f3bfd88bb2451"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deepsleep.html#gaea469761889ff203385f3bfd88bb2451">watch_enter_deep_sleep_mode</a> (void)</td></tr>
|
||||
<tr class="memdesc:gaea469761889ff203385f3bfd88bb2451"><td class="mdescLeft"> </td><td class="mdescRight">enters Deep Sleep Mode by disabling all pins and peripherals except the RTC. <br /></td></tr>
|
||||
<tr class="separator:gaea469761889ff203385f3bfd88bb2451"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga50dda38a8a83d7d957e3bb2bf13aa3ef"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deepsleep.html#ga50dda38a8a83d7d957e3bb2bf13aa3ef">watch_enter_backup_mode</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga50dda38a8a83d7d957e3bb2bf13aa3ef"><td class="mdescLeft"> </td><td class="mdescRight">Enters the SAM L22's lowest-power mode, BACKUP. <a href="group__deepsleep.html#ga50dda38a8a83d7d957e3bb2bf13aa3ef">More...</a><br /></td></tr>
|
||||
<tr class="memitem:ga50dda38a8a83d7d957e3bb2bf13aa3ef" id="r_ga50dda38a8a83d7d957e3bb2bf13aa3ef"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__deepsleep.html#ga50dda38a8a83d7d957e3bb2bf13aa3ef">watch_enter_backup_mode</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga50dda38a8a83d7d957e3bb2bf13aa3ef"><td class="mdescLeft"> </td><td class="mdescRight">Enters the SAM L22's lowest-power mode, BACKUP. <br /></td></tr>
|
||||
<tr class="separator:ga50dda38a8a83d7d957e3bb2bf13aa3ef"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
||||
<p >This section covers functions related to the various sleep modes available to the watch, including Sleep, Deep Sleep, and BACKUP mode. </p>
|
||||
<p >These terms changed meaning a bit over the course of development; if you are coming to this documentation after having worked with an earlier version of the library, these definitions should clarify the terminology. Terms in all caps are modes of the SAM L22; terms in Title Case are specific implementations in this library.</p><ul>
|
||||
<p>This section covers functions related to the various sleep modes available to the watch, including Sleep, Deep Sleep, and BACKUP mode. </p>
|
||||
<p>These terms changed meaning a bit over the course of development; if you are coming to this documentation after having worked with an earlier version of the library, these definitions should clarify the terminology. Terms in all caps are modes of the SAM L22; terms in Title Case are specific implementations in this library.</p><ul>
|
||||
<li>ACTIVE mode is the mode the SAM L22 is in when both the main clock and the CPU are running. It is the most power-hungry mode. If you ever call delay_ms to wait a beat, the watch will remain in ACTIVE mode while taking that delay. In addition, whenever your <code>app_loop</code> function returns false, the device will remain in ACTIVE mode and call your <code>app_loop</code> function again.</li>
|
||||
<li>STANDBY mode turns off the main clock and halts the CPU. Since the PWM driver is run from the main clock, it also stops the buzzer and any dimming of the LEDs. In this mode, the watch can wake from any interrupt source. Whenever your <code>app_loop</code> function returns true, the watch enters STANDBY mode until the next tick or other interrupt. This mode uses much less power than ACTIVE mode.</li>
|
||||
<li>Sleep Mode is a special case of STANDBY mode. In this mode, the watch turns off almost all peripherals (including the external interrupt controller), and disables all pins except for the external wake pins. In this mode the watch can only wake from the RTC alarm interrupt or an external wake pin (A2, A4 or the alarm button), but the display remains on and your app's state is retained. You can enter this mode by calling <code>watch_enter_sleep_mode</code>. It consumes an order of magnitude less power than STANDBY mode.</li>
|
||||
@@ -156,7 +156,7 @@ Functions</h2></td></tr>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>Enters the SAM L22's lowest-power mode, BACKUP. </p>
|
||||
<p >This function does some housekeeping before entering BACKUP mode. It first disables all pins and peripherals except for the RTC, and disables the tick interrupt (since that would wake us up from BACKUP mode). Once again, if you wish to wake from the A2 or the A4 interrupt, you must first configure this by calling watch_register_extwake_callback. </p><dl class="section note"><dt>Note</dt><dd>If you have a callback set for an external wake interrupt, it will be called if triggered while in ACTIVE, STANDBY, Sleep and Deep Sleep modes, but it <em>will not be called</em> when waking from BACKUP mode. Waking from backup is effectively like waking from reset, except that your <a class="el" href="group__app.html#gab6a9f08ba879ce8d28fb19ca2882890a">app_wake_from_backup</a> function will be called. </dd></dl>
|
||||
<p>This function does some housekeeping before entering BACKUP mode. It first disables all pins and peripherals except for the RTC, and disables the tick interrupt (since that would wake us up from BACKUP mode). Once again, if you wish to wake from the A2 or the A4 interrupt, you must first configure this by calling watch_register_extwake_callback. </p><dl class="section note"><dt>Note</dt><dd>If you have a callback set for an external wake interrupt, it will be called if triggered while in ACTIVE, STANDBY, Sleep and Deep Sleep modes, but it <em>will not be called</em> when waking from BACKUP mode. Waking from backup is effectively like waking from reset, except that your <a class="el" href="group__app.html#gab6a9f08ba879ce8d28fb19ca2882890a">app_wake_from_backup</a> function will be called. </dd></dl>
|
||||
<dl class="section warning"><dt>Warning</dt><dd>On current revisions of the SAM L22 silicon, the ALARM_BTN pin (PA02 RTC/IN2) cannot wake the device from deep sleep mode. There is an errata note (Reference: 15010) that says that due to a silicon bug, RTC/IN2 is not functional in BACKUP. As a result, you should not call this function unless you have a device on the nine-pin connector with an external interrupt on pin A2 or A4 (i.e. an accelerometer with an interrupt pin). </dd></dl>
|
||||
|
||||
</div>
|
||||
@@ -178,8 +178,8 @@ Functions</h2></td></tr>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>enters Deep Sleep Mode by disabling all pins and peripherals except the RTC. </p>
|
||||
<p >Short of BACKUP mode, this is the lowest power mode you can enter while retaining your application state (and the ability to wake with the alarm button). Just note that the display will be completely off, so you should document to the user of your application that they will need to press the alarm button to wake the device, or use a sensor board with support for an external wake pin.</p>
|
||||
<p >All notes from watch_enter_sleep_mode apply here, except for power consumption. You can estimate the power consumption of this mode to be on the order of 4µA at room temperature. </p>
|
||||
<p>Short of BACKUP mode, this is the lowest power mode you can enter while retaining your application state (and the ability to wake with the alarm button). Just note that the display will be completely off, so you should document to the user of your application that they will need to press the alarm button to wake the device, or use a sensor board with support for an external wake pin.</p>
|
||||
<p>All notes from watch_enter_sleep_mode apply here, except for power consumption. You can estimate the power consumption of this mode to be on the order of 4µA at room temperature. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -200,9 +200,9 @@ Functions</h2></td></tr>
|
||||
</div><div class="memdoc">
|
||||
|
||||
<p>enters Sleep Mode by disabling all pins and peripherals except the RTC and the LCD. </p>
|
||||
<p >This sleep mode is not the lowest power mode available, but it has the benefit of allowing you to display a message to the user while asleep. You can also set an alarm interrupt to wake at a configfurable interval (every minute, hour or day) to update the display. You can wake from this mode by pressing the ALARM button, if you registered an extwake callback on the ALARM button. Also note that when your app wakes from this sleep mode, your app_setup method will be called again, since this function will have disabled things you set up there.</p>
|
||||
<p >Note that to wake from either the ALARM button, the A2 interrupt or the A4 interrupt, you must first configure this by calling watch_register_extwake_callback.</p>
|
||||
<p >Power consumption depends on temperature, but as a rough estimate, this mode will consume:</p><ul>
|
||||
<p>This sleep mode is not the lowest power mode available, but it has the benefit of allowing you to display a message to the user while asleep. You can also set an alarm interrupt to wake at a configfurable interval (every minute, hour or day) to update the display. You can wake from this mode by pressing the ALARM button, if you registered an extwake callback on the ALARM button. Also note that when your app wakes from this sleep mode, your app_setup method will be called again, since this function will have disabled things you set up there.</p>
|
||||
<p>Note that to wake from either the ALARM button, the A2 interrupt or the A4 interrupt, you must first configure this by calling watch_register_extwake_callback.</p>
|
||||
<p>Power consumption depends on temperature, but as a rough estimate, this mode will consume:</p><ul>
|
||||
<li>6.0 ~ 7.5µA while at normal room temperatures</li>
|
||||
<li>9.5µA while worn on a wrist (temperature ≈ 31° C) </li>
|
||||
</ul>
|
||||
@@ -322,7 +322,7 @@ Functions</h2></td></tr>
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
|
||||
Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user