Skip to content

Commit 2825232

Browse files
committed
doc: review p2
sEMMC nRF54H porting guide includes sQSPI small changes Signed-off-by: Anna Wojdylo <[email protected]>
1 parent 80f2cd9 commit 2825232

File tree

2 files changed

+55
-58
lines changed

2 files changed

+55
-58
lines changed

softperipheral/doc/sEMMC/semmc_nrf54H_series_porting_v0_1_0.rst

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@ This structure shows the relevant files and directories in the `sdk-nrfxlib`_ re
4040
└── nrf_semmc.c
4141
4242
.. note::
43-
The main interface for sEMMC is the :file:`nrf_semmc.h` file. It contains a list of supported and tested EMMC commands.
43+
The main interface for sEMMC is in the :file:`nrf_semmc.h` file.
44+
It contains a list of supported and tested EMMC commands.
4445

4546
Header files
4647
============
4748

48-
For an sEMMC application to function correctly, it requires specific header files used by the driver code.
49+
sEMMC application requires specific header files used by the driver code.
4950
You must include paths to these files in the build environment's list of include paths.
5051
The following list is a detailed breakdown of the necessary paths:
5152

@@ -55,7 +56,7 @@ The following list is a detailed breakdown of the necessary paths:
5556
* :file:`softperipheral/sEMMC/include` - sEMMC register interface and driver header
5657
* :file:`softperipheral/sEMMC/include/nrf54h` - The sEMMC firmware for the Fast Lightweight Perpipheral Processor (FLPR)
5758

58-
To override the configuration enums in :file:`nrf_config_semmc.h`, you can use the ``zephyr_compile_definitions`` macro in your application:
59+
To override the configuration enums in :file:`nrf_config_semmc.h`, use the ``zephyr_compile_definitions`` macro in your application:
5960

6061
.. code-block:: c
6162
@@ -65,18 +66,16 @@ To override the configuration enums in :file:`nrf_config_semmc.h`, you can use t
6566
Compiling source files
6667
======================
6768

68-
For an sEMMC application to function properly, you must compile the driver implementation from the source file :file:`nrf_semmc.c`.
69+
For a sEMMC application to function properly, you must compile the driver implementation from the source file :file:`nrf_semmc.c`.
6970

7071
Application core and FLPR configuration
7172
***************************************
7273

7374
You must adjust the settings for the nRF54H Series SoC to run at highest base clock frequency.
7475

75-
To work with any of the following settings, ensure you have completed the following:
76-
77-
* You have allocated memory for the data pointers used by the sEMMC driver.
78-
The memory is independent from the one outlined in the :ref:`semmc_nrf54H_series_porting_guide_ram_configuration` subsection.
79-
It is designated to function as shared memory for communication purposes, rather than containing the sEMMC executable code.
76+
To work with any of the following settings, ensure you have allocated memory for the data pointers used by the sEMMC driver.
77+
The memory is independent from the one outlined in the :ref:`semmc_nrf54H_series_porting_guide_ram_configuration` subsection.
78+
It is designated to function as shared memory for communication purposes, rather than containing the sEMMC executable code.
8079

8180
Security configuration
8281
======================
@@ -144,21 +143,22 @@ The following options are available, assuming that the FLPR core has access to t
144143
Configuring pins
145144
================
146145

147-
In some cases you might have to modify the sEMMC driver configuration.
148-
For example, when changing pin drive strength to guarantee signal integrity for a new PCB design.
146+
In some cases, you might have to modify the sEMMC driver configuration.
147+
For example, you might need to change the pin drive strength to guarantee signal integrity for a new PCB design.
149148
You must address these cases on the sEMMC application code.
150149

151150
.. note::
152151
When using a custom PCB with the nRF54H20 device you might need to match the output impedance on the port you are using.
153-
Refer to `this page <https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_custom_pcb.html>`__ for configuring your application for this use case.
152+
Refer to the :ref:`ug_nrf54h20_custom_pcb` page for details.
154153

155154
GPIO multiplexing must be handled by setting the correct ``CTRLSEL`` value in UICR.
156155

