MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
XRDC2: Extended Resource Domain Controller 2

Overview

The MCUXpresso SDK provides a driver for the Extended Resource Domain Controller 2 (XRDC2) block of MCUXpresso SDK devices.

XRDC2 functions

XRDC2 module includes such submodules:

Accordingly, the XRDC2 driver functions could be grouped as follows:

Typical use case

Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/xrdc2

Data Structures

struct  xrdc2_master_domain_assignment_t
 Domain assignment for the bus master. More...
 
struct  xrdc2_periph_access_config_t
 XRDC2 peripheral domain access control configuration. More...
 
struct  xrdc2_mem_access_config_t
 XRDC2 memory region domain access control configuration. More...
 
struct  xrdc2_mem_slot_access_config_t
 XRDC2 memory slot domain access control configuration. More...
 

Macros

#define FSL_XRDC2_DRIVER_VERSION   (MAKE_VERSION(2, 0, 2))
 Driver version. More...
 

Enumerations

enum  xrdc2_global_config_lock_t {
  kXRDC2_GlobalConfigLockDisabled,
  kXRDC2_GlobalConfigLockDisabledUntilReset,
  kXRDC2_GlobalConfigLockOwnerOnly,
  kXRDC2_GlobalConfigLockEnabledUntilReset
}
 Global configuration lock. More...
 
enum  xrdc2_secure_attr_t {
  kXRDC2_MasterSecure = 0,
  kXRDC2_ForceSecure = 2,
  kXRDC2_ForceNonSecure = 3
}
 XRDC2 secure attribute, the register bit MDACi_MDAj_W0[SA], secure/nonsecure attribute output on a hit. More...
 
enum  xrdc2_privilege_attr_t {
  kXRDC2_MasterPrivilege = 0,
  kXRDC2_ForceUser = 2,
  kXRDC2_ForcePrivilege = 3
}
 XRDC2 privileged attribute, the register bit MDACi_MDAj_W0[PA], defines the privileged/user attribute on a hit. More...
 
enum  xrdc2_access_policy_t
 XRDC2 domain access control policy.
 
enum  xrdc2_access_config_lock_t {
  kXRDC2_AccessConfigLockDisabled = 0U,
  kXRDC2_AccessConfigLockDisabledUntilReset = 1U,
  kXRDC2_AccessConfigLockDomainXOnly = 2U,
  kXRDC2_AccessConfigLockEnabledUntilReset = 3U
}
 Access configuration lock mode, the register field PDAC and MRGD LK2. More...
 

Functions

void XRDC2_Init (XRDC2_Type *base)
 Initializes the XRDC2 module. More...
 
void XRDC2_Deinit (XRDC2_Type *base)
 De-initializes the XRDC2 module. More...
 

XRDC2 manager (XRDC2)

void XRDC2_SetGlobalValid (XRDC2_Type *base, bool valid)
 Sets the XRDC2 global valid. More...
 
static uint8_t XRDC2_GetCurrentMasterDomainId (XRDC2_Type *base)
 Gets the domain ID of the current bus master. More...
 
static void XRDC2_SetGlobalConfigLock (XRDC2_Type *base, xrdc2_global_config_lock_t mode)
 Set the global configuration lock mode. More...
 
static uint8_t XRDC2_GetCurrentGlobalConfigLockOwnerDomainId (XRDC2_Type *base)
 Gets the domain ID of global configuration lock owner. More...
 

XRDC2 Master Domain Assignment Controller (XRDC2_MDAC).

void XRDC2_GetDefaultMasterDomainAssignment (xrdc2_master_domain_assignment_t *assignment)
 Gets the default master domain assignment. More...
 
void XRDC2_SetMasterDomainAssignment (XRDC2_Type *base, xrdc2_master_t master, uint8_t assignIndex, const xrdc2_master_domain_assignment_t *assignment)
 Sets the processor bus master domain assignment. More...
 
static void XRDC2_LockMasterDomainAssignment (XRDC2_Type *base, xrdc2_master_t master, uint8_t assignIndex)
 Locks the bus master domain assignment register. More...
 
static void XRDC2_SetMasterDomainAssignmentValid (XRDC2_Type *base, xrdc2_master_t master, uint8_t assignIndex, bool valid)
 Sets the master domain assignment as valid or invalid. More...
 

