diff options
author | joeycastillo <joeycastillo@users.noreply.github.com> | 2022-02-05 18:37:05 +0000 |
---|---|---|
committer | joeycastillo <joeycastillo@users.noreply.github.com> | 2022-02-05 18:37:05 +0000 |
commit | 595c3cb881c14a28d37a8a9a3e4aadc79285a673 (patch) | |
tree | dee69ea8a38ab86fce7496f39c402244c75b7878 /group__deepsleep.html | |
parent | 12daf390078506a2a48c331752a5c69894aa01ec (diff) | |
download | Sensor-Watch-595c3cb881c14a28d37a8a9a3e4aadc79285a673.tar.gz Sensor-Watch-595c3cb881c14a28d37a8a9a3e4aadc79285a673.tar.bz2 Sensor-Watch-595c3cb881c14a28d37a8a9a3e4aadc79285a673.zip |
deploy: c74cacd34f68f2897fbd63e2ba90831f87cbad49
Diffstat (limited to 'group__deepsleep.html')
-rw-r--r-- | group__deepsleep.html | 63 |
1 files changed, 31 insertions, 32 deletions
diff --git a/group__deepsleep.html b/group__deepsleep.html index e95bd01c..bd48983d 100644 --- a/group__deepsleep.html +++ b/group__deepsleep.html @@ -2,8 +2,8 @@ <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="Doxygen 1.9.1"/> +<meta http-equiv="X-UA-Compatible" content="IE=11"/> +<meta name="generator" content="Doxygen 1.9.3"/> <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"/> @@ -19,10 +19,9 @@ <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> - <tr style="height: 56px;"> - <td id="projectalign" style="padding-left: 0.5em;"> - <div id="projectname">Sensor Watch -  <span id="projectnumber">0.0.0</span> + <tr id="projectrow"> + <td id="projectalign"> + <div id="projectname">Sensor Watch<span id="projectnumber"> 0.0.0</span> </div> <div id="projectbrief">A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.</div> </td> @@ -31,21 +30,22 @@ </table> </div> <!-- end header part --> -<!-- Generated by Doxygen 1.9.1 --> +<!-- Generated by Doxygen 1.9.3 --> <script type="text/javascript"> -/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ -var searchBox = new SearchBox("searchBox", "search",false,'Search','.html'); +/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ +var searchBox = new SearchBox("searchBox", "search",'Search','.html'); /* @license-end */ </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> -/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ +/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */ $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); -/* @license-end */</script> +/* @license-end */ +</script> <div id="main-nav"></div> </div><!-- top --> <!-- window showing the filter options --> @@ -65,15 +65,14 @@ $(function() { <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> - <div class="headertitle"> -<div class="title">Sleep Control</div> </div> + <div class="headertitle"><div class="title">Sleep Control</div></div> </div><!--header--> <div class="contents"> <p>This section covers functions related to the various sleep modes available to the watch, including Sleep, Deep Sleep, and BACKUP mode. <a href="#details">More...</a></p> <table class="memberdecls"> -<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> +<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> @@ -96,16 +95,16 @@ Functions</h2></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="separator:ga50dda38a8a83d7d957e3bb2bf13aa3ef"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:gadad1beebe4b8c560187177cb4513240b"><td class="memItemLeft" align="right" valign="top"><a id="gadad1beebe4b8c560187177cb4513240b"></a> +<tr class="memitem:gadad1beebe4b8c560187177cb4513240b"><td class="memItemLeft" align="right" valign="top"><a id="gadad1beebe4b8c560187177cb4513240b" name="gadad1beebe4b8c560187177cb4513240b"></a>  </td><td class="memItemRight" valign="bottom"><b>__attribute__</b> ((deprecated("Use <a class="el" href="group__deepsleep.html#ga9f7a625290748f0df6ba2ceb27e0d81b">watch_enter_sleep_mode</a> or <a class="el" href="group__deepsleep.html#gaea469761889ff203385f3bfd88bb2451">watch_enter_deep_sleep_mode</a> instead"))) void watch_enter_shallow_sleep(bool display_on)</td></tr> <tr class="separator:gadad1beebe4b8c560187177cb4513240b"><td class="memSeparator" colspan="2"> </td></tr> -<tr class="memitem:ga77094010477e7af9456b3b871ec30807"><td class="memItemLeft" align="right" valign="top"><a id="ga77094010477e7af9456b3b871ec30807"></a> +<tr class="memitem:ga77094010477e7af9456b3b871ec30807"><td class="memItemLeft" align="right" valign="top"><a id="ga77094010477e7af9456b3b871ec30807" name="ga77094010477e7af9456b3b871ec30807"></a>  </td><td class="memItemRight" valign="bottom"><b>__attribute__</b> ((deprecated("Use <a class="el" href="group__deepsleep.html#ga50dda38a8a83d7d957e3bb2bf13aa3ef">watch_enter_backup_mode</a> instead"))) void watch_enter_deep_sleep(void)</td></tr> <tr class="separator:ga77094010477e7af9456b3b871ec30807"><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> @@ -113,7 +112,7 @@ Functions</h2></td></tr> <li>BACKUP mode is the lowest possible power mode on the SAM L22. It turns off all pins and peripherals except for the RTC. It also turns off the RAM, obliterating your application's state. The only way to wake from this mode is by setting an external wake interrupt on pin A2 or pin A4, and when you do wake it will be much like a wake from reset. You can enter this mode by calling <code>watch_enter_backup_mode</code>. </li> </ul> <h2 class="groupheader">Function Documentation</h2> -<a id="gaae4dfbad44338b179a7b2d8a286bacbe"></a> +<a id="gaae4dfbad44338b179a7b2d8a286bacbe" name="gaae4dfbad44338b179a7b2d8a286bacbe"></a> <h2 class="memtitle"><span class="permalink"><a href="#gaae4dfbad44338b179a7b2d8a286bacbe">◆ </a></span>watch_disable_extwake_interrupt()</h2> <div class="memitem"> @@ -139,7 +138,7 @@ Functions</h2></td></tr> </div> </div> -<a id="ga50dda38a8a83d7d957e3bb2bf13aa3ef"></a> +<a id="ga50dda38a8a83d7d957e3bb2bf13aa3ef" name="ga50dda38a8a83d7d957e3bb2bf13aa3ef"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga50dda38a8a83d7d957e3bb2bf13aa3ef">◆ </a></span>watch_enter_backup_mode()</h2> <div class="memitem"> @@ -156,12 +155,12 @@ 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> </div> -<a id="gaea469761889ff203385f3bfd88bb2451"></a> +<a id="gaea469761889ff203385f3bfd88bb2451" name="gaea469761889ff203385f3bfd88bb2451"></a> <h2 class="memtitle"><span class="permalink"><a href="#gaea469761889ff203385f3bfd88bb2451">◆ </a></span>watch_enter_deep_sleep_mode()</h2> <div class="memitem"> @@ -178,12 +177,12 @@ 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 12 microwatts (about 4µA at 3 V). </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 12 microwatts (about 4µA at 3 V). </p> </div> </div> -<a id="ga9f7a625290748f0df6ba2ceb27e0d81b"></a> +<a id="ga9f7a625290748f0df6ba2ceb27e0d81b" name="ga9f7a625290748f0df6ba2ceb27e0d81b"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga9f7a625290748f0df6ba2ceb27e0d81b">◆ </a></span>watch_enter_sleep_mode()</h2> <div class="memitem"> @@ -200,13 +199,13 @@ 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>You can estimate the power consumption of this mode to be on the order of 30 microwatts (about 10 µA at 3 V). </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 >You can estimate the power consumption of this mode to be on the order of 30 microwatts (about 10 µA at 3 V). </p> </div> </div> -<a id="ga2de1f1012475654c4741f60808581196"></a> +<a id="ga2de1f1012475654c4741f60808581196" name="ga2de1f1012475654c4741f60808581196"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga2de1f1012475654c4741f60808581196">◆ </a></span>watch_get_backup_data()</h2> <div class="memitem"> @@ -233,7 +232,7 @@ Functions</h2></td></tr> </div> </div> -<a id="gacad726423f5f38697c87474ab25244ca"></a> +<a id="gacad726423f5f38697c87474ab25244ca" name="gacad726423f5f38697c87474ab25244ca"></a> <h2 class="memtitle"><span class="permalink"><a href="#gacad726423f5f38697c87474ab25244ca">◆ </a></span>watch_register_extwake_callback()</h2> <div class="memitem"> @@ -279,7 +278,7 @@ Functions</h2></td></tr> </div> </div> -<a id="ga385b36922ec76c5fe697772f97a05846"></a> +<a id="ga385b36922ec76c5fe697772f97a05846" name="ga385b36922ec76c5fe697772f97a05846"></a> <h2 class="memtitle"><span class="permalink"><a href="#ga385b36922ec76c5fe697772f97a05846">◆ </a></span>watch_store_backup_data()</h2> <div class="memitem"> @@ -319,7 +318,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.1 +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.3 </small></address> </body> </html> |