# ReXgen Sleep/Wake up function Implementation

<figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FMV9bjpgFEnBf9PJO82pR%2Fimage.png?alt=media&#x26;token=81e4d940-a45f-4f92-a844-13303455cdb6" alt=""><figcaption></figcaption></figure>

The logger goes to sleep mode when both the CAN bus become inactive.

Following are the triggers that can wake the logger when it is in Deep/Normal Sleep Mode:

| **Wake UP Options** | **Deep Sleep(1mA)** | **Normal Sleep (25mA)** |
| ------------------- | ------------------- | ----------------------- |
| USB                 |                     | Yes                     |
| CAN0                | Yes                 | Yes                     |
| CAN1                | Yes                 | Yes                     |
| ALARM               |                     | Yes                     |
| ACCELEROMETER\*     | Yes                 |                         |
| CLAMP/ERASE PIN\*   | Yes                 |                         |

*\*Will be enabled in the next quarter.*

## Power Consumption.

* Deep Sleep: 1mA.
* Normal Sleep: 25 mA

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FuwH2czTloxOckRDjINem%2Fimage.png?alt=media&#x26;token=d8401a14-cb0e-4bd3-a9c6-f8b517854eae" alt=""><figcaption></figcaption></figure></div>

The sleep delay is specified in the “Sleep after no CAN activity for (minutes).”

&#x20;Three types of sleep modes are available:

* No sleep
* Deep Sleep
* Normal Sleep

### No Sleep

ReXgen will not use the Sleep/Wakeup function when ‘No Sleep’ is selected.

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FHftn6llLhWV7AsIXjE9D%2Fimage.png?alt=media&#x26;token=0305e611-163a-447c-98c9-9b13b06ed025" alt="" width="322"><figcaption></figcaption></figure></div>

### Deep Sleep

Deep sleep mode with a power consumption of 1 mA

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2F1EcabnBa4qwgWk5X6fDz%2Fimage.png?alt=media&#x26;token=a09428fb-7bb1-408d-ab81-fee4b61b4a33" alt="" width="361"><figcaption></figcaption></figure></div>

* Enable ‘Wake Up On Movement’ to wake up the logger on movement.

{% hint style="info" %}

#### Notes:

* 'Wake Up On Movement' is available only in ReXgen Air Devices and above.
* The logger will wake on CAN 0 and CAN 1 when Deep Sleep Mode is used.&#x20;
* The logger will not wake up from this mode on connecting to USB
  {% endhint %}

### Normal Sleep

Normal sleep mode with a power consumption of 25 mA.

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FCntznXRk5Me2tusi0ykj%2Fimage.png?alt=media&#x26;token=fe545237-8964-48ba-b541-5b55c2f077c8" alt="" width="355"><figcaption></figcaption></figure></div>

#### a) Wake On CAN Options:

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FD6sdSprPCakb8KRN3zqy%2Fimage.png?alt=media&#x26;token=a9d20afc-14ec-4b17-b42c-077146027f9b" alt="" width="311"><figcaption></figcaption></figure></div>

1. **Wake Up On CAN 0:** The logger will wake up from sleep mode when CAN activity is on the CAN 0 Bus.
2. **Wake Up On CAN 1:** The logger will wake up from sleep mode when CAN activity is on the CAN 1 Bus.

{% hint style="info" %}

#### Notes:

* Users can enable both options so the logger will wake on CAN 0 and CAN 1.
  {% endhint %}

#### b) Wake On Alarm Option:

* **Wake Up Once:** The logger will wake up from sleep mode once on the specified date at the specified time.

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FRKZmpth5G9szTRL1puaL%2Fimage.png?alt=media&#x26;token=5c2d80c1-68ac-4ff7-9b79-742b37d9e74d" alt="" width="308"><figcaption></figcaption></figure></div>

* **Wake Up Everyday:** The logger will wake up from sleep mode at a specified time every day.

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2FphoIHT05f2WQ1ARK7S14%2Fimage.png?alt=media&#x26;token=1e7dce6a-525f-45dd-ab1d-5f46701af32b" alt="" width="308"><figcaption></figcaption></figure></div>

* **Wake Up Minutes after Sleep:** The logger will wake up from sleep mode after the specified time in minutes.

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2Fnoscx3ujumqj0BRBx7mx%2Fimage.png?alt=media&#x26;token=f7c93187-d910-4b52-aad2-45e622f78a4a" alt="" width="312"><figcaption></figcaption></figure></div>

{% hint style="info" %}

#### Notes:

* User can combine all the options so the logger will wake on CAN 0/CAN 1/Alarm.
  {% endhint %}

#### c) Wake Up On Movement\* Option:

The logger will wake up from sleep mode once any movement is detected.

<div align="left"><figure><img src="https://109727927-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUEja6FQFpk6wbBteOsbv%2Fuploads%2F82p0z4Ex6Defb3zeaxC1%2Fimage.png?alt=media&#x26;token=41863376-dcb6-4bc8-bfe2-d04541a09939" alt="" width="332"><figcaption></figcaption></figure></div>

{% hint style="info" %}
Note:

* Available only in ReXgen Air Devices.
  {% endhint %}

How to [<mark style="color:blue;">configure Sleep mode</mark>](https://youtu.be/wrpywzmCuCY?si=tkjVArb43NxnQLO5) in a ReXgen data logger.