XRDC2 Memory Slot Access Controller (XRDC2_MSC).

void XRDC2_GetMemSlotAccessDefaultConfig (xrdc2_mem_slot_access_config_t *config)
 Gets the default memory slot access configuration. More...
 
void XRDC2_SetMemSlotAccessConfig (XRDC2_Type *base, xrdc2_mem_slot_t memSlot, const xrdc2_mem_slot_access_config_t *config)
 Sets the memory slot access policy. More...
 
void XRDC2_SetMemSlotAccessValid (XRDC2_Type *base, xrdc2_mem_slot_t memSlot, bool valid)
 Sets the memory slot descriptor as valid or invalid. More...
 
void XRDC2_SetMemSlotAccessLockMode (XRDC2_Type *base, xrdc2_mem_slot_t memSlot, xrdc2_access_config_lock_t lockMode)
 Sets the memory slot descriptor lock mode. More...
 
void XRDC2_SetMemSlotDomainAccessPolicy (XRDC2_Type *base, xrdc2_mem_slot_t memSlot, uint8_t domainId, xrdc2_access_policy_t policy)
 Sets the memory slot access policy for specific domain. More...
 
void XRDC2_EnableMemSlotExclAccessLock (XRDC2_Type *base, xrdc2_mem_slot_t memSlot, bool enable)
 Enable or disable the memory slot exclusive access lock. More...
 
uint8_t XRDC2_GetMemSlotExclAccessLockDomainOwner (XRDC2_Type *base, xrdc2_mem_slot_t memSlot)
 Get current memory slot exclusive access lock owner. More...
 
status_t XRDC2_TryLockMemSlotExclAccess (XRDC2_Type *base, xrdc2_mem_slot_t memSlot)
 Try to lock the memory slot exclusive access. More...
 
void XRDC2_LockMemSlotExclAccess (XRDC2_Type *base, xrdc2_mem_slot_t memSlot)
 Lock the memory slot exclusive access using blocking method. More...
 
static void XRDC2_UnlockMemSlotExclAccess (XRDC2_Type *base, xrdc2_mem_slot_t memSlot)
 Unlock the memory slot exclusive access. More...
 
static void XRDC2_ForceMemSlotExclAccessLockRelease (XRDC2_Type *base, xrdc2_mem_slot_t memSlot)
 Force the memory slot exclusive access lock release. More...
 

XRDC2 Memory Region Controller (XRDC2_MRC)

void XRDC2_GetMemAccessDefaultConfig (xrdc2_mem_access_config_t *config)
 Gets the default memory access configuration. More...
 
void XRDC2_SetMemAccessConfig (XRDC2_Type *base, xrdc2_mem_t mem, const xrdc2_mem_access_config_t *config)
 Sets the memory region access policy. More...
 
void XRDC2_SetMemAccessValid (XRDC2_Type *base, xrdc2_mem_t mem, bool valid)
 Sets the memory region descriptor as valid or invalid. More...
 
void XRDC2_SetMemAccessLockMode (XRDC2_Type *base, xrdc2_mem_t mem, xrdc2_access_config_lock_t lockMode)
 Sets the memory descriptor lock mode. More...
 
void XRDC2_SetMemDomainAccessPolicy (XRDC2_Type *base, xrdc2_mem_t mem, uint8_t domainId, xrdc2_access_policy_t policy)
 Sets the memory region access policy for specific domain. More...
 
void XRDC2_EnableMemExclAccessLock (XRDC2_Type *base, xrdc2_mem_t mem, bool enable)
 Enable or disable the memory region exclusive access lock. More...
 
uint8_t XRDC2_GetMemExclAccessLockDomainOwner (XRDC2_Type *base, xrdc2_mem_t mem)
 Get current memory region exclusive access lock owner. More...
 
status_t XRDC2_TryLockMemExclAccess (XRDC2_Type *base, xrdc2_mem_t mem)
 Try to lock the memory region exclusive access. More...
 
void XRDC2_LockMemExclAccess (XRDC2_Type *base, xrdc2_mem_t mem)
 Lock the memory region exclusive access using blocking method. More...
 
