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

Overview

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

XRDC functions

The XRDC module includes four submodules, as follows:

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

Typical use case

Set up configurations during system initialization

The domain assignment and access policy can be configured during the system initialization.

/*
* Domain assignment definition.
* In this example, core 0 has 2 domain assignment registers.
* The XRDC supports 3 domain IDs.
*/
xrdc_processor_domain_assignment_t core0DomainAssignments[] =
{
/* When XRDC_PID[PID] = 0, this assignment hits, domain ID is 0. */
{
.domainId = 0U,
.pidEnable = kXRDC_PidExp0,
.pidMask = 0x3E,
.pid = 0x00,
},
/* When XRDC_PID[PID] = 1, this assignment hits, domain ID is 2. */
{
.domainId = 2U,
.pidEnable = kXRDC_PidExp0,
.pidMask = 0x3E,
.pid = 0x01,
}
};
/* DMA0 domain ID assigned to 0. */
{
.domainId = 0U,
};
/* Memory region access policy. */
xrdc_mem_access_config_t memAccessPolicy[] =
{
{
.mem = kXRDC_MemMrc0_0,
.baseAddress = 0x1FFF0000U,
.size = kXRDC_MemSize32K,
.policy[0] = kXRDC_AccessPolicyAll, /* Allow all access from domain 0. */
.policy[1] = kXRDC_AccessPolicyNone, /* Reject all access from domain 1. */
.policy[2] = kXRDC_AccessPolicyAll, /* Allow all access from domain 2. */
},
{
.mem = kXRDC_MemMrc0_1,
.baseAddress = 0x20000000U,
.size = kXRDC_MemSize32K,
.policy[0] = kXRDC_AccessPolicyAll, /* Allow all access from domain 0. */
.policy[1] = kXRDC_AccessPolicyNone, /* Reject all access from domain 1. */
.policy[2] = kXRDC_AccessPolicyAll, /* Allow all access from domain 2. */
}
};
/* Peripheral access policy. */
xrdc_periph_access_config_t periphAccessPolicy[] =
{
{
.periph = kXRDC_PeriphLptmr0,
.policy[0] = kXRDC_AccessPolicyAll, /* Allow all access from domain 0. */
.policy[1] = kXRDC_AccessPolicyNone, /* Reject all access from domain 1. */
.policy[2] = kXRDC_AccessPolicyAll, /* Allow all access from domain 2. */
},
{
.periph = kXRDC_PeriphLpuart0,
.policy[0] = kXRDC_AccessPolicyAll, /* Allow all access from domain 0. */
.policy[1] = kXRDC_AccessPolicyNone, /* Reject all access from domain 1. */
.policy[2] = kXRDC_AccessPolicyAll, /* Allow all access from domain 2. */
}
};
void main(void)
{
uint32_t i;
uint8_t domainId;
xrdc_pid_config_t pidConfig;
XRDC_Init(XRDC); /* Enable XRDC clock. */
/* Sets the domain ID. */
for (i=0U; i<(sizeof(core0DomainAssignments)/sizeof(core0DomainAssignments[0])); i++)
{
XRDC_SetProcessorDomainAssignment(XRDC, kXRDC_MasterCpu0, i, &core0DomainAssignments[i]);
}
XRDC_SetNonProcessorDomainAssignment(XRDC, kXRDC_MasterDma0, 0, &dma0DomainAssignments);
/* Sets the memory access policy. */
for (i=0U; i<(sizeof(memAccessPolicy)/sizeof(memAccessPolicy[0])); i++)
{
XRDC_SetMemAccessConfig(XRDC, &memAccessPolicy[i]);
}
/* Sets the peripheral access policy. */
for (i=0U; i<(sizeof(periphAccessPolicy)/sizeof(periphAccessPolicy[0])); i++)
{
XRDC_SetPeriphAccessConfig(XRDC, &periphAccessPolicy[i]);
}
/* Sets the the XRDC valid. */
XRDC_SetGlobalValid(XRDC, true);
/*
* Now the XRDC configure is finished. The next example shows how the PID is used
* for domain hit evaluation.
*/
/* Sets the core 0 PID[PID] to 0. */
pidConfig.pid = 0U;
XRDC_SetPidConfig(XRDC, kXRDC_MasterCpu0, &pidConfig);
/* Based on domain ID assignments, now domain ID should be 0. */
assert(0 == domainId);
/* Sets the core 0 PID[PID] to 1. */
pidConfig.pid = 1U;
XRDC_SetPidConfig(XRDC, kXRDC_MasterCpu0, &pidConfig);
/* Based on the domain ID assignments, domain ID should be 2. */
assert(2 == domainId);
while (1)
{
}
}

XRDC error handle

When an access violation occurs, the hard fault is triggered. The function XRDC_GetAndClearFirstDomainError() is used to get the error information. Although there might be more than one error, this function only gets the first error.

void HardFault_Handler(void)
{
xrdc_error_t error;
{
/* Processes the error. */
}
}

Access involve SEMA42

See the SoC reference manual to check which SEMA42 instance is used. For example, for KL28, the memory region defined by the MRC0 uses the SEMA42-0, while the memory region defined by MRC1 uses the SEMA42-1. The peripherals controlled by the PAC0 and PAC2 use the SEMA42-0, while the peripherals controlled by PAC1 use the SEMA42-1.

xrdc_mem_access_config_t memAccessPolicy =
{
.mem = kXRDC_MemMrc0_0,
.enableSema = true,
.semaNum = 5, /* Sema42 gate 5 is used. */
.baseAddress = 0x1FFF0000U,
.size = kXRDC_MemSize32K,
.policy[0] = kXRDC_AccessPolicyAll, /* Allow all access from domain 0. */
.policy[1] = kXRDC_AccessPolicyNone, /* Reject all access from domain 1. */
.policy[2] = kXRDC_AccessPolicyAll, /* Allow all access from domain 2. */
};
XRDC_SetMemAccessConfig(&memAccessPolicy);
/* Blocks to lock the SEMA42 gate. */
SEMA42_Lock(SEMA42_0, 5, XRDC_GetDomainId(XRDC));
/* Accesses the memory region. */
/* Unlocks the gate. */
SEMA42_Unlock(SEMA42_0, 5);

Data Structures

struct  xrdc_hardware_config_t
 XRDC hardware configuration. More...
 
struct  xrdc_processor_domain_assignment_t
 Domain assignment for the processor bus master. More...
 
