Skip to content

Commit 2d8d429

Browse files
committed
softperipheral: rev d82cfe4cb3c86fc5523268cfc5e46b6c8b989f56
CHANGELOG.rst contains the list of changes. Signed-off-by: Luis David Lopez <[email protected]>
1 parent 3567254 commit 2d8d429

20 files changed

+2193
-2088
lines changed

softperipheral/CHANGELOG.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,13 @@ This is a release that focuses on improving existing soft peripherals.
1616
See the following list of changes:
1717

1818

19+
* Added:
20+
21+
* Position independent code (PIC) for all soft peripheral binaries.
22+
1923
* Bug fixes:
2024

21-
* Fixed higher frequency transfers for Soft Peripheral sQSPI for the nRF54L15 and nRF54H20 SoCs.
25+
* Fixed higher frequency transfers for Soft Peripheral sQSPI for the nRF54L15 SoC.
2226
For details, see the :ref:`sqspi_changelog` page.
2327

2428
nRF Connect SDK v3.0.0

softperipheral/doc/introduction.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,7 @@ The following table shows which soft peripherals and their versions are supporte
4646
- - nRF54L15 SoC:
4747
- v0.1.0 with NCS v3.0.0
4848
- v1.0.0 with NCS v3.1.0
49+
- v1.1.0 with NCS v3.1.0
4950
- nRF54H20 SoC:
5051
- v0.1.0 with NCS v3.0.0
52+
- v1.1.0 with NCS v3.1.0

softperipheral/doc/sQSPI/CHANGELOG.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@ sQSPI changelog
99

1010
All the notable changes to sQSPI are documented on this page.
1111

12+
v1.1.0
13+
******
14+
15+
See the list of changes for the current release.
16+
17+
* Added:
18+
19+
* The following for nRF54L15 devices:
20+
21+
* Fixes on API communication layer
22+
23+
* The following for nRF54H20 devices:
24+
25+
* Fixes for booting bug
26+
* Fixes on API communication layer
27+
1228
v1.0.0
1329
******
1430

softperipheral/doc/sQSPI/README.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@ To better understand the capabilities and limitations of sQSPI, see its comparis
6161
:caption: Subpages:
6262

6363
features.rst
64-
nrf54L15_porting_v1_0_0.rst
65-
nrf54H20_porting_v1_0_0.rst
64+
nrf54L15_porting_v1_1_0.rst
65+
nrf54H20_porting_v1_1_0.rst
66+
display.rst
6667
timing.rst
6768
CHANGELOG.rst
6869
limitations.rst
69-
api_reference_v1_0_0.rst
70+
api_reference.rst
File renamed without changes.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
.. _sqspi_display:
2+
3+
sQSPI and display usage
4+
#######################
5+
6+
sQSPI API provides the data format interface for use with external displays. See :c:var:`nrf_sqspi_data_fmt_t`.
7+
8+
The following parameter combinations have been tested and should be considered production ready:
9+
10+
.. list-table:: sQSPI data format
11+
:widths: auto
12+
:header-rows: 1
13+
14+
* - :c:var:`nrf_sqspi_data_fmt_t.data_padding`
15+
- :c:var:`nrf_sqspi_data_fmt_t.data_container`
16+
- :c:var:`nrf_sqspi_data_fmt_t.data_swap_unit`
17+
* - 0
18+
- 8
19+
- 8
20+
* - 0
21+
- 8
22+
- 0
23+
* - 16
24+
- 16
25+
- 8
26+
* - 0
27+
- 32
28+
- 16
29+
30+
See :ref:`sqspi_limitations` for more information on limitations.
31+
32+
33+
Using external sync bit (tearing effect)
34+
****************************************
35+
36+
sQSPI 1.1.0 can be used alongside some application level processing to send a transfer when a pulse (tearing effect) is detected by either:
37+
38+
* Polling a GPIO pin.
39+
* Setting an interrupt handler liked to an event linked to a specific GPIO pin (access to peripheral ``GPIOTE`` is required for this).
40+
* Forwarding a GPIO event through DPPI towards FLPR task linked to starting a transfer (access to peripheral ``DPPIC`` is required for this, also see :file:`softperipheral/include/softperipheral_regif.h` for the specific task).
41+
42+
You could use the first two options by holding a transfer and starting it when the pulse is detected (using flag ``NRF_SQSPI_FLAG_HOLD_XFER`` in :c:func:`nrf_sqspi_xfer`).

softperipheral/doc/sQSPI/limitations.rst

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,33 @@ When working with sQSPI, you should be aware of the following limitations.
99
:local:
1010
:depth: 2
1111

12-
v1.0.0
12+
v1.1.0
1313
******
1414

1515
Refer to the following detailed descriptions of current limitations:
1616

