Skip to content

Commit f07dcd1

Browse files
FrancescoSernordicjm
authored andcommitted
doc: Added 54H PPR userguide
Added 54H PPR userguide Signed-off-by: Francesco Domenico Servidio <[email protected]>
1 parent 4e10804 commit f07dcd1

File tree

3 files changed

+172
-24
lines changed

3 files changed

+172
-24
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
@@ -40,4 +40,5 @@ Zephyr and the |NCS| provide support and contain board definitions for developin
4040
ug_nrf54h20_debugging
4141
ug_nrf54h20_custom_pcb
4242
ug_nrf54h20_flpr
43+
ug_nrf54h20_ppr
4344
../nrf54l/zms.rst

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

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,7 @@ Working with the FLPR core
77
:local:
88
:depth: 2
99

10-
.. note::
11-
The FLPR core support in the |NCS| is currently :ref:`experimental<software_maturity>`.
12-
13-
The nRF54H20 SoC includes a dedicated VPR CPU, based on RISC-V architecture, known as the *fast lightweight peripheral processor* (FLPR).
14-
The FLPR core can be used to manage specific peripherals through the appropriate Zephyr Device Driver API.
10+
The nRF54H20 SoC includes a dedicated VPR CPU, based on RISC-V architecture, known as the *Fast Lightweight Peripheral Processor* (FLPR).
1511
These peripherals have IRQs routed to FLPR:
1612

1713
* USBHS
@@ -56,20 +52,15 @@ Memory allocation
5652
*****************
5753

5854
Running the FLPR CPU can lead to increased latency when accessing ``RAM_21``.
59-
To mitigate this, you should use ``RAM_21`` exclusively for FLPR code, FLPR data, and non-time-sensitive information from the application CPU.
60-
For data that requires strict access times, such as CPU data used in low-latency ISRs, you should use local RAM or, when greater latency is acceptable, ``RAM_0x``.
61-
The DMA buffers should be placed in memory designed to a given peripheral.
62-
63-
.. _building_nrf54h:
55+
To mitigate this, use ``RAM_21`` exclusively for FLPR code, FLPR data, and non-time-sensitive information from the application CPU.
56+
For data that requires strict access times, such as CPU data used in low-latency Interrupt Service Routines (ISRs), use local RAM or, when greater latency is acceptable, ``RAM_0x``.
57+
Place the DMA buffers in a memory designed to a given peripheral.
6458

6559
Building and programming with the nRF54H20 DK
6660
*********************************************
6761

68-
.. note::
69-
The FLPR core support in the |NCS| is currently :ref:`experimental<software_maturity>`.
70-
71-
Depending on the sample, you may need to program only the application core or both the FLPR and application cores.
72-
Additionally, the process will vary depending on whether you are working with a single-image or multi-image build.
62+
Depending on the sample, you might need to program only the application core or both the FLPR and application cores.
63+
Additionally, the process varies depending on whether you are working with a single-image or multi-image build.
7364

7465
.. note::
7566
The following instructions do not cover the scenario of multi-image single-core builds.
@@ -100,13 +91,13 @@ The FLPR core supports two variants:
10091
Standard build
10192
--------------
10293

103-
This subsection explains how to build an application using :ref:`sysbuild <configuration_system_overview_sysbuild>`.
94+
This section explains how to build an application using :ref:`sysbuild <configuration_system_overview_sysbuild>`.
10495

10596
.. note::
10697
Currently, the documentation does not provide specific instructions for building an application image using sysbuild to incorporate the FLPR core as a sub-image.
10798
The only documented scenario involves building the FLPR as the main image and the application as a sub-image.
10899

109-
Follow these steps to complete the build:
100+
To complete the build, do the following:
110101

111102
.. tabs::
112103

@@ -144,11 +135,6 @@ Depending on the method you select, complete the following steps:
144135

145136
.. group-tab:: nRF Connect for VS Code
146137

147-
.. note::
148-
149-
The |nRFVSC| currently offers experimental support for the nrf54h20's FLPR core.
150-
Certain features, particularly debugging, may not function as expected.
151-
152138
.. include:: /includes/vsc_build_and_run.txt
153139