struct  xrdc_non_processor_domain_assignment_t
 Domain assignment for the non-processor bus master. More...
 
struct  xrdc_pid_config_t
 XRDC process identifier (PID) configuration. More...
 
struct  xrdc_periph_access_config_t
 XRDC peripheral domain access control configuration. More...
 
struct  xrdc_mem_access_config_t
 XRDC memory region domain access control configuration. More...
 
struct  xrdc_error_t
 XRDC domain error definition. More...
 

Macros

#define FSL_XRDC_DRIVER_VERSION   (MAKE_VERSION(2, 0, 3))
 Version 2.0.3. More...
 

Enumerations

enum  _xrdc_status { kStatus_XRDC_NoError = MAKE_STATUS(kStatusGroup_XRDC, 0) }
 XRDC status. More...
 
enum  xrdc_pid_enable_t {
  kXRDC_PidDisable,
  kXRDC_PidDisable1,
  kXRDC_PidExp0,
  kXRDC_PidExp1
}
 XRDC PID enable mode, the register bit XRDC_MDA_Wx[PE], used for domain hit evaluation. More...
 
enum  xrdc_did_sel_t {
  kXRDC_DidMda,
  kXRDC_DidInput,
  kXRDC_DidMdaAndInput,
  kXRDC_DidReserved
}
 XRDC domain ID select method, the register bit XRDC_MDA_Wx[DIDS], used for domain hit evaluation. More...
 
enum  xrdc_secure_attr_t {
  kXRDC_ForceSecure,
  kXRDC_ForceNonSecure,
  kXRDC_MasterSecure,
  kXRDC_MasterSecure1
}
 XRDC secure attribute, the register bit XRDC_MDA_Wx[SA], used for non-processor bus master domain assignment. More...
 
enum  xrdc_privilege_attr_t {
  kXRDC_ForceUser,
  kXRDC_ForcePrivilege,
  kXRDC_MasterPrivilege,
  kXRDC_MasterPrivilege1
}
 XRDC privileged attribute, the register bit XRDC_MDA_Wx[PA], used for non-processor bus master domain assignment. More...
 
enum  xrdc_pid_lock_t {
  kXRDC_PidLockSecurePrivilegeWritable = 0U,
  kXRDC_PidLockSecurePrivilegeWritable1 = 1U,
  kXRDC_PidLockMasterXOnly = 2U,
  kXRDC_PidLockLocked = 3U
}
 XRDC PID LK2 definition XRDC_PIDn[LK2]. More...
 
enum  xrdc_access_policy_t
 XRDC domain access control policy.
 
enum  xrdc_access_config_lock_t {
  kXRDC_AccessConfigLockWritable = 0U,
  kXRDC_AccessConfigLockWritable1 = 1U,
  kXRDC_AccessConfigLockDomainXOnly = 2U,
  kXRDC_AccessConfigLockLocked = 3U
}
 Access configuration lock mode, the register field PDAC and MRGD LK2. More...
 
enum  xrdc_excl_access_lock_config_t {
  kXRDC_ExclAccessLockDisabled = 0U,
  kXRDC_ExclAccessLockDisabledUntilNextRst = 1U,
  kXRDC_ExclAccessLockEnabledStateAvail = 2U,
  kXRDC_ExclAccessLockEnabledStateNotAvail = 3U
}
 Exclusive access lock mode configuration, the register field PDAC and MRGD EAL. More...
 
enum  xrdc_mem_accset_t {
  kXRDC_MemAccset1 = 0U,
  kXRDC_MemAccset2 = 1U
}
 XRDC memory ACCSET (SET of programmable access flags). More...
 
enum  xrdc_mem_code_region_t {
  kXRDC_MemCodeRegion0 = 0U,
  kXRDC_MemCodeRegion1 = 1U
}
 XRDC memory code region indicator. More...
 
enum  xrdc_access_flags_select_t
 XRDC domain access flags/policy select. More...
 
enum  xrdc_controller_t {
  kXRDC_MemController0 = 0U,
  kXRDC_MemController1 = 1U,
  kXRDC_MemController2 = 2U,
  kXRDC_MemController3 = 3U,
  kXRDC_MemController4 = 4U,
  kXRDC_MemController5 = 5U,
  kXRDC_MemController6 = 6U,
  kXRDC_MemController7 = 7U,
  kXRDC_MemController8 = 8U,
  kXRDC_MemController9 = 9U,
  kXRDC_MemController10 = 10U,
  kXRDC_MemController11 = 11U,
  kXRDC_MemController12 = 12U,
  kXRDC_MemController13 = 13U,
  kXRDC_MemController14 = 14U,
  kXRDC_MemController15 = 15U,
  kXRDC_PeriphController0 = 16U,
  kXRDC_PeriphController1 = 17U,
  kXRDC_PeriphController2 = 18U,
  kXRDC_PeriphController3 = 19U
}
 XRDC controller definition for domain error check. More...
 
enum  xrdc_error_state_t {
  kXRDC_ErrorStateNone = 0x00U,
  kXRDC_ErrorStateNone1 = 0x01U,
  kXRDC_ErrorStateSingle = 0x02U,
  kXRDC_ErrorStateMulti = 0x03U
}
 XRDC domain error state definition XRDC_DERR_W1_n[EST]. More...
 
enum  xrdc_error_attr_t {
  kXRDC_ErrorSecureUserInst = 0x00U,
  kXRDC_ErrorSecureUserData = 0x01U,
  kXRDC_ErrorSecurePrivilegeInst = 0x02U,
  kXRDC_ErrorSecurePrivilegeData = 0x03U,
  kXRDC_ErrorNonSecureUserInst = 0x04U,
  kXRDC_ErrorNonSecureUserData = 0x05U,
  kXRDC_ErrorNonSecurePrivilegeInst = 0x06U,
  kXRDC_ErrorNonSecurePrivilegeData = 0x07U
}
 XRDC domain error attribute definition XRDC_DERR_W1_n[EATR]. More...
 
enum  xrdc_error_type_t {
  kXRDC_ErrorTypeRead = 0x00U,
  kXRDC_ErrorTypeWrite = 0x01U
}
 XRDC domain error access type definition XRDC_DERR_W1_n[ERW]. More...
 

Functions

void XRDC_Init (XRDC_Type *base)
 Initializes the XRDC module. More...
 
void XRDC_Deinit (XRDC_Type *base)
 De-initializes the XRDC module. More...
 

