![]() |
nrfxlib API 3.3.99
|
| 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:
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.
| p_semmc | Pointer to the eMMC driver instance. |
| p_cmd | Pointer to the command descriptor structure. |
| p_config | Pointer to the configuration structure. |
| p_transfer | Pointer to the transfer descriptor structure. |
| cmd_count | Number of transfers in the array pointed by p_cmd. |
| flags | Transfer options (0 for default settings). |
| NRF_SEMMC_SUCCESS | Command started successfully; completion will be reported via callback. |
| NRF_SEMMC_ERROR_BUSY | Driver is busy with another operation. |
| NRF_SEMMC_ERROR_INVALID_PARAM | Invalid parameter(s) provided. |
| NRF_SEMMC_ERROR_UNSUPPORTED | Command or operation not supported. |
| NRF_SEMMC_ERROR_INTERNAL | Internal error occurred. |