void XRDC2_UnlockMemExclAccess (XRDC2_Type *base, xrdc2_mem_t mem)
 Unlock the memory region exclusive access. More...
 
void XRDC2_ForceMemExclAccessLockRelease (XRDC2_Type *base, xrdc2_mem_t mem)
 Force the memory region exclusive access lock release. More...
 

XRDC2 Peripheral Access Controller (XRDC2_PAC)

void XRDC2_GetPeriphAccessDefaultConfig (xrdc2_periph_access_config_t *config)
 Gets the default peripheral access configuration. More...
 
void XRDC2_SetPeriphAccessConfig (XRDC2_Type *base, xrdc2_periph_t periph, const xrdc2_periph_access_config_t *config)
 Sets the peripheral access policy. More...
 
void XRDC2_SetPeriphAccessValid (XRDC2_Type *base, xrdc2_periph_t periph, bool valid)
 Sets the peripheral descriptor as valid or invalid. More...
 
void XRDC2_SetPeriphAccessLockMode (XRDC2_Type *base, xrdc2_periph_t periph, xrdc2_access_config_lock_t lockMode)
 Sets the peripheral descriptor lock mode. More...
 
void XRDC2_SetPeriphDomainAccessPolicy (XRDC2_Type *base, xrdc2_periph_t periph, uint8_t domainId, xrdc2_access_policy_t policy)
 Sets the peripheral access policy for specific domain. More...
 
void XRDC2_EnablePeriphExclAccessLock (XRDC2_Type *base, xrdc2_periph_t periph, bool enable)
 Disable the peripheral exclusive access lock. More...
 
uint8_t XRDC2_GetPeriphExclAccessLockDomainOwner (XRDC2_Type *base, xrdc2_periph_t periph)
 Get current peripheral exclusive access lock owner. More...
 
status_t XRDC2_TryLockPeriphExclAccess (XRDC2_Type *base, xrdc2_periph_t periph)
 Try to lock the peripheral exclusive access. More...
 
void XRDC2_LockPeriphExclAccess (XRDC2_Type *base, xrdc2_periph_t periph)
 Lock the peripheral exclusive access using blocking method. More...
 
void XRDC2_UnlockPeriphExclAccess (XRDC2_Type *base, xrdc2_periph_t periph)
 Unlock the peripheral exclusive access. More...
 
void XRDC2_ForcePeriphExclAccessLockRelease (XRDC2_Type *base, xrdc2_periph_t periph)
 Force the peripheral exclusive access lock release. More...
 

Data Structure Documentation

struct xrdc2_master_domain_assignment_t

XRDC2 compares the bus master match input with the parameter mask and match in this structure. If hit, the domain ID, privilege attribute, and secure attribute are used for the access.

Data Fields

bool lock
 Set true to lock the descriptor. More...
 
xrdc2_privilege_attr_t privilegeAttr
 Privilege attribute. More...
 
xrdc2_secure_attr_t secureAttr
 Secure attribute. More...
 
uint8_t domainId
 Domain ID used when this descriptor hit. More...
 
uint16_t mask
 Mask used for descriptor hit. More...
 
uint16_t match
 Match used for descriptor hit. More...
 

Field Documentation

bool xrdc2_master_domain_assignment_t::lock
xrdc2_privilege_attr_t xrdc2_master_domain_assignment_t::privilegeAttr
xrdc2_secure_attr_t xrdc2_master_domain_assignment_t::secureAttr
uint8_t xrdc2_master_domain_assignment_t::domainId
uint16_t xrdc2_master_domain_assignment_t::mask
uint16_t xrdc2_master_domain_assignment_t::match
struct xrdc2_periph_access_config_t

Data Fields

xrdc2_access_config_lock_t lockMode
 PDACn lock configuration. More...
 
xrdc2_access_policy_t policy [FSL_FEATURE_XRDC2_DOMAIN_COUNT]
 Access policy for each domain. More...
 

Field Documentation

xrdc2_access_config_lock_t xrdc2_periph_access_config_t::lockMode
xrdc2_access_policy_t xrdc2_periph_access_config_t::policy[FSL_FEATURE_XRDC2_DOMAIN_COUNT]
struct xrdc2_mem_access_config_t

