nrfxlib API 3.4.99
Loading...
Searching...
No Matches

◆ nrf_sqspi_init()

nrf_sqspi_error_t nrf_sqspi_init ( nrf_sqspi_t const * p_qspi,
nrf_sqspi_cfg_t const * p_config )

#include <nrf_sqspi.h>

Initialize the QSPI driver instance.

This function configures the peripheral.

Note
The function does not activate the peripheral instance. The activation is done during the first transfer after initialization or when calling nrf_sqspi_activate function. The activation process starts the clocks and ensures registers retention of the peripheral. An active peripheral can start transfers with minimal latency.

This function configures the SoC peripheral attached to the serial bus. To configure the devices on the bus use nrf_sqspi_dev_cfg.

Parameters
[in]p_qspiIdentifier of the QSPI instance to initialize.
[in]p_configPointer to the structure with the initial configuration.
Return values
NRF_SQSPI_SUCCESSInitialization was successful.
NRF_SQSPI_ERROR_INVALID_STATEThe driver is already initialized.
NRF_SQSPI_ERROR_INVALID_PARAMThe pin configuration is incorrect.
Note
Initialization restores the default DPPI task/role map and clears every subscription permission: the soft peripheral applies the reset value of its SPSYNC.DPPIMAP register while starting, and this driver resets the matching host-side state. Anything published with nrf_sqspi_dppi_role_map_set or nrf_sqspi_dppi_subscribe_enable therefore does not survive an uninit/init cycle and has to be published again afterwards, before the first request. Nothing has to be undone before uninit.