Skip to content

Commit aaed735

Browse files
committed
doc: review p3 nrf54l
Reviewed docs for sEMMC peripheral for nRF54L made small adjustments to sQSPI Signed-off-by: Anna Wojdylo <[email protected]>
1 parent 2825232 commit aaed735

File tree

4 files changed

+147
-149
lines changed

4 files changed

+147
-149
lines changed

softperipheral/doc/sEMMC/semmc_nrf54H_series_porting_v0_1_0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ You must address these cases on the sEMMC application code.
149149

150150
.. note::
151151
When using a custom PCB with the nRF54H20 device you might need to match the output impedance on the port you are using.
152-
Refer to the :ref:`ug_nrf54h20_custom_pcb` page for details.
152+
Refer to the :ref:`nrf:ug_nrf54h20_custom_pcb` page for details.
153153

154154
GPIO multiplexing must be handled by setting the correct ``CTRLSEL`` value in UICR.
155155

softperipheral/doc/sEMMC/semmc_nrf54L_series_porting_v0_1_0.rst

Lines changed: 75 additions & 75 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 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 (internal paths) and specific header files for nrfx (external dependencies).
49+
sEMMC application requires specific header files used by the driver code (internal paths) and specific header files for nrfx (external dependencies).
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

@@ -64,7 +65,6 @@ The following list is a detailed breakdown of the necessary paths:
6465
For example, the :file:`nrfx_glue.h`, :file:`nrfx_log.h`, or a configuration header file.
6566
See an example configuration for the :file:`nrfx_config.h` file (valid for all nRF54L Series devices):
6667

67-
6868
.. code-block:: c
6969
7070
#ifndef NRFX_CONFIG_H__
@@ -79,17 +79,15 @@ The following list is a detailed breakdown of the necessary paths:
7979
8080
#endif // NRFX_CONFIG_H__
8181
82-
8382
Compiling source files
8483
======================
8584

86-
For an sEMMC application to function properly, you must compile the driver implementation from the source file, i.e., include :file:`nrf_semmc.c` at the top of your application.
85+
For an sEMMC application to function properly, you must compile the driver implementation from the source file by including :file:`nrf_semmc.c` at the top of your application.
8786

8887
Application core and FLPR configuration
8988
***************************************
9089

9190
You must adjust the settings for the nRF54L Series SoC to run at highest base clock frequency.
92-
9391
To work with any of the following settings, ensure you have completed the following:
9492

9593
* You have allocated memory for the data pointers used by the sEMMC driver.
@@ -196,29 +194,29 @@ This code snippet shows how you can set up these pins in your application:
196194
High speed transfers
197195
====================
198196

199-
To enable communcation at 32MHz on an nRF54L Series device you need to set the bias of the GPIOHSPADCTRL module. The following code snippet shows how you can set the value in your application:
197+
To enable communcation at 32MHz on an nRF54L Series device, you need to set the bias of the GPIOHSPADCTRL module.
198+
The following code snippet shows how you can set the value in your application:
200199

201200
.. code-block:: c
202201
203-
gpiohs_bias_val = 0x2;
202+
gpiohs_bias_val = 0x2;
204203
NRF_GPIOHSPADCTRL->BIAS = gpiohs_bias_val;
205204
206-
207205
Memory retention configuration
208206
******************************
209207

210208
The sEMMC soft peripheral requires RAM retention in order to go into the lowest power consumption mode, which can be called through the :c:func:`nrf_semmc_disable` function.
211209

212210
Assuming there is an access to the peripheral ``MEMCONF``, the following code snippet illustrates how to enable FLPR RAM retention, followed by disabling and re-enabling, and finally how to disable RAM retention:
213211

214-
.. code-block:: c
212+
.. code-block:: c
215213
216-
// Disable sequence
217-
nrf_memconf_ramblock_ret_enable_set(NRF_MEMCONF, 1, MEMCONF_POWER_RET_MEM0_Pos, true);
218-
nrf_semmc_disable(&m_semmc);
219-
// Enable sequence
220-
nrf_semmc_enable(&m_semmc);
221-
nrf_memconf_ramblock_ret_enable_set(NRF_MEMCONF, 1, MEMCONF_POWER_RET_MEM0_Pos, false);
214+
// Disable sequence
215+
nrf_memconf_ramblock_ret_enable_set(NRF_MEMCONF, 1, MEMCONF_POWER_RET_MEM0_Pos, true);
216+
nrf_semmc_disable(&m_semmc);
217+
// Enable sequence
218+
nrf_semmc_enable(&m_semmc);
219+
nrf_memconf_ramblock_ret_enable_set(NRF_MEMCONF, 1, MEMCONF_POWER_RET_MEM0_Pos, false);
222220
223221
.. _semmc_nrf54L_series_porting_guide_ram_configuration:
224222

@@ -231,63 +229,59 @@ The sEMMC Soft Peripheral operates from RAM.
231229
sEMMC supports Position Independent Code (PIC).
232230
This allows an application to determine where to load the Soft Peripheral firmware.
233231

