Skip to content

Commit 8cb21c9

Browse files
FrancescoSerrlubos
authored andcommitted
doc: Added 54H FLPR documentation
Added 54H FLPR documentation. Signed-off-by: Francesco Domenico Servidio <[email protected]>
1 parent 35f5a4b commit 8cb21c9

File tree

2 files changed

+178
-0
lines changed

2 files changed

+178
-0
lines changed

doc/nrf/app_dev/device_guides/nrf54h.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ Zephyr and the |NCS| provide support and contain board definitions for developin
3939
working_with_nrf/nrf54h/ug_nrf54h20_logging
4040
working_with_nrf/nrf54h/ug_nrf54h20_debugging
4141
working_with_nrf/nrf54h/ug_nrf54h20_custom_pcb
42+
working_with_nrf/nrf54h/ug_nrf54h20_flpr
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
.. _ug_nrf54h20_flpr:
2+
3+
Working with the FLPR core
4+
##########################
5+
6+
.. contents::
7+
:local:
8+
:depth: 2
9+
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:
15+
16+
* UARTE120
17+
* GPIO
18+
19+
.. _vpr_flpr_nrf54h20_initiating:
20+
21+
Using Zephyr multithreaded mode on FLPR
22+
***************************************
23+
24+
The FLPR core can operate as a general-purpose core, running under the full Zephyr kernel.
25+
Building the FLPR target is similar to building the application core, but the application core build must include an overlay that enables the FLPR core.
26+
27+
Bootstrapping the FLPR core
28+
===========================
29+
30+
The |NCS| provides a FLPR snippet that adds the overlay needed for bootstrapping the FLPR core.
31+
The primary purpose of this snippet is to enable the transfer of the FLPR code to the designated memory region (if required) and initiate the FLPR core.
32+
33+
When building for the ``nrf54h20dk/nrf54h20/cpuflpr`` target, a minimal sample is automatically loaded onto the application core.
34+
For more details, see :ref:`building_nrf54h_app_flpr_core`.
35+
36+
Memory allocation
37+
*****************
38+
39+
Running the FLPR CPU can lead to increased latency when accessing ``RAM_21``.
40+
To mitigate this, you should use ``RAM_21`` exclusively for FLPR code, FLPR data, and non-time-sensitive information from the application CPU.
41+
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``.
42+
The DMA buffers should be placed in memory designed to a given peripheral.
43+
44+
.. _building_nrf54h:
45+
46+
Building and programming with the nRF54H20 DK
47+
*********************************************
48+
49+
.. note::
50+
The FLPR core support in the |NCS| is currently :ref:`experimental<software_maturity>`.
51+
52+
Depending on the sample, you may need to program only the application core or both the FLPR and application cores.
53+
Additionally, the process will vary depending on whether you are working with a single-image or multi-image build.
54+
55+
.. note::
56+
The following instructions do not cover the scenario of multi-image single-core builds.
57+
58+
Building for the application core only
59+
======================================
60+
61+
Building for the application core follows the default building process for the |NCS|.
62+
For detailed instructions, refer to the :ref:`building` page.
63+
64+
.. _building_nrf54h_app_flpr_core:
65+
66+
Building for both the application and FLPR core
67+
===============================================
68+
69+
Building for both the application core and the FLPR core differs from the default |NCS| procedure.
70+
Additional configuration is required to enable the FLPR core.
71+
72+
This section explains how to build and program both cores, covering separate builds and sysbuild configurations.
73+
The FLPR core supports two variants:
74+
75+
* ``nrf54h20dk/nrf54h20/cpuflpr``: FLPR runs from RAM_21 (recommended method).
76+
The application core image must include the ``nordic-flpr`` :ref:`snippet <app_build_snippets>`.
77+
78+
* ``nrf54h20dk/nrf54h20/cpuflpr/xip``: FLPR runs from MRAM.
79+
The application core image must include the ``nordic-flpr-xip`` snippet.
80+
81+
Standard build
82+
--------------
83+
84+
This subsection explains how to build an application using :ref:`sysbuild <configuration_system_overview_sysbuild>`.
85+
86+
.. note::
87+
Currently, the documentation does not provide specific instructions for building an application image using sysbuild to incorporate the FLPR core as a sub-image.
88+
The only documented scenario involves building the FLPR as the main image and the application as a sub-image.
89+
90+
Follow these steps to complete the build:
91+
92+
.. tabs::
93+
94+
.. group-tab:: Using minimal sample for VPR bootstrapping
95+
96+
This option automatically programs the FLPR core with :ref:`dedicated bootstrapping firmware <vpr_flpr_nrf54h20_initiating>`.
97+
98+
To build and flash both images, run the following command to perform a :ref:`pristine build <zephyr:west-building>`:
99+
100+
.. code-block:: console
101+
102+
west build -p -b nrf54h20dk/nrf54h20/cpuflpr
103+
west flash
104+
105+
.. group-tab:: Using an application that supports multi-image builds
106+
107+
If your application involves creating custom images for both the application core and the FLPR core, disable the VPR bootstrapping sample by setting the ``SB_CONFIG_VPR_LAUNCHER`` option to ``n`` when building for the FLPR target.
108+
For more details, see :ref:`how to configure Kconfig <configuring_kconfig>`.
109+
110+
To build and flash both images, run the following command to perform a :ref:`pristine build <zephyr:west-building>`:
111+
112+
.. code-block:: console
113+
114+
west build -p -b nrf54h20dk/nrf54h20/cpuflpr -- -DSB_CONFIG_VPR_LAUNCHER=n
115+
west flash
116+
117+
Separate images
118+
---------------
119+
120+
You can build and program the application sample and the FLPR sample as separate images using either the |nRFVSC| or the command line.
121+
To use nRF Util, see `nRF Util`_.
122+
Depending on the method you select, complete the following steps:
123+
124+
.. tabs::
125+
126+
.. group-tab:: nRF Connect for VS Code
127+
128+
.. note::
129+
130+
The |nRFVSC| currently offers experimental support for the nrf54h20's FLPR core.
131+
Certain features, particularly debugging, may not function as expected.
132+
133+
.. include:: /includes/vsc_build_and_run.txt
134+
135+
3. Build the application image by configuring the following options:
136+
137+
* Set the Board target to ``nrf54h20dk/nrf54h20/cpuapp``.
138+
* Select either the ``nordic-flpr`` or ``nordic-flpr-xip`` snippet, depending on the FLPR image target.
139+
* Set System build to :guilabel:`No sysbuild`.
140+
141+
For more information, see :ref:`cmake_options`.
142+
143+
#. Build the FLPR image by configuring the following options:
144+
145+
* Set the Board target to ``nrf54h20dk/nrf54h20/cpuflpr`` (recommended) or ``nrf54h20dk/nrf54h20/cpuflpr/xip``.
146+
* Set System build to :guilabel:`No sysbuild`.
147+
148+
For more information, see :ref:`cmake_options`.
149+
150+
.. group-tab:: Command Line
151+
152+
1. |open_terminal_window_with_environment|
153+
#. Build the application core image, and based on your build target, include the appropriate snippet:
154+
155+
.. code-block:: console
156+
157+
west build -p -b nrf54h20dk/nrf54h20/cpuapp -S nordic-flpr --no-sysbuild
158+
159+
#. Program the application core image by running the `west flash` command :ref:`without --erase <programming_params_no_erase>`.
160+
161+
.. code-block:: console
162+
163+
west flash
164+
165+
#. Build the FLPR core image:
166+
167+
.. code-block:: console
168+
169+
west build -p -b nrf54h20dk/nrf54h20/cpuflpr --no-sysbuild
170+
171+
You can customize the command for additional options by adding :ref:`build parameters <optional_build_parameters>`.
172+
173+
#. Once the FLPR core image is successfully built, program it by running the `west flash` command :ref:`without --erase <programming_params_no_erase>`.
174+
175+
.. code-block:: console
176+
177+
west flash

0 commit comments

Comments
 (0)