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
The clock control management strategy has been updated, align docs
to reflect this. Additionally mention the new
nrf_clock_control_get_startup_time() API and point to the samples
we have in zephyr showing how to use the APIs.
Signed-off-by: Bjarki Arge Andreasen <[email protected]>
Copy file name to clipboardExpand all lines: doc/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_architecture_clockman.rst
+58-4Lines changed: 58 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,6 @@ Each of the clock sources needs proper management for the following reasons:
17
17
Some clock management operations are performed solely by hardware circuits, while others require software intervention.
18
18
Most clocks can be locked to more accurate ones to improve their accuracy.
19
19
20
-
21
20
Clock domains
22
21
*************
23
22
@@ -78,6 +77,59 @@ Global HSFLL
78
77
79
78
Global HSFLL clocks *fast* peripherals, FLPR, RAM, and MRAM blocks.
80
79
80
+
Default configurations
81
+
----------------------
82
+
83
+
The local and global HSFLLs are clocked at their highest frequency by default.
84
+
This ensures that MRAM access is fast and every peripheral is clocked adequately to function on boot.
85
+
86
+
The HFXO is not started.
87
+
88
+
Runtime clock management considerations
89
+
***************************************
90
+
91
+
The clocks are managed at runtime by hardware, using default configurations.
92
+
Firmware can override these configurations to meet specific clock requirements.
93
+
The following sections describe the default configurations and what to consider if overriding them.
94
+
95
+
LFCLK, HFXO and FLL16M
96
+
======================
97
+
98
+
These clocks are fixed frequency, and are by default optimized for low power at the cost of accuracy and precision.
99
+
The firmware can request a minimum level of accuracy and precision using the ``nrf_clock_control`` API provided by Zephyr RTOS, if the default configuration does not meet the required timing specifications.
100
+
101
+
The startup time of these clocks can be relatively long, typically on the order of hundreds of milliseconds.
102
+
To ensure that the clocks meet the required timing constraints, retrieve the startup time for a given accuracy and precision using ``nrf_clock_control_get_startup_time``.
103
+
For more information, see the `Zephyr clock control API`_ section.
104
+
105
+
Global HSFLL
106
+
============
107
+
108
+
The firmware can request this clock to run at a lower frequency than its default of 320 MHz.
109
+
It is recommended to leave this clock at its default frequency.
110
+
Note the following if the frequency is lowered:
111
+
112
+
* The MRAM access latency will be increased, thus lowering overall CPU performance when running code from MRAM.
113
+
This results in the CPU running for longer, thus increasing power consumption.
114
+
Furthermore, ISR handling latency will be increased.
115
+
* Some fast peripherals cannot operate below a certain frequency, thus the application must request a higher frequency before using these fast peripherals.
116
+
* If CAN is used, the Global HSFLL frequency must not be lower than 128 MHz.
117
+
118
+
If the Global HSFLL is managed at runtime, the clock control driver will force it to its lowest frequency.
119
+
The firmware must request a higher frequency using the ``nrf_clock_control`` API.
120
+
121
+
Local HSFLL
122
+
===========
123
+
124
+
The firmware can request this clock to run at a lower frequency than its default.
125
+
It is recommended to leave this clock at its default frequency.
126
+
If the frequency is lowered, the CPU performance will decrease.
127
+
This results in the CPU running for longer, thus increasing power consumption.
128
+
Furthermore, the ISR handling latency will be increased.
129
+
130
+
If the local HSFLL is managed at runtime, the clock control driver will force it to its lowest frequency.
131
+
The firmware must request a higher frequency using the ``nrf_clock_control`` API.
132
+
81
133
Zephyr clock control API
82
134
************************
83
135
@@ -103,10 +155,12 @@ For more details, see the following links:
103
155
104
156
* :ref:`zephyr:clock_control_api`.
105
157
* The following calls in the `Zephyr's nRF clock control API extensions`_ (:file:`include/zephyr/drivers/clock_control/nrf_clock_control.h`):
158
+
* The sample at :file:`zephyr/samples/boards/nordic/clock_control`.
106
159
107
-
* ``nrf_clock_control_request()``: Requests a reservation to use a given clock with specified attributes.
108
-
* ``nrf_clock_control_release()``: Releases a reserved use of a clock.
109
-
* ``nrf_clock_control_cancel_or_release()``: Safely cancels a reservation request.
160
+
* ``nrf_clock_control_request()`` - Requests a reservation to use a given clock with specified attributes.
161
+
* ``nrf_clock_control_release()`` - Releases a reserved use of a clock.
162
+
* ``nrf_clock_control_cancel_or_release()`` - Safely cancels a reservation request.
163
+
* ``nrf_clock_control_get_startup_time()`` - Gets the maximum time for a clock to apply specified attributes.
110
164
111
165
* The following calls in the `clocks devicetree macro API`_ (:file:`include/zephyr/devicetree/clocks.h`):
0 commit comments