234-
235232
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.
236-
These tables details the memory regions needed for your nRF54L Series device:
237-
238-
239-
.. tabs::
240-
241-
.. tab:: **nRF54L15**
242-
243-
.. list-table:: nRF54L15 RAM Configuration Table
244-
:widths: auto
245-
:header-rows: 1
246-
247-
* - Component
248-
- Address offset
249-
- Size
250-
* - sEMMC firmware
251-
- `SP_FIRMWARE_ADDR`
252-
- 0x3C00
253-
* - sEMMC execution RAM
254-
- `SP_FIRMWARE_ADDR` + 0x3C00
255-
- 0x600
256-
* - sEMMC virtual register interface
257-
- `SP_FIRMWARE_ADDR` + 0x4200
258-
- 0x200
259-
* - Context saving
260-
- 0x2003FE00
261-
- 0x200 (but the entire block should be retained)
262-
263-
.. tab:: **nRF54LM20**
264-
265-
.. list-table:: nRF54LM20 RAM Configuration Table
266-
:widths: auto
267-
:header-rows: 1
268-
269-
* - Component
270-
- Address offset
271-
- Size
272-
* - sEMMC firmware
273-
- `SP_FIRMWARE_ADDR`
274-
- 0x3C00
275-
* - sEMMC execution RAM
276-
- `SP_FIRMWARE_ADDR` + 0x3C00
277-
- 0x600
278-
* - sEMMC virtual register interface
279-
- `SP_FIRMWARE_ADDR` + 0x4200
280-
- 0x200
281-
* - Context saving
282-
- 0x2007FD40
283-
- 0x200 (but the entire block should be retained)
284-
233+
The following table details the memory regions required for your nRF54L Series device:
234+
235+
.. tabs::
236+
237+
.. tab:: **nRF54L15**
238+
239+
.. list-table:: nRF54L15 RAM Configuration Table
240+
:widths: auto
241+
:header-rows: 1
242+
243+
* - Component
244+
- Address offset
245+
- Size
246+
* - sEMMC firmware
247+
- ``SP_FIRMWARE_ADDR``
248+
- 0x3C00
249+
* - sEMMC execution RAM
250+
- ``SP_FIRMWARE_ADDR`` + 0x3C00
251+
- 0x600
252+
* - sEMMC virtual register interface
253+
- ``SP_FIRMWARE_ADDR`` + 0x4200
254+
- 0x200
255+
* - Context saving
256+
- 0x2003FE00
257+
- 0x200 (but the entire block should be retained)
258+
259+
.. tab:: **nRF54LM20**
260+
261+
.. list-table:: nRF54LM20 RAM Configuration Table
262+
:widths: auto
263+
:header-rows: 1
264+
265+
* - Component
266+
- Address offset
267+
- Size
268+
* - sEMMC firmware
269+
- ``SP_FIRMWARE_ADDR``
270+
- 0x3C00
271+
* - sEMMC execution RAM
272+
- ``SP_FIRMWARE_ADDR`` + 0x3C00
273+
- 0x600
274+
* - sEMMC virtual register interface
275+
- ``SP_FIRMWARE_ADDR`` + 0x4200
276+
- 0x200
277+
* - Context saving
278+
- 0x2007FD40
279+
- 0x200 (but the entire block should be retained)
285280

286281
The build environment described in the :ref:`semmc_nrf54l_series_porting_guide_code` section must comply with these requirements.
287282
This includes proper settings in linker scripts, device tree specifications (DTS), and resource allocation.
288283

289-
290-
To initialize the sEMMC struct on an nRF54L Series device you can use the following lines:
284+
To initialize the sEMMC struct on an nRF54L Series device, use the following lines:
291285

292286
.. code-block:: c
293287
@@ -297,8 +291,8 @@ To initialize the sEMMC struct on an nRF54L Series device you can use the follow
297291
static nrf_semmc_t m_semmc = {.p_reg = (void *)SP_REGIF_BASE, .drv_inst_idx = 0};
298292
299293
Ensure that ``SP_FIRMWARE_ADDR`` is set so that it does not overlap with the context saving address.
300-
For nRF54L Series devices the firmware is usually placed before the context saving address. This means that
301-
``SP_FIRMWARE_ADDR`` plus the component sizes in the table above must be a lower value than the context saving address.
294+
For nRF54L Series devices, the firmware is placed before the context saving address.
295+
This means, that ``SP_FIRMWARE_ADDR`` plus the component sizes listed in the table must be of a lower value than the context saving address.
302296

303297
The values in the table below have been tested and are considered production-ready for ``SP_FIRMWARE_ADDR``:
304298

@@ -319,10 +313,16 @@ The values in the table below have been tested and are considered production-rea
319313
Read responses
320314
**************
321315

322-
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.
323316

324-
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`.
325-
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
326-
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`.
317+
Read responses
318+
**************
319+
320+
sEMMC cannot process read data and response at the same time (see the :ref:`semmc_limitations`).
321+
However, you can mitigate it in the following ways:
322+
323+
* 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``.
324+
The response is available in the :c:var:`nrf_semmc_cmd_desc_t.err` variable.
325+
If the response is ``NRF_SEMMC_SUCCESS``, the read was successful.
326+
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``.
327327

328-
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.
328+
* 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ For example, you might need to change the pin drive strength to guarantee signal
198198

199199
.. note::
200200
When using a custom PCB with the nRF54H20 device you might need to match the output impedance on the port you are using.
201-
Refer to the :ref:`ug_nrf54h20_custom_pcb` page for details.
201+
Refer to the :ref:`nrf:ug_nrf54h20_custom_pcb` page for details.
202202

203203
You must address these cases on the sQSPI application code:
204204

0 commit comments

Comments
 (0)