Data Fields

uint32_t startAddr
 Memory region start address, should be 4k aligned. More...
 
uint32_t endAddr
 Memory region end address, (endAddr + 1) should be 4k aligned. More...
 
xrdc2_access_config_lock_t lockMode
 MRGDn lock configuration. More...
 
xrdc2_access_policy_t policy [FSL_FEATURE_XRDC2_DOMAIN_COUNT]
 Access policy for each domain. More...
 

Field Documentation

uint32_t xrdc2_mem_access_config_t::startAddr
uint32_t xrdc2_mem_access_config_t::endAddr
xrdc2_access_config_lock_t xrdc2_mem_access_config_t::lockMode
xrdc2_access_policy_t xrdc2_mem_access_config_t::policy[FSL_FEATURE_XRDC2_DOMAIN_COUNT]
struct xrdc2_mem_slot_access_config_t

Data Fields

xrdc2_access_config_lock_t lockMode
 Descriptor lock configuration. More...
 
xrdc2_access_policy_t policy [FSL_FEATURE_XRDC2_DOMAIN_COUNT]
 Access policy for each domain. More...
 

Field Documentation

xrdc2_access_config_lock_t xrdc2_mem_slot_access_config_t::lockMode
xrdc2_access_policy_t xrdc2_mem_slot_access_config_t::policy[FSL_FEATURE_XRDC2_DOMAIN_COUNT]

Macro Definition Documentation

#define FSL_XRDC2_DRIVER_VERSION   (MAKE_VERSION(2, 0, 2))

Enumeration Type Documentation

Enumerator
kXRDC2_GlobalConfigLockDisabled 

Lock disabled, registers can be written by any domain.

kXRDC2_GlobalConfigLockDisabledUntilReset 

Lock disabled until the next reset.

kXRDC2_GlobalConfigLockOwnerOnly 

Lock enabled, only the lock owner can write.

kXRDC2_GlobalConfigLockEnabledUntilReset 

Lock enabled, all registers are read only until the next reset.

Enumerator
kXRDC2_MasterSecure 

Use the bus master's secure/nonsecure attribute directly.

kXRDC2_ForceSecure 

Force the bus attribute for this master to secure.

kXRDC2_ForceNonSecure 

Force the bus attribute for this master to non-secure.

Enumerator
kXRDC2_MasterPrivilege 

Use the bus master's attribute directly.

kXRDC2_ForceUser 

Force the bus attribute for this master to user.

kXRDC2_ForcePrivilege 

Force the bus attribute for this master to privileged.

Enumerator
kXRDC2_AccessConfigLockDisabled 

Entire PDACn/MRGDn/MSC can be written.

kXRDC2_AccessConfigLockDisabledUntilReset 

Entire PDACn/MRGDn/MSC can be written until next reset.

kXRDC2_AccessConfigLockDomainXOnly 

Domain x only write the DxACP field.

kXRDC2_AccessConfigLockEnabledUntilReset 

PDACn/MRGDn/MSC is read-only until the next reset.

Function Documentation

void XRDC2_Init ( XRDC2_Type *  base)
Parameters
baseXRDC2 peripheral base address.
void XRDC2_Deinit ( XRDC2_Type *  base)
Parameters
baseXRDC2 peripheral base address.
void XRDC2_SetGlobalValid ( XRDC2_Type *  base,
bool  valid 
)

This function sets the XRDC2 global valid or invalid. When the XRDC2 is global invalid, all accesses from all bus masters to all slaves are allowed.

Parameters
baseXRDC2 peripheral base address.
validTrue to valid XRDC2.
static uint8_t XRDC2_GetCurrentMasterDomainId ( XRDC2_Type *  base)
inlinestatic

This function returns the domain ID of the current bus master.

Parameters
baseXRDC2 peripheral base address.
Returns
Domain ID of current bus master.
static void XRDC2_SetGlobalConfigLock ( XRDC2_Type *  base,
xrdc2_global_config_lock_t  mode 
)
inlinestatic

Once change the lock mode, it could not be changed until next reset.