XRDC manager (XRDC_MGR)

void XRDC_GetHardwareConfig (XRDC_Type *base, xrdc_hardware_config_t *config)
 Gets the XRDC hardware configuration. More...
 
static void XRDC_LockGlobalControl (XRDC_Type *base)
 Locks the XRDC global control register XRDC_CR. More...
 
static void XRDC_SetGlobalValid (XRDC_Type *base, bool valid)
 Sets the XRDC global valid. More...
 
static uint8_t XRDC_GetCurrentMasterDomainId (XRDC_Type *base)
 Gets the domain ID of the current bus master. More...
 
status_t XRDC_GetAndClearFirstDomainError (XRDC_Type *base, xrdc_error_t *error)
 Gets and clears the first domain error of the current domain. More...
 
status_t XRDC_GetAndClearFirstSpecificDomainError (XRDC_Type *base, xrdc_error_t *error, uint8_t domainId)
 Gets and clears the first domain error of the specific domain. More...
 

XRDC Master Domain Assignment Controller (XRDC_MDAC).

static void XRDC_GetPidDefaultConfig (xrdc_pid_config_t *config)
 Gets the default PID configuration structure. More...
 
static void XRDC_SetPidConfig (XRDC_Type *base, xrdc_master_t master, const xrdc_pid_config_t *config)
 Configures the PID for a specific bus master. More...
 
static void XRDC_SetPidLockMode (XRDC_Type *base, xrdc_master_t master, xrdc_pid_lock_t lockMode)
 Sets the PID configuration register lock mode. More...
 
static void XRDC_GetDefaultNonProcessorDomainAssignment (xrdc_non_processor_domain_assignment_t *assignment)
 Gets the default master domain assignment for non-processor bus master. More...
 
static void XRDC_GetDefaultProcessorDomainAssignment (xrdc_processor_domain_assignment_t *assignment)
 Gets the default master domain assignment for the processor bus master. More...
 
static void XRDC_SetNonProcessorDomainAssignment (XRDC_Type *base, xrdc_master_t master, uint8_t assignIndex, const xrdc_non_processor_domain_assignment_t *assignment)
 Sets the non-processor bus master domain assignment. More...
 
static void XRDC_SetProcessorDomainAssignment (XRDC_Type *base, xrdc_master_t master, uint8_t assignIndex, const xrdc_processor_domain_assignment_t *assignment)
 Sets the processor bus master domain assignment. More...
 
static void XRDC_LockMasterDomainAssignment (XRDC_Type *base, xrdc_master_t master, uint8_t assignIndex)
 Locks the bus master domain assignment register. More...
 
static void XRDC_SetMasterDomainAssignmentValid (XRDC_Type *base, xrdc_master_t master, uint8_t assignIndex, bool valid)
 Sets the master domain assignment as valid or invalid. More...
 

XRDC Memory Region Controller (XRDC_MRC)

void XRDC_GetMemAccessDefaultConfig (xrdc_mem_access_config_t *config)
 Gets the default memory region access policy. More...
 
void XRDC_SetMemAccessConfig (XRDC_Type *base, const xrdc_mem_access_config_t *config)
 Sets the memory region access policy. More...
 
static void XRDC_SetMemAccessLockMode (XRDC_Type *base, xrdc_mem_t mem, xrdc_access_config_lock_t lockMode)
 Sets the memory region descriptor register lock mode. More...
 
static void XRDC_SetMemAccessValid (XRDC_Type *base, xrdc_mem_t mem, bool valid)
 Sets the memory region descriptor as valid or invalid. More...
 
void XRDC_SetMemExclAccessLockMode (XRDC_Type *base, xrdc_mem_t mem, xrdc_excl_access_lock_config_t lockMode)
 Sets the memory region exclusive access lock mode configuration. More...
 
void XRDC_ForceMemExclAccessLockRelease (XRDC_Type *base, xrdc_mem_t mem)
 Forces the release of the memory region exclusive access lock. More...
 
static uint8_t XRDC_GetMemExclAccessLockDomainOwner (XRDC_Type *base, xrdc_mem_t mem)
 Gets the exclusive access lock domain owner of the memory region. More...
 
void XRDC_SetMemAccsetLock (XRDC_Type *base, xrdc_mem_t mem, xrdc_mem_accset_t accset, bool lock)
 Sets the memory region ACCSET (programmable access flags) lock. More...
 

XRDC Peripheral Access Controller (XRDC_PAC)

void XRDC_GetPeriphAccessDefaultConfig (xrdc_periph_access_config_t *config)
 Gets the default peripheral access configuration. More...
 
void XRDC_SetPeriphAccessConfig (XRDC_Type *base, const xrdc_periph_access_config_t *config)
 Sets the peripheral access configuration. More...
 
static void XRDC_SetPeriphAccessLockMode (XRDC_Type *base, xrdc_periph_t periph, xrdc_access_config_lock_t lockMode)
 Sets the peripheral access configuration register lock mode. More...
 
static void XRDC_SetPeriphAccessValid (XRDC_Type *base, xrdc_periph_t periph, bool valid)
 Sets the peripheral access as valid or invalid. More...
 
static void XRDC_SetPeriphExclAccessLockMode (XRDC_Type *base, xrdc_periph_t periph, xrdc_excl_access_lock_config_t lockMode)
 Sets the peripheral exclusive access lock mode configuration. More...
 
void XRDC_ForcePeriphExclAccessLockRelease (XRDC_Type *base, xrdc_periph_t periph)
 Forces the release of the peripheral exclusive access lock. More...
 
static uint8_t XRDC_GetPeriphExclAccessLockDomainOwner (XRDC_Type *base, xrdc_periph_t periph)
 Gets the exclusive access lock domain owner of the peripheral. More...
 

Data Structure Documentation

struct xrdc_hardware_config_t

Data Fields

uint8_t masterNumber
 Number of bus masters. More...
 
uint8_t domainNumber
 Number of domains. More...
 
uint8_t pacNumber
 Number of PACs. More...
 
uint8_t mrcNumber
 Number of MRCs. More...
 

Field Documentation

uint8_t xrdc_hardware_config_t::masterNumber
uint8_t xrdc_hardware_config_t::domainNumber
uint8_t xrdc_hardware_config_t::pacNumber
uint8_t xrdc_hardware_config_t::mrcNumber
struct xrdc_processor_domain_assignment_t

Data Fields

uint32_t domainId: 4U
 Domain ID. More...
 