157-
Any conflicting peripherals and existing memory partitions on the same port as sEMMC must be disabled in the overlay depending on your needs.
158-
A code snippet of a devicetree overlay to give FLPR access to the pins follows below. First in the snippet, the `pinctrl` block
159-
does GPIO configuration, setting up the pins as described in :ref:`semmc_nrf54h_series_porting_guide_gpio_config`.
160-
The `cpuflpr_vpr` block and the following block will do the memory partitioning of VPR and the RAM used by sEMMC.
156+
Any conflicting peripherals and existing memory partitions on the same port as sEMMC must be disabled in the devicetree overlay, depending on your requirements.
157+
See an example code snippet of a devicetree overlay that grants FLPR access to the necessary pins.
158+
159+
The first part of the snippet, the ``pinctrl`` block, configures the relevant GPIOs as described in the :ref:`semmc_nrf54h_series_porting_guide_gpio_config` section.
161160

161+
Next, the ``cpuflpr_vpr`` block and the subsequent block handle the allocation of the VPR memory region and the RAM used by sEMMC.
162162

163163
.. code-block:: dts
164164
@@ -234,7 +234,7 @@ The `cpuflpr_vpr` block and the following block will do the memory partitioning
234234
};
235235
};
236236
237-
You will need the following lines in your application to apply the pin configuration from your sEMMC board DTS overlay, as well as to initialize the soft peripheral:
237+
You will need the following lines in your application to apply the pin configuration from your sEMMC board DTS overlay, as well as to initialize the Soft Peripheral:
238238

239239
.. code-block:: c
240240
@@ -258,11 +258,10 @@ RAM configuration
258258
The sEMMC Soft Peripheral operates from RAM.
259259

260260
.. note::
261-
Position Independent Code (PIC) is supported for sEMMC.
262-
This allows an application to determine where to load the Soft Peripheral firmware.
261+
sEMMC supports Position Independent Code (PIC), which allows an application to determine where to load the Soft Peripheral firmware.
263262

264263
Your build environment must reserve the required RAM and ensure that it is readable and writable by both the application core and the FLPR core.
265-
This table details the memory region, which should be non-cacheable:
264+
The following table details the memory region, which should be non-cacheable:
266265

267266
.. list-table:: RAM Configuration Table
268267
:widths: auto
@@ -272,32 +271,31 @@ This table details the memory region, which should be non-cacheable:
272271
- Address offset
273272
- Size
274273
* - sEMMC firmware
275-
- `SP_FIRMWARE_ADDR`
274+
- ``SP_FIRMWARE_ADDR``
276275
- 0x3740
277276
* - sEMMC execution RAM
278-
- `SP_FIRMWARE_ADDR` + 0x3740
277+
- ``SP_FIRMWARE_ADDR`` + 0x3740
279278
- 0x600
280279
* - sEMMC virtual register interface
281-
- `SP_FIRMWARE_ADDR` + 0x3D40
280+
- ``SP_FIRMWARE_ADDR`` + 0x3D40
282281
- 0x200
283282
* - Context saving
284283
- 0x2f890000
285284
- 0x200 (but the entire block should be retained)
286285

287-
The build environment described in the :ref:`semmc_nrf54h_series_porting_guide_code` section must comply with these requirements.
286+
The build environment described in the :ref:`semmc_nrf54h_series_porting_guide_code` section, you must comply with these requirements.
288287
This includes proper settings in linker scripts, device tree specifications (DTS), and resource allocation.
289288

290289
Ensure that ``SP_FIRMWARE_ADDR`` is set so that it does not overlap with the context saving address.
291-
For nRF54H Series devices the firmware has been tested with values after the context saving address. This means that
292-
``SP_FIRMWARE_ADDR`` is a higher value than the context saving address plus the context saving offset.
293-
294-
``SP_FIRMWARE_ADDR`` has been tested and is considered production-ready for value ``0x2f890200``.
290+
For nRF54H Series devices, the firmware has been tested using values that follow the context saving address.
291+
This means, that ``SP_FIRMWARE_ADDR`` should be set higher than the context saving address plus the context saving offset.
292+
The value ``0x2f890200`` for ``SP_FIRMWARE_ADDR`` has been tested and is considered production-ready.
295293

296294

297295
IRQ connection
298296
**************
299297

300-
For sEMMC to communicate with the application core, the sEMMC IRQ handler must be registered.
298+
For sEMMC to communicate with the application core, the sEMMC IRQ handler must be registered.
301299
The following code line registers the IRQ handler to FLPR:
302300

