MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides a driver for the RDC module of MCUXpresso SDK devices.
The Resource Domain Controller (RDC) provides robust support for the isolation of destination memory mapped locations such as peripherals and memory to a single core, a bus master, or set of cores and bus masters.
The RDC driver should be used together with the RDC_SEMA42 driver.
Data Structures | |
struct | rdc_hardware_config_t |
RDC hardware configuration. More... | |
struct | rdc_domain_assignment_t |
Master domain assignment. More... | |
struct | rdc_periph_access_config_t |
Peripheral domain access permission configuration. More... | |
struct | rdc_mem_access_config_t |
Memory region domain access control configuration. More... | |
struct | rdc_mem_status_t |
Memory region access violation status. More... | |
Enumerations | |
enum | _rdc_interrupts { kRDC_RestoreCompleteInterrupt = RDC_INTCTRL_RCI_EN_MASK } |
RDC interrupts. More... | |
enum | _rdc_flags { kRDC_PowerDownDomainOn = RDC_STAT_PDS_MASK } |
RDC status. More... | |
enum | _rdc_access_policy { kRDC_NoAccess = 0, kRDC_WriteOnly = 1, kRDC_ReadOnly = 2, kRDC_ReadWrite = 3 } |
Access permission policy. More... | |
Functions | |
void | RDC_Init (RDC_Type *base) |
Initializes the RDC module. More... | |
void | RDC_Deinit (RDC_Type *base) |
De-initializes the RDC module. More... | |
void | RDC_GetHardwareConfig (RDC_Type *base, rdc_hardware_config_t *config) |
Gets the RDC hardware configuration. More... | |
static void | RDC_EnableInterrupts (RDC_Type *base, uint32_t mask) |
Enable interrupts. More... | |
static void | RDC_DisableInterrupts (RDC_Type *base, uint32_t mask) |
Disable interrupts. More... | |
static uint32_t | RDC_GetInterruptStatus (RDC_Type *base) |
Get the interrupt pending status. More... | |
static void | RDC_ClearInterruptStatus (RDC_Type *base, uint32_t mask) |
Clear interrupt pending status. More... | |
static uint32_t | RDC_GetStatus (RDC_Type *base) |
Get RDC status. More... | |
static void | RDC_ClearStatus (RDC_Type *base, uint32_t mask) |
Clear RDC status. More... | |
void | RDC_SetMasterDomainAssignment (RDC_Type *base, rdc_master_t master, const rdc_domain_assignment_t *domainAssignment) |
Set master domain assignment. More... | |
void | RDC_GetDefaultMasterDomainAssignment (rdc_domain_assignment_t *domainAssignment) |
Get default master domain assignment. More... | |
static void | RDC_LockMasterDomainAssignment (RDC_Type *base, rdc_master_t master) |
Lock master domain assignment. More... | |
void | RDC_SetPeriphAccessConfig (RDC_Type *base, const rdc_periph_access_config_t *config) |
Set peripheral access policy. More... | |
void | RDC_GetDefaultPeriphAccessConfig (rdc_periph_access_config_t *config) |
Get default peripheral access policy. More... | |
static void | RDC_LockPeriphAccessConfig (RDC_Type *base, rdc_periph_t periph) |
Lock peripheral access policy configuration. More... | |
void | RDC_SetMemAccessConfig (RDC_Type *base, const rdc_mem_access_config_t *config) |
Set memory region access policy. More... | |
void | RDC_GetDefaultMemAccessConfig (rdc_mem_access_config_t *config) |
Get default memory region access policy. More... | |
static void | RDC_LockMemAccessConfig (RDC_Type *base, rdc_mem_t mem) |
Lock memory access policy configuration. More... | |
static void | RDC_SetMemAccessValid (RDC_Type *base, rdc_mem_t mem, bool valid) |
Enable or disable memory access policy configuration. More... | |
void | RDC_GetMemViolationStatus (RDC_Type *base, rdc_mem_t mem, rdc_mem_status_t *status) |
Get the memory region violation status. More... | |
static void | RDC_ClearMemViolationFlag (RDC_Type *base, rdc_mem_t mem) |
Clear the memory region violation flag. More... | |
static uint8_t | RDC_GetCurrentMasterDomainId (RDC_Type *base) |
Gets the domain ID of the current bus master. More... | |
struct rdc_hardware_config_t |
Data Fields | |
uint32_t | domainNumber: 4 |
Number of domains. More... | |
uint32_t | masterNumber: 8 |
Number of bus masters. More... | |
uint32_t | periphNumber: 8 |
Number of peripherals. More... | |
uint32_t | memNumber: 8 |
Number of memory regions. More... | |
uint32_t rdc_hardware_config_t::domainNumber |
uint32_t rdc_hardware_config_t::masterNumber |
uint32_t rdc_hardware_config_t::periphNumber |
uint32_t rdc_hardware_config_t::memNumber |
struct rdc_domain_assignment_t |
struct rdc_periph_access_config_t |
Data Fields | |
rdc_periph_t | periph |
Peripheral name. More... | |
bool | lock |
Lock the permission until reset. More... | |
bool | enableSema |
Enable semaphore or not, when enabled, master should call RDC_SEMA42_Lock to lock the semaphore gate accordingly before access the peripheral. More... | |
uint16_t | policy |
Access policy. More... | |
rdc_periph_t rdc_periph_access_config_t::periph |
bool rdc_periph_access_config_t::lock |
bool rdc_periph_access_config_t::enableSema |
uint16_t rdc_periph_access_config_t::policy |
struct rdc_mem_access_config_t |
Note that when setting the baseAddress and endAddress, should be aligned to the region resolution, see rdc_mem_t definitions.
Data Fields | |
rdc_mem_t | mem |
Memory region descriptor name. More... | |
bool | lock |
Lock the configuration. More... | |
uint64_t | baseAddress |
Start address of the memory region. More... | |
uint64_t | endAddress |
End address of the memory region. More... | |
uint16_t | policy |
Access policy. More... | |
rdc_mem_t rdc_mem_access_config_t::mem |
bool rdc_mem_access_config_t::lock |
uint64_t rdc_mem_access_config_t::baseAddress |
uint64_t rdc_mem_access_config_t::endAddress |
uint16_t rdc_mem_access_config_t::policy |
struct rdc_mem_status_t |
enum _rdc_interrupts |
enum _rdc_flags |
enum _rdc_access_policy |
void RDC_Init | ( | RDC_Type * | base | ) |
This function enables the RDC clock.
base | RDC peripheral base address. |
void RDC_Deinit | ( | RDC_Type * | base | ) |
This function disables the RDC clock.
base | RDC peripheral base address. |
void RDC_GetHardwareConfig | ( | RDC_Type * | base, |
rdc_hardware_config_t * | config | ||
) |
This function gets the RDC hardware configurations, including number of bus masters, number of domains, number of memory regions and number of peripherals.
base | RDC peripheral base address. |
config | Pointer to the structure to get the configuration. |
|
inlinestatic |
base | RDC peripheral base address. |
mask | Interrupts to enable, it is OR'ed value of enum _rdc_interrupts. |
|
inlinestatic |
base | RDC peripheral base address. |
mask | Interrupts to disable, it is OR'ed value of enum _rdc_interrupts. |
|
inlinestatic |
base | RDC peripheral base address. |
|
inlinestatic |
base | RDC peripheral base address. |
mask | Status to clear, it is OR'ed value of enum _rdc_interrupts. |
|
inlinestatic |
base | RDC peripheral base address. |
|
inlinestatic |
base | RDC peripheral base address. |
mask | RDC status to clear, it is OR'ed value of enum _rdc_flags. |
void RDC_SetMasterDomainAssignment | ( | RDC_Type * | base, |
rdc_master_t | master, | ||
const rdc_domain_assignment_t * | domainAssignment | ||
) |
base | RDC peripheral base address. |
master | Which master to set. |
domainAssignment | Pointer to the assignment. |
void RDC_GetDefaultMasterDomainAssignment | ( | rdc_domain_assignment_t * | domainAssignment | ) |
The default configuration is:
domainAssignment | Pointer to the assignment. |
|
inlinestatic |
Once locked, it could not be unlocked until next reset.
base | RDC peripheral base address. |
master | Which master to lock. |
void RDC_SetPeriphAccessConfig | ( | RDC_Type * | base, |
const rdc_periph_access_config_t * | config | ||
) |
base | RDC peripheral base address. |
config | Pointer to the policy configuration. |
void RDC_GetDefaultPeriphAccessConfig | ( | rdc_periph_access_config_t * | config | ) |
The default configuration is:
config | Pointer to the policy configuration. |
|
inlinestatic |
Once locked, it could not be unlocked until reset.
base | RDC peripheral base address. |
periph | Which peripheral to lock. |
void RDC_SetMemAccessConfig | ( | RDC_Type * | base, |
const rdc_mem_access_config_t * | config | ||
) |
Note that when setting the baseAddress and endAddress in config
, should be aligned to the region resolution, see rdc_mem_t definitions.
base | RDC peripheral base address. |
config | Pointer to the policy configuration. |
void RDC_GetDefaultMemAccessConfig | ( | rdc_mem_access_config_t * | config | ) |
The default configuration is:
config | Pointer to the policy configuration. |
|
inlinestatic |
Once locked, it could not be unlocked until reset. After locked, you can only call RDC_SetMemAccessValid to enable the configuration, but can not disable it or change other settings.
base | RDC peripheral base address. |
mem | Which memory region to lock. |
|
inlinestatic |
base | RDC peripheral base address. |
mem | Which memory region to operate. |
valid | Pass in true to valid, false to invalid. |
void RDC_GetMemViolationStatus | ( | RDC_Type * | base, |
rdc_mem_t | mem, | ||
rdc_mem_status_t * | status | ||
) |
The first access violation is captured. Subsequent violations are ignored until the status register is cleared. Contents are cleared upon reading the register. Clearing of contents occurs only when the status is read by the memory region's associated domain ID(s).
base | RDC peripheral base address. |
mem | Which memory region to get. |
status | The returned status. |
|
inlinestatic |
base | RDC peripheral base address. |
mem | Which memory region to clear. |
|
inlinestatic |
This function returns the domain ID of the current bus master.
base | RDC peripheral base address. |