uint32_t domainIdSelect: 2U
 Domain ID select method, see xrdc_did_sel_t. More...
 
uint32_t pidEnable: 2U
 PId enable method, see xrdc_pid_enable_t. More...
 
uint32_t pidMask: 6U
 PId mask. More...
 
uint32_t __pad0__: 2U
 Reserved. More...
 
uint32_t pid: 6U
 PId value. More...
 
uint32_t __pad1__: 2U
 Reserved. More...
 
uint32_t __pad2__: 4U
 Reserved. More...
 
uint32_t __pad3__: 1U
 Reserved. More...
 
uint32_t __pad4__: 1U
 Reserved. More...
 
uint32_t lock: 1U
 Lock the register. More...
 
uint32_t __pad5__: 1U
 Reserved. More...
 

Field Documentation

uint32_t xrdc_processor_domain_assignment_t::domainId
uint32_t xrdc_processor_domain_assignment_t::domainIdSelect
uint32_t xrdc_processor_domain_assignment_t::pidEnable
uint32_t xrdc_processor_domain_assignment_t::pidMask
uint32_t xrdc_processor_domain_assignment_t::__pad0__
uint32_t xrdc_processor_domain_assignment_t::pid
uint32_t xrdc_processor_domain_assignment_t::__pad1__
uint32_t xrdc_processor_domain_assignment_t::__pad2__
uint32_t xrdc_processor_domain_assignment_t::__pad3__
uint32_t xrdc_processor_domain_assignment_t::__pad4__
uint32_t xrdc_processor_domain_assignment_t::lock
uint32_t xrdc_processor_domain_assignment_t::__pad5__
struct xrdc_non_processor_domain_assignment_t

Data Fields

uint32_t domainId: 4U
 Domain ID. More...
 
uint32_t privilegeAttr: 2U
 Privileged attribute, see xrdc_privilege_attr_t. More...
 
uint32_t secureAttr: 2U
 Secure attribute, see xrdc_secure_attr_t. More...
 
uint32_t bypassDomainId: 1U
 Bypass domain ID. More...
 
uint32_t __pad0__: 15U
 Reserved. More...
 
uint32_t __pad1__: 4U
 Reserved. More...
 
uint32_t __pad2__: 1U
 Reserved. More...
 
uint32_t __pad3__: 1U
 Reserved. More...
 
uint32_t lock: 1U
 Lock the register. More...
 
uint32_t __pad4__: 1U
 Reserved. More...
 

Field Documentation

uint32_t xrdc_non_processor_domain_assignment_t::domainId
uint32_t xrdc_non_processor_domain_assignment_t::privilegeAttr
uint32_t xrdc_non_processor_domain_assignment_t::secureAttr
uint32_t xrdc_non_processor_domain_assignment_t::bypassDomainId
uint32_t xrdc_non_processor_domain_assignment_t::__pad0__
uint32_t xrdc_non_processor_domain_assignment_t::__pad1__
uint32_t xrdc_non_processor_domain_assignment_t::__pad2__
uint32_t xrdc_non_processor_domain_assignment_t::__pad3__
uint32_t xrdc_non_processor_domain_assignment_t::lock
uint32_t xrdc_non_processor_domain_assignment_t::__pad4__
struct xrdc_pid_config_t

Data Fields

uint32_t pid: 6U
 PID value, PIDn[PID]. More...
 
uint32_t __pad0__: 22U
 Reserved. More...
 
uint32_t tsmEnable: 1U
 Enable three-state model. More...
 
uint32_t lockMode: 2U
 PIDn configuration lock mode, see xrdc_pid_lock_t. More...
 
uint32_t __pad1__: 1U
 Reserved. More...
 

Field Documentation

uint32_t xrdc_pid_config_t::pid
uint32_t xrdc_pid_config_t::__pad0__
uint32_t xrdc_pid_config_t::tsmEnable
uint32_t xrdc_pid_config_t::lockMode
uint32_t xrdc_pid_config_t::__pad1__
struct xrdc_periph_access_config_t

Data Fields

xrdc_periph_t periph
 Peripheral name. More...
 
xrdc_access_config_lock_t lockMode
 PDACn lock configuration. More...
 
xrdc_excl_access_lock_config_t exclAccessLockMode
 Exclusive access lock configuration. More...
 
xrdc_access_policy_t policy [FSL_FEATURE_XRDC_DOMAIN_COUNT]
 Access policy for each domain. More...
 

Field Documentation

xrdc_periph_t xrdc_periph_access_config_t::periph
xrdc_access_config_lock_t xrdc_periph_access_config_t::lockMode
xrdc_excl_access_lock_config_t xrdc_periph_access_config_t::exclAccessLockMode
xrdc_access_policy_t xrdc_periph_access_config_t::policy[FSL_FEATURE_XRDC_DOMAIN_COUNT]
struct xrdc_mem_access_config_t

Data Fields

xrdc_mem_t mem
 Memory region descriptor name. More...
 
bool enableAccset1Lock
 Enable ACCSET1 access lock or not. More...
 
bool enableAccset2Lock
 Enable ACCSET2 access lock or not. More...
 
uint16_t accset1
 SET 1 of Programmable access flags. More...
 
uint16_t accset2
 SET 2 of Programmable access flags. More...
 
xrdc_access_config_lock_t lockMode
 MRGDn lock configuration. More...
 
xrdc_access_flags_select_t policy [FSL_FEATURE_XRDC_DOMAIN_COUNT]
 Access policy/flags select for each domain. More...
 
xrdc_mem_code_region_t codeRegion
 Code region select. More...
 
uint32_t baseAddress
 Memory region base/start address. More...
 
uint32_t endAddress
 Memory region end address. More...
 
xrdc_excl_access_lock_config_t exclAccessLockMode
 Exclusive access lock configuration. More...
 

Field Documentation

xrdc_mem_t xrdc_mem_access_config_t::mem
bool xrdc_mem_access_config_t::enableAccset1Lock
bool xrdc_mem_access_config_t::enableAccset2Lock
uint16_t xrdc_mem_access_config_t::accset1

xxx_xxx_xxx_xxx => PS{R,W,X}_PN{R,W,X}_US{R,W,X}_UN{R,W,X}. flag = 0 : inhibits access, flag = 1 : allows access.

uint16_t xrdc_mem_access_config_t::accset2

xxx_xxx_xxx_xxx => PS{R,W,X}_PN{R,W,X}_US{R,W,X}_UN{R,W,X}. flag = 0 : inhibits access, flag = 1 : allows access.