1717
* sQSPI does not support slave mode operations; it can only operate as a controller (master).
1818
* The sQSPI support for SPI half-duplex setup is implemented but not tested.
19-
* sQSPI SPI modes 1,2, and 3 (see the :c:var:`nrf_sqspi_dev_cfg_t.spi_cpolpha` configuration structure) may present artifacts (delays and clock stretching) on the last SCLK cycle during a transfer.
19+
* sQSPI SPI modes 1,2, and 3 (see the :c:var:`nrf_sqspi_dev_cfg_t.spi_cpolpha` configuration structure) may present artifacts (clock stretching or extra edges) on the last SCLK cycle during a read, this has no effect on data integrity.
2020
* The nrfx API for sQSPI does not support configuring the use of the positive or negative edge of SCLK delayed read sampling.
2121
* sQSPI employs the :c:var:`nrf_sqspi_dev_cfg_t.sample_delay_cyc` parameter as an offset to FLPR's base clock counter , not SLCK clock cycles (see the :c:struct:`nrf_sqspi_dev_cfg_t` struct).
22-
* sQSPI :c:var:`nrf_sqspi_dev_cfg_t.sample_delay_cyc` has a limit:
23-
24-
.. math::
25-
nrf\_sqspi\_dev\_cfg\_t.sample\_delay\_cyc <= \frac{FLPR_{base\_freq}}{2*nrf\_sqspi\_dev\_cfg\_t.sck\_freq\_khz} - 1
26-
22+
* sQSPI :c:var:`nrf_sqspi_dev_cfg_t.sample_delay_cyc` is constrained to either a value of 0 if using ``GPIOHSPADCTRL`` for high speed transfers (see :ref:`nrf54L15_porting_guide_high_speed_transfers`) or a value greater than 0 but lower than that of ``FLPR_counter`` if a high speed transfer is not needed (see :ref:`sqspi_timing`).
2723
* Implementation of sQSPI quad or dual lane for command transmission (for example, ``2_2_2`` and ``4_4_4`` modes) is implemented but has not been tested.
2824
* sQSPI does not support a configurable pin for the CSN line; only **PIN 5** is supported (see :c:var:`nrf_sqspi_dev_cfg_t.csn_pin`).
25+
* :c:var:`nrf_sqspi_xfer_t.p_data` needs to be a pointer with a 32 bit aligned address.
26+
* sQSPI high speed reading cannot happen directly when changing from SPI mode 0 to 3. Either do a high speed write or a slow read (5.8 MHz) in between.
27+
* :c:var:`nrf_sqspi_xfer_t.addr_length` must be greater than :c:var:`nrf_sqspi_dev_cfg_t.mspi_lines`.
28+
29+
* sQSPI will present undefined behavior in the following cases:
30+
* 0 byte reads: :c:var:`nrf_sqspi_xfer_t.dir` set to ``NRF_SQSPI_XFER_DIR_RX`` and :c:var:`nrf_sqspi_xfer_t.data_length` set to 0.
31+
* 0 command bits: :c:var:`nrf_sqspi_xfer_t.cmd_length` set to 0.
32+
* 0 address bits: :c:var:`nrf_sqspi_xfer_t.addr_length` set to 0.
33+
34+
Data format (display use) limitations:
35+
36+
* :c:var:`nrf_sqspi_data_fmt_t.data_bit_reorder_unit` must be set to the same value as :c:var:`nrf_sqspi_data_fmt_t.data_swap_unit`.
37+
* If :c:var:`nrf_sqspi_data_fmt_t.data_padding` is not set to 0: :c:var:`nrf_sqspi_data_fmt_t.data_container` + :c:var:`nrf_sqspi_data_fmt_t.data_padding` must equal 32.
38+
* Combination of :c:var:`nrf_sqspi_data_fmt_t.data_padding` = 24 and :c:var:`nrf_sqspi_data_fmt_t.data_swap_unit` = 8 when ``clkdiv`` equal or less than 6 (see :ref:`sqspi_timing`) and :c:var:`nrf_sqspi_dev_cfg_t.mspi_lines` is ``NRF_SQSPI_SPI_LINES_DUAL_X_Y_2`` or ``NRF_SQSPI_SPI_LINES_QUAD_X_Y_4`` leads to wrong frequency on SCLK.
39+
* The value calculated as 32 - :c:var:`nrf_sqspi_data_fmt_t.data_padding` must be a multiple of :c:var:`nrf_sqspi_data_fmt_t.data_swap_unit`.
40+
* :c:var:`nrf_sqspi_data_fmt_t.data_swap_unit` values 0 and 4, not supported.
41+
* :c:var:`nrf_sqspi_data_fmt_t.data_bit_order` and :c:var:`nrf_sqspi_data_fmt_t.addr_bit_order` don't support value ``NRF_SQSPI_DATA_FMT_BIT_ORDER_LSB_FIRST``.

