Skip to content

Commit ae468c4

Browse files
FrancescoSercarlescufi
authored andcommitted
doc: Updated nRF54H20 power management doc
Updated nRF54H20 power management doc Signed-off-by: Francesco Domenico Servidio <[email protected]>
1 parent 8ec1b21 commit ae468c4

File tree

3 files changed

+315
-108
lines changed

3 files changed

+315
-108
lines changed

doc/nrf/app_dev/device_guides/nrf54h/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ Zephyr and the |NCS| provide support and contain board definitions for developin
4444
../nrf54l/zms.rst
4545
ug_nrf54h20_mcuboot_dfu
4646
ug_nrf54h_ecies_x25519
47+
ug_nrf54h20_pm_optimization
Lines changed: 71 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.. _ug_nrf54h20_architecture_pm:
22

3-
nRF54H20 Power Management
3+
nRF54H20 power management
44
#########################
55

66
.. contents::
@@ -15,24 +15,19 @@ To achieve optimal low power consumption, ensure that both the radio and applica
1515
For reference implementations, see the :ref:`multicore_idle_test` samples.
1616
These samples demonstrate configurations where the radio core remains idle while the application core remains active.
1717

18-
Power states
19-
************
18+
Software power states
19+
*********************
2020

21-
The nRF54H20 ARM Cortex CPUs currently support the following software power states:
21+
The ARM Cortex CPUs of the nRF54H20 SoC currently support the following software power states:
2222

2323
* Active
2424
* Idle
25-
* Local suspend to Ram
26-
27-
Overview
28-
********
25+
* Idle with cache disabled
26+
* Local suspend to RAM
2927

3028
Each CPU in the nRF54H20 SoC tries to preserve as much power as possible, independently from other CPUs.
3129
The power management subsystem, operating independently within each CPU, continuously selects the most optimal power state based on the current conditions of the CPU.
3230

33-
Power states details
34-
********************
35-
3631
The following sections describes the details of each of the software power states available on the nRF54H20 SoC.
3732

3833
Active
@@ -48,7 +43,7 @@ Active
4843

4944
* - RAM
5045
- Banks used by the executed code are enabled.
51-
Other banks may be in any state.
46+
Other banks can be in any state.
5247

5348
* - System state
5449
- *System ON*
@@ -82,7 +77,7 @@ Idle
8277

8378
* - RAM
8479
- Banks used by the executed code are enabled.
85-
Other banks may be in any state.
80+
Other banks can be in any state.
8681

8782
* - System state
8883
- *System ON*
@@ -104,8 +99,54 @@ The wake-up latency is higher than in *Active*, but lower than in the other powe
10499
The primary sources of wake-up latency are the wake-up of the ``MRAMC`` and the startup of clock sources.
105100
The maximum latency depends on the MRAM power state configured by the System Controller.
106101

107-
Local Suspend to RAM
108-
********************
102+
Idle with cache disabled
103+
========================
104+
105+
*Idle with cache disabled* is a lightweight sleep state where the CPU is suspended and the contents of the L1 caches are discarded.
106+
107+
.. list-table::
108+
:widths: auto
109+
110+
* - CPU
111+
- Powered on but not clocked.
112+
Its state is retained in the hardware flip-flops.
113+
114+
* - RAM
115+
- Enabled or retained depending on the hardware state.
116+
RAM in caches is disabled.
117+
118+
* - System state
119+
- * *System ON* if at least one other CPU or a peripheral clocked > 32 kHz is active.
120+
* *System ON Idle* if all CPUs are disabled and the only active peripherals are clocked with 32 kHz (real-time part of ``GRTC``, ``RTC``, ``WDT``) or System Off wake-up sources.
121+
* *System ON All Idle* if all other CPUs and all peripherals except System Off wake-up sources are disabled.
122+
Only available in domains without DVFS.
123+
124+
The hardware automatically selects one of these states based on the activity of other CPUs and peripherals.
125+
126+
* - Peripherals
127+
- All can be active.
128+
The local peripherals are powered and preserve their state.
129+
The state of inactive peripherals in other domains is retained in the hardware flip-flops.
130+
131+
* - Coprocessors
132+
- All can be active.
133+
The state of inactive coprocessors is retained according to their selected sleep state.
134+
135+
* - System timer (based on GRTC)
136+
- Active
137+
138+
The primary sources of wake-up latency are:
139+
140+
* Writing back dirty cache lines
141+
* Waking up the MRAMC
142+
* Refilling L1 caches
143+
* Restarting clock sources
144+
145+
Latency is influenced by the number of dirty cache lines at sleep entry and the cache miss rate after wake-up.
146+
The maximum latency depends on the MRAM power state configured by the System Controller via the ``MRAMC.POWER.AUTOPOWERDOWN`` setting.
147+
148+
Local suspend to RAM
149+
====================
109150

110151
*Local Suspend to RAM* is a sleep state that balances between power consumption and wake-up latency.
111152

@@ -153,100 +194,22 @@ Instead, their state is retained by software in RAM.
153194
The power consumption in this state depends on the overall System state but is lower than in any of the *Idle* states.
154195
The wake-up latency is higher than in any of the *Idle* states due to the CPU state restoration procedure.
155196