xrdc_access_config_lock_t xrdc_mem_access_config_t::lockMode
xrdc_access_flags_select_t xrdc_mem_access_config_t::policy[FSL_FEATURE_XRDC_DOMAIN_COUNT]
xrdc_mem_code_region_t xrdc_mem_access_config_t::codeRegion
uint32_t xrdc_mem_access_config_t::baseAddress
uint32_t xrdc_mem_access_config_t::endAddress

The 5 LSB of end address is ignored and forced to 0x1F by hardware.

xrdc_excl_access_lock_config_t xrdc_mem_access_config_t::exclAccessLockMode
struct xrdc_error_t

Data Fields

xrdc_controller_t controller
 Which controller captured access violation. More...
 
uint32_t address
 Access address that generated access violation. More...
 
xrdc_error_state_t errorState
 Error state. More...
 
xrdc_error_attr_t errorAttr
 Error attribute. More...
 
xrdc_error_type_t errorType
 Error type. More...
 
uint8_t errorPort
 Error port. More...
 
uint8_t domainId
 Domain ID. More...
 

Field Documentation

xrdc_controller_t xrdc_error_t::controller
uint32_t xrdc_error_t::address
xrdc_error_state_t xrdc_error_t::errorState
xrdc_error_attr_t xrdc_error_t::errorAttr
xrdc_error_type_t xrdc_error_t::errorType
uint8_t xrdc_error_t::errorPort
uint8_t xrdc_error_t::domainId

Macro Definition Documentation

#define FSL_XRDC_DRIVER_VERSION   (MAKE_VERSION(2, 0, 3))

Enumeration Type Documentation

Enumerator
kStatus_XRDC_NoError 

No error captured.

Enumerator
kXRDC_PidDisable 

PID is not used in domain hit evalution.

kXRDC_PidDisable1 

PID is not used in domain hit evalution.

kXRDC_PidExp0 

((XRDC_MDA_W[PID] & ~XRDC_MDA_W[PIDM]) == (XRDC_PID[PID] & ~XRDC_MDA_W[PIDM])).

kXRDC_PidExp1 

~((XRDC_MDA_W[PID] & ~XRDC_MDA_W[PIDM]) == (XRDC_PID[PID] & ~XRDC_MDA_W[PIDM])).

Enumerator
kXRDC_DidMda 

Use MDAn[3:0] as DID.

kXRDC_DidInput 

Use the input DID (DID_in) as DID.

kXRDC_DidMdaAndInput 

Use MDAn[3:2] concatenated with DID_in[1:0] as DID.

kXRDC_DidReserved 

Reserved.

Enumerator
kXRDC_ForceSecure 

Force the bus attribute for this master to secure.

kXRDC_ForceNonSecure 

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

kXRDC_MasterSecure 

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

kXRDC_MasterSecure1 

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

Enumerator
kXRDC_ForceUser 

Force the bus attribute for this master to user.

kXRDC_ForcePrivilege 

Force the bus attribute for this master to privileged.

kXRDC_MasterPrivilege 

Use the bus master's attribute directly.

kXRDC_MasterPrivilege1 

Use the bus master's attribute directly.

Enumerator
kXRDC_PidLockSecurePrivilegeWritable 

Writable by any secure privileged write.

kXRDC_PidLockSecurePrivilegeWritable1 

Writable by any secure privileged write.

kXRDC_PidLockMasterXOnly 

PIDx is only writable by master x.

kXRDC_PidLockLocked 

Read-only until the next reset.

Enumerator
kXRDC_AccessConfigLockWritable 

Entire PDACn/MRGDn can be written.

kXRDC_AccessConfigLockWritable1 

Entire PDACn/MRGDn can be written.

kXRDC_AccessConfigLockDomainXOnly 

Domain x only write the DxACP field.

kXRDC_AccessConfigLockLocked 

PDACn is read-only until the next reset.

Enumerator
kXRDC_ExclAccessLockDisabled 

Lock disabled.

kXRDC_ExclAccessLockDisabledUntilNextRst 

Lock disabled until next reset.

kXRDC_ExclAccessLockEnabledStateAvail 

Lock enabled, lock state = available.

kXRDC_ExclAccessLockEnabledStateNotAvail 

Lock enabled, lock state = not available.

Enumerator
kXRDC_MemAccset1 

Memory region SET 1 of programmable access flags.

kXRDC_MemAccset2 

Memory region SET 2 of programmable access flags.

Enumerator
kXRDC_MemCodeRegion0 

Code region indicator 0=data.

kXRDC_MemCodeRegion1 

Code region indicator 1=code.

Policy: {R,W,X} Read, write, execute flags. flag = 0 : inhibits access, flag = 1 : allows access. policy => SecurePriv_NonSecurePriv_SecureUser_NonSecureUsr xxx_xxx_xxx_xxx => PS{R,W,X}_PN{R,W,X}_US{R,W,X}_UN{R,W,X}

      PS > PN > US > UN          PS > PN > US > UN

DxSEL CodeRegion = 0 CodeRegion = 1 000 000_000_000_000 = 0x000 000_000_000_000 = 0x000 001 ACCSET1 010 ACCSET2 011 110_000_000_000 = 0xC00 001_001_001_001 = 0x249 100 110_110_000_000 = 0xD80 111_000_000_000 = 0xE00 101 110_110_100_100 = 0xDA4 110_111_000_000 = 0xDC0 110 110_110_110_000 = 0xDB0 110_110_111_000 = 0xDB8 111 110_110_110_110 = 0xDB6 110_110_111_111 = 0xDBF

Enumerator
kXRDC_MemController0 

Memory region controller 0.

kXRDC_MemController1 

Memory region controller 1.

kXRDC_MemController2 

Memory region controller 2.

kXRDC_MemController3 

Memory region controller 3.

kXRDC_MemController4 

Memory region controller 4.

kXRDC_MemController5 

Memory region controller 5.

kXRDC_MemController6 

Memory region controller 6.

kXRDC_MemController7 

Memory region controller 7.

kXRDC_MemController8 

Memory region controller 8.

kXRDC_MemController9 

Memory region controller 9.

kXRDC_MemController10 

Memory region controller 10.

kXRDC_MemController11 

Memory region controller 11.

kXRDC_MemController12 

Memory region controller 12.

kXRDC_MemController13 

Memory region controller 13.

kXRDC_MemController14 