303301
.. code-block:: c
@@ -310,10 +308,12 @@ The following code line registers the IRQ handler to FLPR:
310308
Read responses
311309
**************
312310

313-
sEMMC is not able to process read data and response at the same time, as mentioned in :ref:`semmc_limitations`. There are a couple of things that can be done to mitigate this.
311+
sEMMC cannot process read data and response at the same time (see the :ref:`semmc_limitations`).
312+
However, you can mitigate it in the following ways:
314313

315-
The preferred way to do reads is to first do the read as normal and process the response with :c:var:`nrf_semmc_config_t.process_response` set to `NRF_EMMC_RESPONSE_PROC_PROCESS`.
316-
The response is returned in :c:var:`nrf_semmc_cmd_desc_t.err`. If the response is `NRF_SEMMC_SUCCESS` the read was successful. If any other response is returned, you would
317-
need to do a second read and ignore the response with :c:var:`nrf_semmc_config_t.process_response` set to `NRF_EMMC_RESPONSE_PROC_IGNORE`.
314+
* The recommended way is to perform the read operation with the :c:var:`nrf_semmc_config_t.process_response` variable set to ``NRF_EMMC_RESPONSE_PROC_PROCESS``.
315+
The response is available in the :c:var:`nrf_semmc_cmd_desc_t.err` variable.
316+
If the response is ``NRF_SEMMC_SUCCESS``, the read was successful.
317+
If you receive a different response, retry the read operation, this time with the :c:var:`nrf_semmc_config_t.process_response` variable set to ``NRF_EMMC_RESPONSE_PROC_IGNORE``.
318318

319-
The other is doing the wanted read command first with :c:var:`nrf_semmc_config_t.process_response` set to `NRF_EMMC_RESPONSE_PROC_IGNORE` followed by a CMD13 to ensure the status is correct.
319+
* Alternatively, you can perform the read operation with the :c:var:`nrf_semmc_config_t.process_response` variable set to ``NRF_EMMC_RESPONSE_PROC_IGNORE``, and then follow it with a CMD13 command to verify if the status is correct.

softperipheral/doc/sQSPI/sqspi_nrf54H_series_porting_v1_2_0.rst

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,9 @@ Application core and FLPR configuration
7373

7474
You must adjust the settings for the nRF54H Series SoC to run at highest base clock frequency.
7575

76-
To work with any of the following settings, ensure you have completed the following:
77-
78-
* You have allocated memory for the data pointers used by the sQSPI driver.
79-
The memory is independent from the one outlined in the :ref:`nrf54H_series_porting_guide_ram_configuration` subsection.
80-
It is designated to function as shared memory for communication purposes, rather than containing the sQSPI executable code.
76+
To work with any of the following settings, ensure you have allocated memory for the data pointers used by the sQSPI driver.
77+
The memory is independent from the one outlined in the :ref:`nrf54H_series_porting_guide_ram_configuration` subsection.
78+
It is designated to function as shared memory for communication purposes, rather than containing the sQSPI executable code.
8179

8280
Security configuration
8381
======================
@@ -195,12 +193,12 @@ The following options are available, assuming that the FLPR core has access to t
195193
Configuring pins
196194
================
197195

198-
In some cases you might have to modify the sQSPI driver configuration.
199-
For example, when changing pin drive strength to guarantee signal integrity for a new PCB design.
196+
In some cases, you might have to modify the sQSPI driver configuration.
197+
For example, you might need to change the pin drive strength to guarantee signal integrity for a new PCB design.
200198

201199
.. note::
202200
When using a custom PCB with the nRF54H20 device you might need to match the output impedance on the port you are using.
203-
Refer to `this page <https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/nrf54h/ug_nrf54h20_custom_pcb.html>`__ for configuring your application for a custom PCB.
201+
Refer to the :ref:`ug_nrf54h20_custom_pcb` page for details.
204202

205203
You must address these cases on the sQSPI application code:
206204

@@ -213,11 +211,12 @@ GPIO multiplexing must be handled by setting the correct ``CTRLSEL`` value in UI
213211

214212
Additionally, the sQSPI application requires FastPad bias configuration to run at high frequency on SCLK.
215213