156-
Selecting the optimal power state
157-
*********************************
158-
159-
In the nRF54H20 SoC, each local domain is responsible for selecting the power state that results in minimal power consumption while maintaining an acceptable level of performance.
160-
161-
Entering a deeper sleep state leads to power savings when the system is idle, but it requires increased power consumption to enter and exit the sleep state.
162-
There is a minimum sleep duration that justifies the energy spent on entering and exiting a sleep state, and this duration varies for each sleep state.
163-
164-
In the SoC, a local domain has full control over entering and exiting local sleep states, allowing it to assess whether entering these sleep states is optimal at any given moment.
165-
However, entering sleep states associated with system-off requires cooperation between local domains and the System Controller.
166-
Local domains have limited control over the time and energy required to enter or exit system-off, as well as the power consumption during system-off.
167-
168-
Latency management
169-
******************
170-
171-
The sources of wake-up latency in the nRF54H20 SoC can be categorized into two types: local and global.
172-
Each CPU is responsible for managing its latency sources, with local sources handled by local domains and global sources managed by the System Controller.
173-
174-
Local cores are responsible for handling latencies caused by restoring the system from suspend-to-RAM states.
175-
Local cores schedule their wake-up in advance of expected events.
176-
The timing of expected events is reported to the power management subsystem in the RTOS by the software modules anticipating these events.
177-
The power management subsystem sets a ``GRTC`` channel in advance of the next expected event to compensate for local wake-up latency.
178-
179-
The System Controller is responsible for handling latencies caused by restoring the system from the system-off state (the warm boot procedure latency).
180-
The System Controller schedules the system wake-up from the system-off state in advance of the next ``GRTC`` event to compensate for the warm-boot latency of the system.
181-
182-
Because the warm-boot latency is compensated by the System Controller, from a local CPU's perspective, the latency when restoring from the local-off state and the system-off state is expected to be the same.
183-
184-
Latency in local domains
185-
========================
186-
187-
Any local software module (like a device driver) can anticipate events like ISRs.
188-
Some of these events have predictable timing, while others have unpredictable timing.
189-
Handling the latency of events with unpredictable timing is the same in both simple and complex systems.
190-
191-
If handling an event with predictable timing requires restoring the state of the software module or the peripherals used by this module before the event is processed, the software module is responsible for scheduling a timer event in advance.
192-
This scheduled event is used to restore the state of the software module or peripherals.
193-
194-
The Power Management subsystem in a local domain is responsible for scheduling a wake-up in advance to compensate for the domain's core state restoration latency from the local power state.
195-
The wake-up time scheduled in advance by the power management subsystem is combined with the advance time added by the software module.
196-
This approach ensures that the local domain and the software modules anticipating an event have sufficient time to fully restore before the event occurs, allowing the event to be handled without latency.
197-
198-
Unretained hardware classification
199-
**********************************
200-
201-
Some power states in the nRF54H20 SoC result in powering off certain peripherals.
202-
The state of these peripherals is not retained by hardware and must be restored by software before the peripheral is activated.
203-
204-
See the following sections for the lists of peripheral groups and the related software modules responsible for restoring the peripheral's state for each group.
205-
206-
Peripherals in local domains
207-
============================
208-
209-
All local domains include a common set of hardware modules.
210-
In addition to these, most local domains also contain domain-specific peripherals.
211-
212-
Common peripherals for all local domains
213-
----------------------------------------
214-
215-
Each local domain contains a set of peripherals that are classified consistently across all local domains.
216-
The following table summarizes the active peripherals that need handling when exiting the *Local Suspend to RAM* state.
217-
218-
+---------------+--------------------+--------------------+--------------------+--------------------------+
219-
|Type | List of the | Source of data to | Time of restoration| Software module |
220-
| | peripherals | restore | | responsible for restoring|
221-
+===============+====================+====================+====================+==========================+
222-
|Active | * ``MVDMA`` | Device driver's | Decided by the | The device driver |
223-
|peripherals | | code and data | driver | |
224-
+---------------+--------------------+--------------------+--------------------+--------------------------+
225-
226-
Peripherals specific to the Application Domain
227-
----------------------------------------------
228-
229-
There are no peripherals specific to the Application Domain.
230-
231-
Peripherals specific to the Secure Domain
232-
-----------------------------------------
233-
234-
The Secure Domain contains additional peripherals that require handling in the *Local Suspend to RAM* state.
235-
236-
+---------------+--------------------+--------------------+--------------------+--------------------------+
237-
|Type | List of the | Source of data to | Time of restoration| Software module |
238-
| | peripherals | restore | | responsible for restoring|
239-
+===============+====================+====================+====================+==========================+
240-
|Active | * ``CRACEN`` | Device driver's | Decided by the | The device driver |
241-
|peripherals | | code and data | driver | |
242-
+---------------+--------------------+--------------------+--------------------+--------------------------+
197+
Mapping application states to software power states
198+
***************************************************
243199

244-
Peripherals specific to the Radio Domain
245-
----------------------------------------
200+
The following table maps application states to software power states:
246201

247-
The Radio Domain does not implement the *Local Suspend to RAM* state.
202+
+---------------------+------------------------------+---------------------------------------+------------------------------------------+
203+
| Application state | Application core power state | Radio core power state | SoC hardware state |
204+
+=====================+==============================+=======================================+==========================================+
205+
| Active | Active, | Active, | System On, |
206+
| | Idle, | Idle, | System On Idle, |
207+
| | Local suspend to RAM | Idle with cache disabled | System On All Idle |
208+
+---------------------+------------------------------+---------------------------------------+------------------------------------------+
209+
| Idle | Local suspend to RAM | Idle with cache disabled | System On All Idle |
210+
+---------------------+------------------------------+---------------------------------------+------------------------------------------+
248211

249-
Power management benchmark
250-
**************************
212+
Power management optimization
213+
*****************************
251214

252-
To benchmark the power consumption in *Idle* state, see :ref:`multicore_idle_test`.
215+
For recommendations on power management optimization techniques on the nRF54H20 SoC, see the :ref:`ug_nrf54h20_pm_optimization` page.

0 commit comments

Comments
 (0)