Parameters
baseXRDC2 peripheral base address.
lockThe lock mode.
static uint8_t XRDC2_GetCurrentGlobalConfigLockOwnerDomainId ( XRDC2_Type *  base)
inlinestatic
Parameters
baseXRDC2 peripheral base address.
Returns
Domain ID of the global configuration lock owner.
void XRDC2_GetDefaultMasterDomainAssignment ( xrdc2_master_domain_assignment_t assignment)

This function sets the assignment as follows:

* config->lock = false;
* config->privilegeAttr = kXRDC2_MasterPrivilege;
* config->secureAttr = kXRDC2_MasterSecure;
* config->domainId = 0U;
* config->mask = 0U;
* config->match = 0U;
*
Parameters
assignmentPointer to the assignment structure.
void XRDC2_SetMasterDomainAssignment ( XRDC2_Type *  base,
xrdc2_master_t  master,
uint8_t  assignIndex,
const xrdc2_master_domain_assignment_t assignment 
)
Parameters
baseXRDC2 peripheral base address.
masterWhich master to configure.
assignIndexWhich assignment register to set.
assignmentPointer to the assignment structure.
static void XRDC2_LockMasterDomainAssignment ( XRDC2_Type *  base,
xrdc2_master_t  master,
uint8_t  assignIndex 
)
inlinestatic

This function locks the master domain assignment. One bus master might have multiple domain assignment registers. The parameter assignIndex specifies which assignment register to lock. After it is locked, the register can't be changed until next reset.

Parameters
baseXRDC2 peripheral base address.
masterWhich master to configure.
assignIndexWhich assignment register to lock.
static void XRDC2_SetMasterDomainAssignmentValid ( XRDC2_Type *  base,
xrdc2_master_t  master,
uint8_t  assignIndex,
bool  valid 
)
inlinestatic

This function sets the master domain assignment as valid or invalid. One bus master might have multiple domain assignment registers. The parameter assignIndex specifies which assignment register to configure.

Parameters
baseXRDC2 peripheral base address.
masterWhich master to configure.
assignIndexIndex for the domain assignment register.
validTrue to set valid, false to set invalid.
void XRDC2_GetMemSlotAccessDefaultConfig ( xrdc2_mem_slot_access_config_t config)

This function sets the assignment as follows:

* config->lockMode = kXRDC2_AccessConfigLockDisabled;
* config->policy[0] = kXRDC2_AccessPolicyNone;
* config->policy[1] = kXRDC2_AccessPolicyNone;
* ...
*
Parameters
configPointer to the configuration.
void XRDC2_SetMemSlotAccessConfig ( XRDC2_Type *  base,
xrdc2_mem_slot_t  memSlot,
const xrdc2_mem_slot_access_config_t config 
)
Parameters
baseXRDC2 peripheral base address.
memSlotWhich memory slot descriptor to set.
configPointer to the access policy configuration structure.
void XRDC2_SetMemSlotAccessValid ( XRDC2_Type *  base,
xrdc2_mem_slot_t  memSlot,
bool  valid 
)
Parameters
baseXRDC2 peripheral base address.
memSlotWhich memory slot descriptor to set.
validTrue to set valid, false to set invalid.
void XRDC2_SetMemSlotAccessLockMode ( XRDC2_Type *  base,
xrdc2_mem_slot_t  memSlot,
xrdc2_access_config_lock_t  lockMode 
)
Parameters
baseXRDC2 peripheral base address.
memSlotWhich memory slot descriptor to set.
lockModeThe lock mode to set.
void XRDC2_SetMemSlotDomainAccessPolicy ( XRDC2_Type *  base,
xrdc2_mem_slot_t  memSlot,
uint8_t  domainId,
xrdc2_access_policy_t  policy 
)
Parameters
baseXRDC2 peripheral base address.
memSlotThe memory slot to operate.
domainIdThe ID of the domain whose policy will be changed.
policyThe access policy to set.
void XRDC2_EnableMemSlotExclAccessLock ( XRDC2_Type *  base,
xrdc2_mem_slot_t  memSlot,
bool  enable 
)

The lock must be enabled first before use. Once disabled, it could not be enabled until reset.