154140
3. Build the application image by configuring the following options:
@@ -175,7 +161,7 @@ Depending on the method you select, complete the following steps:
175161
176162
west build -p -b nrf54h20dk/nrf54h20/cpuapp -S nordic-flpr --no-sysbuild
177163
178-
#. Program the application core image by running the `west flash` command :ref:`without --erase <programming_params_no_erase>`.
164+
#. Program the application core image by running the ``west flash`` command :ref:`without --erase <programming_params_no_erase>`.
179165

180166
.. code-block:: console
181167
@@ -189,7 +175,7 @@ Depending on the method you select, complete the following steps:
189175
190176
You can customize the command for additional options by adding :ref:`build parameters <optional_build_parameters>`.
191177

192-
#. Once the FLPR core image is successfully built, program it by running the `west flash` command :ref:`without --erase <programming_params_no_erase>`.
178+
#. Once the FLPR core image is successfully built, program it by running the ``west flash`` command :ref:`without --erase <programming_params_no_erase>`.
193179

194180
.. code-block:: console
195181
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
.. _ug_nrf54h20_ppr:
2+
3+
Working with the PPR core
4+
#########################
5+
6+
.. contents::
7+
:local:
8+
:depth: 2
9+
10+
The nRF54H20 SoC includes a dedicated VPR CPU, based on RISC-V architecture, known as the *Peripheral Processor* (PPR).
11+
12+
.. _vpr_ppr_nrf54h20_initiating:
13+
14+
Using Zephyr multithreaded mode on PPR
15+
**************************************
16+
17+
The PPR core can operate as a general-purpose core, running under the full Zephyr kernel.
18+
Building the PPR target is similar to building the application core, but the application core build must include an overlay that enables the PPR core.
19+
20+
Bootstrapping the PPR core
21+
==========================
22+
23+
The |NCS| provides a PPR snippet that adds the overlay needed for bootstrapping the PPR core.
24+
The primary purpose of this snippet is to enable the transfer of the PPR code to the designated memory region (if required) and to initiate the PPR core.
25+
26+
When building for the ``nrf54h20dk/nrf54h20/cpuppr`` target, a minimal sample is automatically loaded onto the application core.
27+
For more details, see :ref:`building_nrf54h_app_ppr_core`.
28+
29+
Memory allocation
30+
*****************
31+
32+
Running the PPR CPU can lead to increased latency when accessing ``RAM_30``.
33+
To mitigate this, use ``RAM_30`` exclusively for PPR code, PPR data, and non-time-sensitive data from the application CPU.
34+
If both ``RAM_30`` and ``RAM_31`` are available, prefer using ``RAM_31`` to avoid memory access latency caused by the PPR.
35+
For data that requires strict access times, such as CPU data used in low-latency Interrupt Service Routines (ISRs), use local RAM, or ``RAM_0x`` when higher latency is acceptable.
36+
Place the DMA buffers in a memory designed to a given peripheral.
37+
38+
Building and programming with the nRF54H20 DK
39+
*********************************************
40+
41+
Depending on the sample, you might need to program only the application core or both the PPR and application cores.
42+
Additionally, the process varies depending on whether you are working with a single-image or multi-image build.
43+
44+
.. note::
45+
The following instructions do not cover the scenario of multi-image single-core builds.
46+
47+
Building for the application core only
48+
======================================
49+
50+
Building for the application core follows the default building process for the |NCS|.
51+
For detailed instructions, refer to the :ref:`building` page.
52+
53+
.. _building_nrf54h_app_ppr_core:
54+
55+
Building for both the application and PPR core
56+
===============================================
57+
58+
Building for both the application core and the PPR core differs from the default |NCS| procedure.
59+
Additional configuration is required to enable the PPR core.
60+
61+
This section explains how to build and program both cores, covering separate builds and sysbuild configurations.
62+
The PPR core supports two variants:
63+
64+
* ``nrf54h20dk/nrf54h20/cpuppr``: PPR runs from ``RAM_30`` (recommended method).
65+
The application core image must include the ``nordic-ppr`` :ref:`snippet <app_build_snippets>`.
66+
67+
* ``nrf54h20dk/nrf54h20/cpuppr/xip``: PPR runs from MRAM.
68+
The application core image must include the ``nordic-ppr-xip`` snippet.
69+
70+
Standard build
71+
--------------
72+
73+
This section explains how to build an application using :ref:`sysbuild <configuration_system_overview_sysbuild>`.
74+
75+
.. note::
76+
Currently, the documentation does not provide specific instructions for building an application image using sysbuild to incorporate the PPR core as a sub-image.
77+
The only documented scenario involves building the PPR as the main image and the application as a sub-image.
78+
79+
To complete the build, do the following:
80+
81+
.. tabs::
82+
83+
.. group-tab:: Using minimal sample for VPR bootstrapping
84+
85+
This option automatically programs the PPR core with :ref:`dedicated bootstrapping firmware <vpr_ppr_nrf54h20_initiating>`.
86+
87+
To build and flash both images, run the following command to perform a :ref:`pristine build <zephyr:west-building>`:
88+
89+
.. code-block:: console
90+
91+
west build -p -b nrf54h20dk/nrf54h20/cpuppr
92+
west flash
93+
94+
.. group-tab:: Using an application that supports multi-image builds
95+
96+
If your application involves creating custom images for both the application core and the PPR core, disable the VPR bootstrapping sample by setting the ``SB_CONFIG_VPR_LAUNCHER`` option to ``n`` when building for the PPR target.
97+
For more details, see :ref:`how to configure Kconfig <configuring_kconfig>`.
98+
99+
To build and flash both images, run the following command to perform a :ref:`pristine build <zephyr:west-building>`:
100+
101+
.. code-block:: console
102+
103+
west build -p -b nrf54h20dk/nrf54h20/cpuppr -- -DSB_CONFIG_VPR_LAUNCHER=n
104+
west flash
105+
106+
Separate images
107+
---------------
108+
109+
You can build and program the application sample and the PPR sample as separate images using either the |nRFVSC| or the command line.
110+
Refer to `nRF Util`_ documentation for instructions on using nRF Util.
111+
Depending on the method you select, complete the following steps:
112+
113+
.. tabs::
114+
115+
.. group-tab:: nRF Connect for VS Code
116+
117+
.. include:: /includes/vsc_build_and_run.txt
118+
119+
3. Build the application image by configuring the following options:
120+
121+
* Set the Board target to ``nrf54h20dk/nrf54h20/cpuapp``.
122+
* Select either the ``nordic-ppr`` or ``nordic-ppr-xip`` snippet, depending on the PPR image target.
123+
* Set System build to :guilabel:`No sysbuild`.
124+
125+
For more information, see :ref:`cmake_options`.
126+
127+
#. Build the PPR image by configuring the following options:
128+
129+
* Set the Board target to ``nrf54h20dk/nrf54h20/cpuppr`` (recommended) or ``nrf54h20dk/nrf54h20/cpuppr/xip``.
130+
* Set System build to :guilabel:`No sysbuild`.
131+
132+
For more information, see :ref:`cmake_options`.
133+
134+
.. group-tab:: Command Line
135+
136+
1. |open_terminal_window_with_environment|
137+
#. Build the application core image, and based on your build target, include the appropriate snippet:
138+
139+
.. code-block:: console
140+
141+
west build -p -b nrf54h20dk/nrf54h20/cpuapp -S nordic-ppr --no-sysbuild
142+
143+
#. Program the application core image by running the ``west flash`` command :ref:`without --erase <programming_params_no_erase>`.
144+
145+
.. code-block:: console
146+
147+
west flash
148+
149+
#. Build the PPR core image:
150+
151+
.. code-block:: console
152+
153+
west build -p -b nrf54h20dk/nrf54h20/cpuppr --no-sysbuild
154+
155+
You can customize the command for additional options by adding :ref:`build parameters <optional_build_parameters>`.
156+
157+
#. Once the PPR core image is successfully built, program it by running the ``west flash`` command :ref:`without --erase <programming_params_no_erase>`.
158+
159+
.. code-block:: console
160+
161+
west flash

0 commit comments

Comments
 (0)