Memory region controller 14.

kXRDC_MemController15 

Memory region controller 15.

kXRDC_PeriphController0 

Peripheral access controller 0.

kXRDC_PeriphController1 

Peripheral access controller 1.

kXRDC_PeriphController2 

Peripheral access controller 2.

kXRDC_PeriphController3 

Peripheral access controller 3.

Enumerator
kXRDC_ErrorStateNone 

No access violation detected.

kXRDC_ErrorStateNone1 

No access violation detected.

kXRDC_ErrorStateSingle 

Single access violation detected.

kXRDC_ErrorStateMulti 

Multiple access violation detected.

Enumerator
kXRDC_ErrorSecureUserInst 

Secure user mode, instruction fetch access.

kXRDC_ErrorSecureUserData 

Secure user mode, data access.

kXRDC_ErrorSecurePrivilegeInst 

Secure privileged mode, instruction fetch access.

kXRDC_ErrorSecurePrivilegeData 

Secure privileged mode, data access.

kXRDC_ErrorNonSecureUserInst 

NonSecure user mode, instruction fetch access.

kXRDC_ErrorNonSecureUserData 

NonSecure user mode, data access.

kXRDC_ErrorNonSecurePrivilegeInst 

NonSecure privileged mode, instruction fetch access.

kXRDC_ErrorNonSecurePrivilegeData 

NonSecure privileged mode, data access.

Enumerator
kXRDC_ErrorTypeRead 

Error occurs on read reference.

kXRDC_ErrorTypeWrite 

Error occurs on write reference.

Function Documentation

void XRDC_Init ( XRDC_Type *  base)

This function enables the XRDC clock.

Parameters
baseXRDC peripheral base address.
void XRDC_Deinit ( XRDC_Type *  base)

This function disables the XRDC clock.

Parameters
baseXRDC peripheral base address.
void XRDC_GetHardwareConfig ( XRDC_Type *  base,
xrdc_hardware_config_t config 
)

This function gets the XRDC hardware configurations, including number of bus masters, number of domains, number of MRCs and number of PACs.

Parameters
baseXRDC peripheral base address.
configPointer to the structure to get the configuration.
static void XRDC_LockGlobalControl ( XRDC_Type *  base)
inlinestatic

This function locks the XRDC_CR register. After it is locked, the register is read-only until the next reset.

Parameters
baseXRDC peripheral base address.
static void XRDC_SetGlobalValid ( XRDC_Type *  base,
bool  valid 
)
inlinestatic

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

Parameters
baseXRDC peripheral base address.
validTrue to valid XRDC.
static uint8_t XRDC_GetCurrentMasterDomainId ( XRDC_Type *  base)
inlinestatic

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

Parameters
baseXRDC peripheral base address.
Returns
Domain ID of current bus master.
status_t XRDC_GetAndClearFirstDomainError ( XRDC_Type *  base,
xrdc_error_t error 
)

This function gets the first access violation information for the current domain and clears the pending flag. There might be multiple access violations pending for the current domain. This function only processes the first error.

Parameters
baseXRDC peripheral base address.
errorPointer to the error information.
Returns
If the access violation is captured, this function returns the kStatus_Success. The error information can be obtained from the parameter error. If no access violation is captured, this function returns the kStatus_XRDC_NoError.
status_t XRDC_GetAndClearFirstSpecificDomainError ( XRDC_Type *  base,
xrdc_error_t error,
uint8_t  domainId 
)

This function gets the first access violation information for the specific domain and clears the pending flag. There might be multiple access violations pending for the current domain. This function only processes the first error.

Parameters
baseXRDC peripheral base address.
errorPointer to the error information.
domainIdThe error of which domain to get and clear.
Returns
If the access violation is captured, this function returns the kStatus_Success. The error information can be obtained from the parameter error. If no access violation is captured, this function returns the kStatus_XRDC_NoError.
static void XRDC_GetPidDefaultConfig ( xrdc_pid_config_t config)
inlinestatic

This function initializes the configuration structure to default values. The default values are:

* config->pid = 0U;
* config->tsmEnable = 0U;
* config->sp4smEnable = 0U;
*
Parameters
configPointer to the configuration structure.
static void XRDC_SetPidConfig ( XRDC_Type *  base,
xrdc_master_t  master,
const xrdc_pid_config_t config 
)
inlinestatic

This function configures the PID for a specific bus master. Do not use this function for non-processor bus masters.

Parameters
baseXRDC peripheral base address.
masterWhich bus master to configure.
configPointer to the configuration structure.
static void XRDC_SetPidLockMode ( XRDC_Type *  base,
xrdc_master_t  master,
xrdc_pid_lock_t  lockMode 
)
inlinestatic

This function sets the PID configuration register lock XRDC_PIDn[LK2].

Parameters
baseXRDC peripheral base address.
masterWhich master's PID to lock.
lockModeLock mode to set.
static void XRDC_GetDefaultNonProcessorDomainAssignment ( xrdc_non_processor_domain_assignment_t assignment)
inlinestatic

This function gets the default master domain assignment for non-processor bus master. It should only be used for the no-processor bus masters, such as DMA. This function sets the assignment as follows:

* assignment->domainId = 0U;
* assignment->privilegeAttr = kXRDC_ForceUser;
* assignment->privilegeAttr = kXRDC_ForceSecure;
* assignment->bypassDomainId = 0U;
* assignment->blogicPartId = 0U;
* assignment->benableLogicPartId = 0U;
* assignment->lock = 0U;
*
Parameters
assignmentPointer to the assignment structure.
static void XRDC_GetDefaultProcessorDomainAssignment ( xrdc_processor_domain_assignment_t assignment)
inlinestatic

This function gets the default master domain assignment for the processor bus master. It should only be used for the processor bus masters, such as CORE0. This function sets the assignment as follows:

* assignment->domainId = 0U;
* assignment->domainIdSelect = kXRDC_DidMda;
* assignment->dpidEnable = kXRDC_PidDisable;
* assignment->pidMask = 0U;
* assignment->pid = 0U;
* assignment->logicPartId = 0U;
* assignment->enableLogicPartId = 0U;
* assignment->lock = 0U;
*
Parameters
assignmentPointer to the assignment structure.
static void XRDC_SetNonProcessorDomainAssignment ( XRDC_Type *  base,
xrdc_master_t  master,
uint8_t  assignIndex,
const xrdc_non_processor_domain_assignment_t assignment 
)
inlinestatic