Parameters
baseXRDC2 peripheral base address.
memSlotThe memory slot to operate.
enableTrue to enable, false to disable.
uint8_t XRDC2_GetMemSlotExclAccessLockDomainOwner ( XRDC2_Type *  base,
xrdc2_mem_slot_t  memSlot 
)
Parameters
baseXRDC2 peripheral base address.
memSlotThe memory slot to operate.
Returns
The domain ID of the lock owner.
status_t XRDC2_TryLockMemSlotExclAccess ( XRDC2_Type *  base,
xrdc2_mem_slot_t  memSlot 
)
Parameters
baseXRDC2 peripheral base address.
memSlotThe memory slot to operate.
Return values
kStatus_FailFailed to lock.
kStatus_SuccessLocked succussfully.
void XRDC2_LockMemSlotExclAccess ( XRDC2_Type *  base,
xrdc2_mem_slot_t  memSlot 
)
Parameters
baseXRDC2 peripheral base address.
memSlotThe memory slot to operate.
Note
This function must be called when the lock is not disabled.
static void XRDC2_UnlockMemSlotExclAccess ( XRDC2_Type *  base,
xrdc2_mem_slot_t  memSlot 
)
inlinestatic
Parameters
baseXRDC2 peripheral base address.
memSlotThe memory slot to operate.
Note
This function must be called by the lock owner.
static void XRDC2_ForceMemSlotExclAccessLockRelease ( XRDC2_Type *  base,
xrdc2_mem_slot_t  memSlot 
)
inlinestatic

The master does not own the lock could call this function to force release the lock.

Parameters
baseXRDC2 peripheral base address.
memSlotThe memory slot to operate.
void XRDC2_GetMemAccessDefaultConfig ( xrdc2_mem_access_config_t config)

This function sets the assignment as follows:

* config->startAddr = 0U;
* config->endAddr = 0xFFFFFFFFU;
* config->lockMode = kXRDC2_AccessConfigLockDisabled;
* config->policy[0] = kXRDC2_AccessPolicyNone;
* config->policy[1] = kXRDC2_AccessPolicyNone;
* ...
*
Parameters
configPointer to the configuration.
void XRDC2_SetMemAccessConfig ( XRDC2_Type *  base,
xrdc2_mem_t  mem,
const xrdc2_mem_access_config_t config 
)
Parameters
baseXRDC2 peripheral base address.
memWhich memory region descriptor to set.
configPointer to the access policy configuration structure.
void XRDC2_SetMemAccessValid ( XRDC2_Type *  base,
xrdc2_mem_t  mem,
bool  valid 
)
Parameters
baseXRDC2 peripheral base address.
memWhich memory region descriptor to set.
validTrue to set valid, false to set invalid.
void XRDC2_SetMemAccessLockMode ( XRDC2_Type *  base,
xrdc2_mem_t  mem,
xrdc2_access_config_lock_t  lockMode 
)
Parameters
baseXRDC2 peripheral base address.
memWhich memory descriptor to set.
lockModeThe lock mode to set.
void XRDC2_SetMemDomainAccessPolicy ( XRDC2_Type *  base,
xrdc2_mem_t  mem,
uint8_t  domainId,
xrdc2_access_policy_t  policy 
)
Parameters
baseXRDC2 peripheral base address.
memThe memory region to operate.
domainIdThe ID of the domain whose policy will be changed.
policyThe access policy to set.
void XRDC2_EnableMemExclAccessLock ( XRDC2_Type *  base,
xrdc2_mem_t  mem,
bool  enable 
)

Once disabled, it could not be enabled until reset.

Parameters
baseXRDC2 peripheral base address.
memThe memory region to operate.
enableTrue to enable, false to disable.
uint8_t XRDC2_GetMemExclAccessLockDomainOwner ( XRDC2_Type *  base,
xrdc2_mem_t  mem 
)
Parameters
baseXRDC2 peripheral base address.
memThe memory region to operate.
Returns
The domain ID of the lock owner.
status_t XRDC2_TryLockMemExclAccess ( XRDC2_Type *  base,
xrdc2_mem_t  mem 
)
Parameters
baseXRDC2 peripheral base address.
memThe memory region to operate.
Return values
kStatus_FailFailed to lock.
kStatus_SuccessLocked succussfully.
void XRDC2_LockMemExclAccess ( XRDC2_Type *  base,
xrdc2_mem_t  mem 
)
Parameters
baseXRDC2 peripheral base address.
memThe memory region to operate.
Note
This function must be called when the lock is not disabled.
void XRDC2_UnlockMemExclAccess ( XRDC2_Type *  base,
xrdc2_mem_t  mem 
)
Parameters
baseXRDC2 peripheral base address.
memThe memory region to operate.
Note
This function must be called by the lock owner.
void XRDC2_ForceMemExclAccessLockRelease ( XRDC2_Type *  base,
xrdc2_mem_t  mem 
)

