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

◆ nrf_semmc_dppi_role_map_set()

nrf_semmc_error_t nrf_semmc_dppi_role_map_set ( nrf_semmc_t const * p_semmc,
const uint8_t * p_roles )

#include <nrf_semmc.h>

Bind the soft peripheral's tasks to handler roles, as one map.

Tasks are addressed as entries: entries 0 to SP_DPPI_SLOT_COUNT-1 are the DPPI slots, where slot n is channel n of the SoC's DPPI instance, and the remaining entries are tasks with no DPPI path at all. p_roles holds one SP_DPPI_ROLE_* per entry, so the whole map changes in one step and no intermediate map is ever in force - a role that is being moved is never briefly unassigned.

A role must appear at most once: both a task register write and a DPPI event for a role reach the same handler, so it has to resolve to a single task. Moving a role moves everything that reaches it, including the barrier this driver raises for it.

This does not enable anything - use nrf_semmc_dppi_subscribe_enable per slot for that, and note that the permissions already in force are preserved. Call once after initialization and before the first transfer: publishing reprograms interrupt state for every task whose binding moves, so it is rejected while a transfer is in flight.

Parameters
[in]p_semmcDriver instance.
[in]p_rolesArray of SP_TASK_ENTRY_COUNT roles, indexed by task entry.
Return values
NRF_SEMMC_SUCCESSMap published to the soft peripheral.
NRF_SEMMC_ERROR_INVALID_PARAMA role is out of range or claimed by two entries.
NRF_SEMMC_ERROR_INVALID_STATEDriver not initialized.
NRF_SEMMC_ERROR_BUSYA transfer is in progress or prepared; nothing was published.