softperipheral/doc/sQSPI/nrf54H20_porting_v1_0_0.rst renamed to softperipheral/doc/sQSPI/nrf54H20_porting_v1_1_0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ This structure shows the relevant files and directories in the `sdk-nrfxlib`_ re
3131
│ │ └── nrf_qspi2.h
3232
│ ├── nrf54h20
3333
│ │ ├── sqspi_firmware.h
34-
│ │ ├── sqspi_firmware_v1.0.0.h
34+
│ │ ├── sqspi_firmware_v1.1.0.h
3535
│ │ └── ...
3636
│ ├── nrf_config_sqspi.h
3737
│ ├── nrf_sp_qspi.h
3838
│ ├── nrf_sqspi.h
3939
└── src
40-
└── nrfx_qspi2.c
40+
└── nrf_sqspi.c
4141
4242
.. note::
4343
The main interface for sQSPI is the :file:`nrf_sqspi.h` file.

softperipheral/doc/sQSPI/nrf54L15_porting_v1_0_0.rst renamed to softperipheral/doc/sQSPI/nrf54L15_porting_v1_1_0.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This structure shows the relevant files and directories in the `sdk-nrfxlib`_ re
3131
│ │ └── nrf_qspi2.h
3232
│ ├── nrf54l15
3333
│ │ ├── sqspi_firmware.h
34-
│ │ └── sqspi_firmware_v1.0.0.h
34+
│ │ └── sqspi_firmware_v1.1.0.h
3535
│ │ └── ...
3636
│ ├── nrf_config_sqspi.h
3737
│ ├── nrf_sp_qspi.h
@@ -228,11 +228,13 @@ The following code snippet shows how the application code can allocate the requi
228228
}
229229
}
230230
231+
.. _nrf54L15_porting_guide_high_speed_transfers:
232+
231233
High speed transfers
232234
====================
233235

234236
.. warning::
235-
High speed transfers (above 32MHz) on NRF54L15 DK are only supported in sQSPI 1.0.0.
237+
High speed transfers (above 32MHz) on NRF54L15 DK are only supported starting from sQSPI 1.0.0.
236238

237239
A high speed transfer sQSPI application requires both extra high drive strength and access to the peripheral ``GPIOHSPADCTRL`` (GPIO High Speed Pad Control).
238240
The following settings must be changed for ``GPIOHSPADCTRL.BIAS`` and ``GPIOHSPADCTRL.CTRL``:
@@ -412,23 +414,22 @@ The following code snippet shows how the application code can enable and disable
412414
}
413415
414416
.. warning::
415-
High speed transfers are closely tied to API parameter :c:var:`nrf_sqspi_dev_cfg_t.sample_delay_cyc`, which is constrained by the following conditions:
416-
**TODO**
417+
High speed transfers are closely tied to API parameter :c:var:`nrf_sqspi_dev_cfg_t.sample_delay_cyc`, which needs to be set to 0 (see :ref:`sqspi_limitations`).
417418

418419
Memory retention configuration
419420
******************************
420421

421-
The sQSPI soft peripheral requires RAM retention in order to go into the lowest power consumption mode, which can be called through the :c:func:`nrfx_qspi2_deactivate` API.
422+
The sQSPI soft peripheral requires RAM retention in order to go into the lowest power consumption mode, which can be called through the :c:func:`nrf_sqspi_deactivate` API.
422423

423424
Assuming there is an access to the peripheral `MEMCONF`, the following code snippet illustrates how to enable FLPR RAM retention, followed by deactivation and reactivation, and finally how to disable RAM retention:
424425

425426
.. code-block:: c
426427
427428
//Deactivate sequence
428429
nrf_memconf_ramblock_ret_enable_set(NRF_MEMCONF, 1, MEMCONF_POWER_RET_MEM0_Pos, true);
429-
nrfx_qspi2_deactivate(&m_qspi);
430+
nrf_sqspi_deactivate(&m_qspi);
430431
//activate sequence
431-
nrfx_qspi2_activate(&m_qspi);
432+
nrf_qspi_activate(&m_qspi);
432433
nrf_memconf_ramblock_ret_enable_set(NRF_MEMCONF, 1, MEMCONF_POWER_RET_MEM0_Pos, false);
433434
434435
.. _nrf54L15_porting_guide_ram_configuration:

softperipheral/doc/sQSPI/timing.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,28 @@
11
.. _sqspi_timing:
22

3+
sQSPI and FLPR counters
4+
#######################
5+
6+
sQSPI API translates parameter :c:var:`nrf_sqspi_dev_cfg_t.sck_freq_khz` into a value that can be used by FLPR's internal counters.
7+
The translation has the following constraints (assuming the SoC is running at highest base clock frequency):
8+
9+
.. tabs::
10+
11+
.. tab:: **nRF54L15**
12+
.. math::
13+
clkdiv=\frac{128000000}{1000 * nrf\_sqspi\_dev\_cfg\_t.sck\_freq\_khz}
14+
15+
.. tab:: **nRF54H20**
16+
.. math::
17+
clkdiv=\frac{320000000}{1000 * nrf\_sqspi\_dev\_cfg\_t.sck\_freq\_khz}
18+
19+
.. math::
20+
FLPR\_counter=
21+
\begin{cases}
22+
\frac{clkdiv}{2}-1,& \text{if } clkdiv > 2\\
23+
0, & \text{otherwise}
24+
\end{cases}
25+
326
Timing parameters
427
#################
528

0 commit comments

Comments
 (0)