You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_pm_optimization.rst
+119Lines changed: 119 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,125 @@ The power management subsystem in a local domain is responsible for scheduling a
64
64
The wake-up time scheduled in advance by the power management subsystem is combined with the advance time added by the software module.
65
65
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.
66
66
67
+
Logical domains, power domains, and locality
68
+
============================================
69
+
70
+
The nRF54H20 SoC groups hardware into logical domains and power domains.
71
+
The two domain types are defined as follows:
72
+
73
+
Logical domain
74
+
A software-visible functional grouping that aggregates cores, memories, and peripherals behind a common isolation or security boundary (for example, application domain, radio domain, global domain).
75
+
76
+
Power domain
77
+
A granular silicon region that can be clock- or power-gated independently.
78
+
Each physical silicon region has its own retention and leakage characteristics as well as voltage and frequency constraints (for example, high-speed vs low-leakage subregions inside the application logical domain).
79
+
80
+
A single logical domain can span multiple power domains.
81
+
A logical domain frequently contains a low-leakage power domain (cheap retention, low frequency) and one or more high-speed power domains (higher leakage, higher attainable frequency).
82
+
DVFS applies only to high-speed domains.
83
+
84
+
Locality principle
85
+
------------------
86
+
87
+
Power optimization is driven by keeping execution and data access local:
88
+
89
+
* Prefer executing code from local RAM (TCM/local SRAM) within the active core's logical domain.
90
+
* Minimize accesses to MRAM (global non-volatile memory) to avoid waking other domains and incurring cache refill energy.
91
+
* Batch work: Gather peripheral data locally (auxiliary cores) and hand off larger buffers to high-performance cores for computation, instead of driving peripherals directly from high-performance cores.
92
+
93
+
Peripheral access strategy
94
+
--------------------------
95
+
96
+
High-performance cores (application, radio main CPUs) are optimized for computation, not low-latency I/O paths.
97
+
Accessing peripherals from these cores expands the active footprint by adding additional power domains and interconnected segments, increasing energy per transaction.
98
+
99
+
Recommendations:
100
+
101
+
* Use auxiliary or peripheral-oriented cores (for example, Pepper- or Flipper-type helper cores) to perform SPI, I2C, ADC, or UART transactions, local preprocessing, and DMA into local RAM.
102
+
* Signal (IPC or shared memory flag) the application or radio core only when a batch of data is ready.
103
+
* Avoid fine-grained peripheral polling from high-performance cores.
104
+
Use the following instead:
105
+
106
+
* DMA transfers initiated by auxiliary cores.
107
+
* Hardware-trigger chains (PPI/DPPI) where possible to reduce wake-ups.
108
+
* Keep high-speed power domains off unless necessary for bursts of compute.
109
+
110
+
DMA locality constraints
111
+
------------------------
112
+
113
+
Local DMA controllers (for example, per-domain ECDMA instances) are restricted to source/destination addresses within their local RAM range.
114
+
Plan buffer placement accordingly:
115
+
116
+
* Peripheral DMA to/from local domain RAM only.
117
+
* Cross-domain transfers should use the following:
118
+
119
+
* IPC messages indicating buffer readiness.
120
+
* Explicit software copy (only for infrequent cases).
121
+
* Avoid placing frequent DMA targets in global RAM (MRAM).
122
+
Use retained local RAM to keep transfers local and reduce inter-domain wake-ups and bus activity.
123
+
124
+
System-off entry prerequisites and wake-up sources
To reach the lowest power (system-off) state, all non-essential wake-up capable peripherals must be disabled.
128
+
Only a limited set of wake-up sources should remain enabled.
129
+
Retention of selected RAM blocks is optional and increases leakage.
130
+
Retain only what is required for fast resume.
131
+
132
+
Typical system-off wake-up sources are the following:
133
+
134
+
* Port **0** GPIO (configured for wake-up, always powered pad group)
135
+
* GRTC compare / channel event
136
+
* LPCOMP (low-power comparator)
137
+
* NFC field detection
138
+
* USB power presence (VBUS connect/disconnect)
139
+
* (Optional) Specific voltage detect events
140
+
141
+
To optimize system-off entry, do the following:
142
+
143
+
* Before requesting system-off, disable or runtime-suspend all other devices to allow hardware to drop unused power domains.
144
+
* Audit enabled interrupts.
145
+
Any enabled interrupt tied to an active peripheral can prevent deep low-power entry.
146
+
* Use runtime PM (using :kconfig:option:`CONFIG_PM_DEVICE_RUNTIME` and the ``zephyr,pm-device-runtime-auto`` DTS node) to guarantee peripherals are suspended before system-off.
147
+
* Ensure that only the required GPIOs remain configured with sense settings.
148
+
Remove sense from unused pins.
149
+
150
+
The following is an example sequence:
151
+
152
+
1. Flush any pending work and commit the application context to the retained low-leakage RAM.
153
+
#. Suspend peripherals (runtime PM).
154
+
#. Configure minimal wake-up sources (for example, one GRTC channel and a GPIO).
155
+
#. Request system-off (``pm_state_force`` or appropriate API).
156
+
#. On wake, the bootloader resumes and the application restores context.
157
+
If MCUboot Suspend-to-RAM (S2RAM) is enabled, the MCUboot S2RAM path handles the resume process.
158
+
159
+
Local vs global wake-up planning
160
+
--------------------------------
161
+
162
+
On local domain wake-ups (suspend-to-RAM / suspend-to-idle), schedule GRTC events early enough to cover the following latencies:
On system-off wake-ups, System Controller advances the global wake event to hide warm boot latency from local software.
168
+
For timing purposes, treat system-off restore similarly to local-off restore.
169
+
170
+
Integration checklist
171
+
---------------------
172
+
173
+
For optimal power management integration, follow these guidelines:
174
+
175
+
* Place time-critical ISR code and frequently used data structures in local RAM sections (see code/data relocation).
176
+
* Profile cache miss sources.
177
+
Reduce MRAM fetches by relocating hot code paths.
178
+
* Disable MRAM latency manager (set :kconfig:option:`CONFIG_MRAM_LATENCY` to ``n`` and :kconfig:option:`CONFIG_MRAM_LATENCY_AUTO_REQ` to ``n``) to allow MRAM power gating.
179
+
* Ensure DVFS settings are evaluated across workloads.
180
+
Lowest or middle frequency often yields best energy/operation for periodic tasks.
181
+
* Consolidate periodic tasks (sensor sample, radio tick) to a shared 1 ms or coarser schedule to avoid fragmented wake-ups.
182
+
183
+
.. note::
184
+
The exact wake-up source list can evolve with silicon revisions. Always verify against the current SoC datasheet and release notes.
0 commit comments