> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# System-on-chip sleep states

A system-on-chip (SoC) sleep state is a low power mode that the entire SoC enters when the device is idle or not actively running any use cases.

1. Review SoC Sleep state functionality.
   > The SoC supports many sleep states based on resource availability:
   >
   > > * DDR (Double data rate memory)
   > > * XO (Crystal oscillator) clock
   > > * `(Chip_CX)` (Digital power supply)
   > > * `(Chip_MX)` (Memory domains power supply)

**Note**

The SoC sleep states are enabled on QCS6490/QCS5430 and Qualcomm® Dragonwing™ IQ-615.

2. Understand sleep transition.

As the device transitions from active state to SoC sleep state, the power consumption decreases.

For example, when the device is idle with no use cases running, it’s in the SoC sleep state (AOSD). This is the deepest sleep state and consumes the least power. In this state, the resources, such as, XO clock, memory, and power supply of digital and memory domains also enter their respective sleep states.

3. Learn the SoC sleep states and their resource states:

**Note**

The SoC sleep states listed in the table are for reference only. You can’t enable or disable SoC sleep states.

**Table : SoC sleep states**

| **SoC sleep states** |                                                                                                                                                    **Resource states**                                                                                                                                                   |
| :------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|        Active        |                                                                                              <ul><li>XO clock on</li><li>`Chip_CX` (Digital) and `Chip_MX` (Memory) power domains operate at active voltage level</li></ul>                                                                                              |
|     DDR collapse     |                                                                                    <ul><li>Memory in Self-Refresh mode</li><li>XO clock on</li><li>`Chip_CX` and `Chip_MX` power domains are configured with active voltage</li></ul>                                                                                    |
|  XO shutdown (CXSD)  |                                                                     <ul><li>Memory in Self-Refresh mode</li><li>XO clock off</li><li>`Chip_CX` power domain configured with least voltage</li><li>`Chip_MX` configured with active voltage</li></ul>                                                                     |
|   SoC sleep (AOSD)   | <ul><li>The deepest system sleep state where the system is expected to achieve the lowest sleep power, which is the most preferred state for optimal power management</li><li>Memory in Self-Refresh mode</li><li>XO clock off</li><li>`Chip_CX` and `Chip_MX` power domains configured with the least voltage</li></ul> |

## **Verify system-on-chip sleep state**

> Transitioning to the sleep state significantly reduces power consumption. To ensure power efficiency, the device should enter sleep state, whenever it’s idle.
>
> To verify that the device has successfully entered sleep state, it’s essential to retrieve the SoC sleep statistics.

Run the following commands, to retrieve SoC sleep statistics:

1. Mount debug file system to access device debugfs nodes

```text theme={null}
mount -t debugfs none /sys/kernel/debug
```

2. Run the following command to retrieve AOSD sleep statistics:

```text theme={null}
cat /sys/kernel/debug/qcom_stats/aosd
```

3. Run the following command to retrieve CXSD sleep statistics

```text theme={null}
cat /sys/kernel/debug/qcom_stats/cxsd
```

The following is a sample output:

Count: 3

Last Entered At: 1087943710378

Last Exited At: 1088442890377

Accumulated Duration: 6668562002

The following table explains the output fields:

**Table : SoC sleep states output fields**

|        **Field**       |                                                                           **Explanation**                                                                          |
| :--------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|         `Count`        | <ul><li>Indicates the number of times the SoC entered a particular power state</li><li>A nonzero count indicates that the SoC has exercised sleep states</li></ul> |
|    `Last Entered At`   |                                                          Indicates the last sleep entry timestamp in ticks                                                         |
|    `Last Exited At`    |                                                          Indicates the last sleep exit timestamp in ticks                                                          |
| `Accumulated duration` |                                                         Total amount of time in sleep, represented in ticks                                                        |

**Note**

The 19.2 MHz XO clock determines the system tick frequency.

## **Next steps**

* [CPU power management →](cpu-power-management)
