nrfxlib API 3.3.99
Loading...
Searching...
No Matches

◆ nrf_semmc_cmd()

nrf_semmc_error_t nrf_semmc_cmd ( nrf_semmc_t const * p_semmc,
nrf_semmc_cmd_desc_t * p_cmd,
nrf_semmc_config_t const * p_config,
nrf_semmc_transfer_desc_t * p_transfer,
size_t cmd_count,
uint32_t flags )

#include <softperipheral/sEMMC/include/nrf_semmc.h>

Start an asynchronous command.

May return immediately with error. The user callback will be invoked on completion. No other driver calls should be made on this instance until the callback fires.

It is the caller's responsibility to implement a timeout mechanism to detect if the device becomes unresponsive. The driver itself does not implement timeouts for command completion.

For commands that require a STOP_TRANSMISSION command (CMD12) and cleanup afterwards, the caller is responsible for issuing the stop command and performing the necessary cleanup. This applies to the following commands:

  • NRF_SEMMC_CMD18_READ_MULTIPLE (CMD18)
  • NRF_SEMMC_CMD25_WRITE_MULTIPLE (CMD25)

The caller is responsible for proper cache management of any memory buffers referenced in the p_transfer structure. This includes flushing the cache before writing data to the eMMC device (for data being read by the DMA) and invalidating the cache before reading data received from the eMMC device (for data written by the DMA). Additionally, it is the caller's responsibility to ensure that buffers are properly aligned and padded according to cache line boundaries to prevent data corruption when invalidating the cache.

Parameters
p_semmcPointer to the eMMC driver instance.
p_cmdPointer to the command descriptor structure.
p_configPointer to the configuration structure.
p_transferPointer to the transfer descriptor structure.
cmd_countNumber of transfers in the array pointed by p_cmd.
flagsTransfer options (0 for default settings).
Return values
NRF_SEMMC_SUCCESSCommand started successfully; completion will be reported via callback.
NRF_SEMMC_ERROR_BUSYDriver is busy with another operation.
NRF_SEMMC_ERROR_INVALID_PARAMInvalid parameter(s) provided.
NRF_SEMMC_ERROR_UNSUPPORTEDCommand or operation not supported.
NRF_SEMMC_ERROR_INTERNALInternal error occurred.