From 595c3cb881c14a28d37a8a9a3e4aadc79285a673 Mon Sep 17 00:00:00 2001 From: joeycastillo Date: Sat, 5 Feb 2022 18:37:05 +0000 Subject: deploy: c74cacd34f68f2897fbd63e2ba90831f87cbad49 --- group__deepsleep.html | 63 +++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 32 deletions(-) (limited to 'group__deepsleep.html') 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 @@ - - + + Sensor Watch: Sleep Control @@ -19,10 +19,9 @@
- - + @@ -31,21 +30,22 @@
-
Sensor Watch -  0.0.0 +
+
Sensor Watch 0.0.0
A board replacement for the classic Casio F-91W wristwatch, powered by a Microchip SAM L22 microcontroller.
- + +/* @license-end */ + @@ -65,15 +65,14 @@ $(function() {
-
-
Sleep Control
+
Sleep Control

This section covers functions related to the various sleep modes available to the watch, including Sleep, Deep Sleep, and BACKUP mode. More...

- @@ -96,16 +95,16 @@ Functions - -

+

Functions

void watch_register_extwake_callback (uint8_t pin, ext_irq_cb_t callback, bool level)
 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). More...
void watch_enter_backup_mode (void)
 Enters the SAM L22's lowest-power mode, BACKUP. More...
 
+
 __attribute__ ((deprecated("Use watch_enter_sleep_mode or watch_enter_deep_sleep_mode instead"))) void watch_enter_shallow_sleep(bool display_on)
 
+
 __attribute__ ((deprecated("Use watch_enter_backup_mode instead"))) void watch_enter_deep_sleep(void)
 

Detailed Description

-

This section covers functions related to the various sleep modes available to the watch, including Sleep, Deep Sleep, and BACKUP mode.

-

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.

- +

◆ watch_enter_backup_mode()

@@ -156,12 +155,12 @@ Functions

Enters the SAM L22's lowest-power mode, BACKUP.

-

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.

Note
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 will not be called when waking from BACKUP mode. Waking from backup is effectively like waking from reset, except that your app_wake_from_backup function will be called.
+

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.

Note
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 will not be called when waking from BACKUP mode. Waking from backup is effectively like waking from reset, except that your app_wake_from_backup function will be called.
Warning
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).
- +

◆ watch_enter_deep_sleep_mode()

@@ -178,12 +177,12 @@ Functions

enters Deep Sleep Mode by disabling all pins and peripherals except the RTC.

-

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.

-

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).

+

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.

+

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).

- +

◆ watch_enter_sleep_mode()

@@ -200,13 +199,13 @@ Functions

enters Sleep Mode by disabling all pins and peripherals except the RTC and the LCD.

-

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.

-

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.

-

You can estimate the power consumption of this mode to be on the order of 30 microwatts (about 10 µA at 3 V).

+

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.

+

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.

+

You can estimate the power consumption of this mode to be on the order of 30 microwatts (about 10 µA at 3 V).

- +

◆ watch_get_backup_data()

@@ -233,7 +232,7 @@ Functions
- +

◆ watch_register_extwake_callback()

@@ -279,7 +278,7 @@ Functions
- +

◆ watch_store_backup_data()

@@ -319,7 +318,7 @@ Functions
-- cgit v1.2.3