The master does not own the lock could call this function to force release the lock.

Parameters
baseXRDC2 peripheral base address.
memThe memory region to operate.
void XRDC2_GetPeriphAccessDefaultConfig ( xrdc2_periph_access_config_t config)

The default configuration is set as follows:

* config->lockMode = kXRDC2_AccessConfigLockWritable;
* config->policy[0] = kXRDC2_AccessPolicyNone;
* config->policy[1] = kXRDC2_AccessPolicyNone;
* ...
* config->policy[15] = kXRDC2_AccessPolicyNone;
*
Parameters
configPointer to the configuration structure.
void XRDC2_SetPeriphAccessConfig ( XRDC2_Type *  base,
xrdc2_periph_t  periph,
const xrdc2_periph_access_config_t config 
)
Parameters
baseXRDC2 peripheral base address.
periphWhich peripheral descriptor to set.
configPointer to the access policy configuration structure.
void XRDC2_SetPeriphAccessValid ( XRDC2_Type *  base,
xrdc2_periph_t  periph,
bool  valid 
)
Parameters
baseXRDC2 peripheral base address.
periphWhich peripheral descriptor to set.
validTrue to set valid, false to set invalid.
void XRDC2_SetPeriphAccessLockMode ( XRDC2_Type *  base,
xrdc2_periph_t  periph,
xrdc2_access_config_lock_t  lockMode 
)
Parameters
baseXRDC2 peripheral base address.
periphWhich peripheral descriptor to set.
lockModeThe lock mode to set.
void XRDC2_SetPeriphDomainAccessPolicy ( XRDC2_Type *  base,
xrdc2_periph_t  periph,
uint8_t  domainId,
xrdc2_access_policy_t  policy 
)
Parameters
baseXRDC2 peripheral base address.
periphThe peripheral to operate.
domainIdThe ID of the domain whose policy will be changed.
policyThe access policy to set.
void XRDC2_EnablePeriphExclAccessLock ( XRDC2_Type *  base,
xrdc2_periph_t  periph,
bool  enable 
)

Once disabled, it could not be enabled until reset.

Parameters
baseXRDC2 peripheral base address.
periphThe peripheral to operate.
enableTrue to enable, false to disable.
uint8_t XRDC2_GetPeriphExclAccessLockDomainOwner ( XRDC2_Type *  base,
xrdc2_periph_t  periph 
)
Parameters
baseXRDC2 peripheral base address.
periphThe peripheral to operate.
Returns
The domain ID of the lock owner.
status_t XRDC2_TryLockPeriphExclAccess ( XRDC2_Type *  base,
xrdc2_periph_t  periph 
)
Parameters
baseXRDC2 peripheral base address.
periphThe peripheral to operate.
Return values
kStatus_FailFailed to lock.
kStatus_SuccessLocked succussfully.
void XRDC2_LockPeriphExclAccess ( XRDC2_Type *  base,
xrdc2_periph_t  periph 
)
Parameters
baseXRDC2 peripheral base address.
periphThe peripheral to operate.
Note
This function must be called when the lock is not disabled.
void XRDC2_UnlockPeriphExclAccess ( XRDC2_Type *  base,
xrdc2_periph_t  periph 
)
Parameters
baseXRDC2 peripheral base address.
periphThe peripheral to operate.
Note
This function must be called by the lock owner.
void XRDC2_ForcePeriphExclAccessLockRelease ( XRDC2_Type *  base,
xrdc2_periph_t  periph 
)

The master does not own the lock could call this function to force release the lock.

Parameters
baseXRDC2 peripheral base address.
periphThe peripheral to operate.