This function sets the non-processor master domain assignment as valid. One bus master might have multiple domain assignment registers. The parameter assignIndex specifies which assignment register to set.

Example: Set domain assignment for DMA0.

* xrdc_non_processor_domain_assignment_t nonProcessorAssignment;
*
* XRDC_GetDefaultNonProcessorDomainAssignment(&nonProcessorAssignment); // Get default assignment
* // Modify necessary members.
* nonProcessorAssignment.domainId = 1;
* nonProcessorAssignment.xxx = xxx; // Other modifications.
*
* // Set the domain assignment. Only 1 assignment register for DMA0. Pass in 0U as assignIndex;
* XRDC_SetMasterDomainAssignment(XRDC, kXrdcMasterDma0, 0U, &nonProcessorAssignment);
*
Parameters
baseXRDC peripheral base address.
masterWhich master to configure.
assignIndexWhich assignment register to set.
assignmentPointer to the assignment structure.
static void XRDC_SetProcessorDomainAssignment ( XRDC_Type *  base,
xrdc_master_t  master,
uint8_t  assignIndex,
const xrdc_processor_domain_assignment_t assignment 
)
inlinestatic

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

Example: Set domain assignment for core 0.

* xrdc_processor_domain_assignment_t processorAssignment;
*
* XRDC_GetDefaultProcessorDomainAssignment(&processorAssignment); // Get default assignment
*
* // Set the domain assignment. There are 3 assignment registers for core 0.
* // Set assignment register 0.
* processorAssignment.domainId = 1;
* processorAssignment.xxx = xxx; // Other modifications.
* XRDC_SetMasterDomainAssignment(XRDC, kXrdcMasterCpu0, 0U, &processorAssignment);
*
* // Set assignment register 1.
* processorAssignment.domainId = 2;
* processorAssignment.xxx = xxx; // Other modifications.
* XRDC_SetMasterDomainAssignment(XRDC, kXrdcMasterCpu0, 1U, &processorAssignment);
*
* // Set assignment register 2.
* processorAssignment.domainId = 0;
* processorAssignment.xxx = xxx; // Other modifications.
* XRDC_SetMasterDomainAssignment(XRDC, kXrdcMasterCpu0, 2U, &processorAssignment);
*
Parameters
baseXRDC peripheral base address.
masterWhich master to configure.
assignIndexWhich assignment register to set.
assignmentPointer to the assignment structure.
static void XRDC_LockMasterDomainAssignment ( XRDC_Type *  base,
xrdc_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
baseXRDC peripheral base address.
masterWhich master to configure.
assignIndexWhich assignment register to lock.
static void XRDC_SetMasterDomainAssignmentValid ( XRDC_Type *  base,
xrdc_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
baseXRDC peripheral base address.
masterWhich master to configure.
assignIndexIndex for the domain assignment register.
validTrue to set valid, false to set invalid.
void XRDC_GetMemAccessDefaultConfig ( xrdc_mem_access_config_t config)

This function gets the default memory region access policy. It sets the policy as follows:

* config->enableSema = false;
* config->semaNum = 0U;
* config->subRegionDisableMask = 0U;
* config->size = kXrdcMemSizeNone;
* config->lockMode = kXRDC_AccessConfigLockWritable;
* config->baseAddress = 0U;
* config->policy[0] = kXRDC_AccessPolicyNone;
* config->policy[1] = kXRDC_AccessPolicyNone;
* ...
* config->policy[15] = kXRDC_AccessPolicyNone;
*
Parameters
configPointer to the configuration structure.
void XRDC_SetMemAccessConfig ( XRDC_Type *  base,
const xrdc_mem_access_config_t config 
)

This function sets the memory region access configuration as valid. There are two methods to use it:

Example 1: Set one configuration run time.

* // Set memory region 0x20000000 ~ 0x20000400 accessible by domain 0, use MRC0_1.
* {
* .mem = kXRDC_MemMrc0_1,
* .baseAddress = 0x20000000U,
* .size = kXRDC_MemSize1K,
* .policy[0] = kXRDC_AccessPolicyAll
* };
* XRDC_SetMemAccessConfig(XRDC, &config);
*

Example 2: Set multiple configurations during startup.

* // Set memory region 0x20000000 ~ 0x20000400 accessible by domain 0, use MRC0_1.
* // Set memory region 0x1FFF0000 ~ 0x1FFF0800 accessible by domain 0, use MRC0_2.
* {
* {
* .mem = kXRDC_MemMrc0_1,
* .baseAddress = 0x20000000U,
* .size = kXRDC_MemSize1K,
* .policy[0] = kXRDC_AccessPolicyAll
* },
* {
* .mem = kXRDC_MemMrc0_2,
* .baseAddress = 0x1FFF0000U,
* .size = kXRDC_MemSize2K,
* .policy[0] = kXRDC_AccessPolicyAll
* }
* };
*
* // Set the configurations.
* for (i=0U; i<((sizeof(configs)/sizeof(configs[0]))); i++)
* {
* XRDC_SetMemAccessConfig(XRDC, &configs[i]);
* }
*
Parameters
baseXRDC peripheral base address.
configPointer to the access policy configuration structure.
static void XRDC_SetMemAccessLockMode ( XRDC_Type *  base,
xrdc_mem_t  mem,
xrdc_access_config_lock_t  lockMode 
)
inlinestatic
Parameters
baseXRDC peripheral base address.
memWhich memory region descriptor to lock.
lockModeThe lock mode to set.
static void XRDC_SetMemAccessValid ( XRDC_Type *  base,
xrdc_mem_t  mem,
bool  valid 
)
inlinestatic

This function sets the memory region access configuration dynamically. For example:

* // Set memory region 0x20000000 ~ 0x20000400 accessible by domain 0, use MRC0_1.
* {
* .mem = kXRDC_MemMrc0_1,
* .baseAddress = 0x20000000U,
* .size = kXRDC_MemSize1K,
* .policy[0] = kXRDC_AccessPolicyAll
* };
* XRDC_SetMemAccessConfig(XRDC, &config);
*
* // Set the memory access configuration invalid.
* XRDC_SetMemAccessValid(kXRDC_MemMrc0_1, false);
*
* // Set the memory access configuration valid, the region 0x20000000 ~ 0x20000400 accessible by domain 0
* XRDC_SetMemAccessValid(kXRDC_MemMrc0_1, true);
*
Parameters
baseXRDC peripheral base address.
memWhich memory region descriptor to set.
validTrue to set valid, false to set invalid.
void XRDC_SetMemExclAccessLockMode ( XRDC_Type *  base,
xrdc_mem_t  mem,
xrdc_excl_access_lock_config_t  lockMode 
)

Note: Any write to MRGD_W[0-3]_n clears the MRGD_W4_n[VLD] indicator so a coherent register state can be supported. It is indispensable to re-assert the valid bit when dynamically changing the EAL in the MRGD, which is done in this API.

Parameters
baseXRDC peripheral base address.
memWhich memory region's exclusive access lock mode to configure.
lockModeThe exclusive access lock mode to set.
void XRDC_ForceMemExclAccessLockRelease ( XRDC_Type *  base,
xrdc_mem_t  mem 
)

A lock can be forced to the available state (EAL=10) by a domain that does not own the lock through the forced lock release procedure: The procedure to force a exclusive access lock release is as follows:

  1. Write 0x02000046 to W1 register (PAC/MSC) or W3 register (MRC)
  2. Write 0x02000052 to W1 register (PAC/MSC) or W3 register (MRC)

Note: The two writes must be consecutive, any intervening write to the register resets the sequence.

Parameters
baseXRDC peripheral base address.
memWhich memory region's exclusive access lock to force release.
static uint8_t XRDC_GetMemExclAccessLockDomainOwner ( XRDC_Type *  base,
xrdc_mem_t  mem 
)
inlinestatic

This function returns the domain ID of the exclusive access lock owner of the memory region.

Parameters
baseXRDC peripheral base address.
memWhich memory region's exclusive access lock domain owner to get.
Returns
Domain ID of the memory region exclusive access lock owner.
void XRDC_SetMemAccsetLock ( XRDC_Type *  base,
xrdc_mem_t  mem,
xrdc_mem_accset_t  accset,
bool  lock 
)
Parameters
baseXRDC peripheral base address.
memWhich memory region descriptor to lock.
memWhich set/index of ACCSET to lock.
lockTrue to set lock, false to set unlock.
void XRDC_GetPeriphAccessDefaultConfig ( xrdc_periph_access_config_t config)

The default configuration is set as follows:

* config->enableSema = false;
* config->semaNum = 0U;
* config->policy[0] = kXRDC_AccessPolicyNone;
* config->policy[1] = kXRDC_AccessPolicyNone;
* ...
* config->policy[15] = kXRDC_AccessPolicyNone;
*
Parameters
configPointer to the configuration structure.
void XRDC_SetPeriphAccessConfig ( XRDC_Type *  base,
const xrdc_periph_access_config_t config 
)

This function sets the peripheral access configuration as valid. Two methods to use it: Method 1: Set for one peripheral, which is used for runtime settings.

*
* // Set LPTMR0 accessible by domain 0
* config.periph = kXRDC_PeriphLptmr0;
* config.policy[0] = kXRDC_AccessPolicyAll;
* XRDC_SetPeriphAccessConfig(XRDC, &config);
*

Method 2: Set for multiple peripherals, which is used for initialization settings.

* // Prepare the configurations
* {
* {
* .periph = kXRDC_PeriphLptmr0,
* .policy[0] = kXRDC_AccessPolicyAll,
* .policy[1] = kXRDC_AccessPolicyAll
* },
* {
* .periph = kXRDC_PeriphLpuart0,
* .policy[0] = kXRDC_AccessPolicyAll,
* .policy[1] = kXRDC_AccessPolicyAll
* }
* };
*
* // Set the configurations.
* for (i=0U; i<(sizeof(configs)/sizeof(configs[0])), i++)
* {
* XRDC_SetPeriphAccessConfig(XRDC, &config[i]);
* }
*
Parameters
baseXRDC peripheral base address.
configPointer to the configuration structure.
static void XRDC_SetPeriphAccessLockMode ( XRDC_Type *  base,
xrdc_periph_t  periph,
xrdc_access_config_lock_t  lockMode 
)
inlinestatic
Parameters
baseXRDC peripheral base address.
periphWhich peripheral access configuration register to lock.
lockModeThe lock mode to set.
static void XRDC_SetPeriphAccessValid ( XRDC_Type *  base,
xrdc_periph_t  periph,
bool  valid 
)
inlinestatic

This function sets the peripheral access configuration dynamically. For example:

* // Set LPTMR0 accessible by domain 0.
* {
* .periph = kXRDC_PeriphLptmr0;
* .policy[0] = kXRDC_AccessPolicyAll;
* };
* XRDC_SetPeriphAccessConfig(XRDC, &config);
*
* // Set the LPTMR0 access configuration invalid.
* XRDC_SetPeriphAccessValid(kXrdcPeriLptmr0, false);
*
* // Set the LPTMR0 access configuration valid, the LPTMR0 accessible by domain 0.
* XRDC_SetPeriphAccessValid(kXrdcPeriLptmr0, true);
*
Parameters
baseXRDC peripheral base address.
periphWhich peripheral access configuration to set.
validTrue to set valid, false to set invalid.
static void XRDC_SetPeriphExclAccessLockMode ( XRDC_Type *  base,
xrdc_periph_t  periph,
xrdc_excl_access_lock_config_t  lockMode 
)
inlinestatic
Parameters
baseXRDC peripheral base address.
periphWhich peripheral's exclusive access lock mode to configure.
lockModeThe exclusive access lock mode to set.
void XRDC_ForcePeriphExclAccessLockRelease ( XRDC_Type *  base,
xrdc_periph_t  periph 
)

A lock can be forced to the available state (EAL=10) by a domain that does not own the lock through the forced lock release procedure: The procedure to force a exclusive access lock release is as follows:

  1. Write 0x02000046 to W1 register (PAC/MSC) or W3 register (MRC)
  2. Write 0x02000052 to W1 register (PAC/MSC) or W3 register (MRC)

Note: The two writes must be consecutive, any intervening write to the register resets the sequence.

Parameters
baseXRDC peripheral base address.
periphWhich peripheral's exclusive access lock to force release.
static uint8_t XRDC_GetPeriphExclAccessLockDomainOwner ( XRDC_Type *  base,
xrdc_periph_t  periph 
)
inlinestatic

This function returns the domain ID of the exclusive access lock owner of the peripheral.

Parameters
baseXRDC peripheral base address.
periphWhich peripheral's exclusive access lock domain owner to get.
Returns
Domain ID of the peripheral exclusive access lock owner.