216-
Any conflicting peripherals and existing memory partitions on the same port as sQSPI must be disabled in the overlay depending on your needs.
217-
An example code snippet of a devicetree overlay to give FLPR access to the pins on port P7 follows below. First in the snippet, the `pinctrl` block
218-
does GPIO configuration, setting up the pins as described in :ref:`sqspi_nrf54h_series_porting_guide_gpio_config`.
219-
The `cpuflpr_vpr` block and the following block will do the memory partitioning of VPR and the RAM used by sQSPI.
214+
Any conflicting peripherals and existing memory partitions on the same port as sQSPI must be disabled in the devicetree overlay, depending on your requirements.
215+
See an example code snippet of a devicetree overlay that grants FLPR access to the **P7** port.
216+
217+
The first part of the snippet, the ``pinctrl`` block, configures the relevant GPIOs as described in the :ref:`sqspi_nrf54h_series_porting_guide_gpio_config` section.
220218

219+
Next, the ``cpuflpr_vpr`` block and the subsequent block handle the allocation of the VPR memory region and the RAM used by sQSPI.
221220

222221
.. code-block:: dts
223222
@@ -297,7 +296,7 @@ The `cpuflpr_vpr` block and the following block will do the memory partitioning
297296
};
298297
299298
300-
You will need the following lines in your application to apply the pin configuration from your sQSPI board DTS overlay, as well as to initialize the soft peripheral:
299+
You will need the following lines in your application to apply the pin configuration from your sQSPI board DTS overlay, as well as to initialize the Soft Peripheral:
301300

302301
.. code-block:: c
303302
@@ -321,11 +320,10 @@ RAM configuration
321320
The sQSPI Soft Peripheral operates from RAM.
322321

323322
.. note::
324-
Starting from sQSPI 1.0.0, Position Independent Code (PIC) is supported.
325-
This allows an application to determine where to load the Soft Peripheral firmware.
323+
Starting from sQSPI 1.0.0, sQSPI supports Position Independent Code (PIC), which allows an application to determine where to load the Soft Peripheral firmware.
326324

327325
Your build environment must reserve the required RAM and ensure that it is readable and writable by both the application core and the FLPR core.
328-
This table details the memory region, which should be non-cacheable:
326+
The following table details the memory region, which should be non-cacheable:
329327

330328
.. list-table:: RAM Configuration Table
331329
:widths: auto
@@ -335,26 +333,25 @@ This table details the memory region, which should be non-cacheable:
335333
- Address offset
336334
- Size
337335
* - sQSPI firmware
338-
- `SP_FIRMWARE_ADDR`
336+
- ``SP_FIRMWARE_ADDR``
339337
- 0x3740
340338
* - sQSPI execution RAM
341-
- `SP_FIRMWARE_ADDR` + 0x3740
339+
- ``SP_FIRMWARE_ADDR`` + 0x3740
342340
- 0x400
343341
* - sQSPI virtual register interface
344-
- `SP_FIRMWARE_ADDR` + 0x3B40
342+
- ``SP_FIRMWARE_ADDR`` + 0x3B40
345343
- 0x200
346344
* - Context saving
347345
- 0x2f890000
348346
- 0x200 (but the entire block should be retained)
349347

350-
The build environment described in the :ref:`nrf54h_series_porting_guide_code` section must comply with these requirements.
348+
The build environment described in the :ref:`nrf54h_series_porting_guide_code` section, you must comply with these requirements.
351349
This includes proper settings in linker scripts, device tree specifications (DTS), and resource allocation.
352350

353351
Ensure that ``SP_FIRMWARE_ADDR`` is set so that it does not overlap with the context saving address.
354-
For nRF54H Series devices the firmware has been tested with values after the context saving address. This means that
355-
``SP_FIRMWARE_ADDR`` is a higher value than the context saving address plus the context saving offset.
356-
357-
``SP_FIRMWARE_ADDR`` has been tested and is considered production-ready for value ``0x2f890200``.
352+
For nRF54H Series devices, the firmware has been tested using values that follow the context saving address.
353+
This means, that ``SP_FIRMWARE_ADDR`` should be set higher than the context saving address plus the context saving offset.
354+
The value ``0x2f890200`` for ``SP_FIRMWARE_ADDR`` has been tested and is considered production-ready.
358355

359356
IRQ connection
360357
**************

0 commit comments

Comments
 (0)