11#include "fsl_common.h"
21#define FSL_RDC_DRIVER_VERSION (MAKE_VERSION(2, 2, 0))
23#define RDC_ACCESS_POLICY(domainID, policy) (uint16_t)((uint16_t)(policy) << ((domainID)*2U))
119#if defined(__cplusplus)
158static inline void RDC_EnableInterrupts(
RDC_Type *base, uint32_t mask)
160 base->INTCTRL |= mask;
169static inline void RDC_DisableInterrupts(
RDC_Type *base, uint32_t mask)
171 base->INTCTRL &= ~mask;
180static inline uint32_t RDC_GetInterruptStatus(
RDC_Type *base)
182 return base->INTSTAT;
191static inline void RDC_ClearInterruptStatus(
RDC_Type *base, uint32_t mask)
193 base->INTSTAT = mask;
202static inline uint32_t RDC_GetStatus(
RDC_Type *base)
213static inline void RDC_ClearStatus(
RDC_Type *base, uint32_t mask)
252 assert((uint32_t)master < RDC_MDA_COUNT);
254 base->MDA[master] |= RDC_MDA_LCK_MASK;
291static inline void RDC_LockPeriphAccessConfig(
RDC_Type *base, rdc_periph_t periph)
293 assert((uint32_t)periph < RDC_PDAP_COUNT);
295 base->PDAP[periph] |= RDC_PDAP_LCK_MASK;
307static inline uint8_t RDC_GetPeriphAccessPolicy(
RDC_Type *base, rdc_periph_t periph, uint8_t domainId)
309 assert((uint32_t)periph < RDC_PDAP_COUNT);
311 return (uint8_t)((base->PDAP[periph] >> (domainId * 2U)) & 0x03U);
354static inline void RDC_LockMemAccessConfig(
RDC_Type *base, rdc_mem_t mem)
356 assert((uint32_t)mem < RDC_MRC_COUNT);
358 base->MR[mem].MRC |= RDC_MRC_LCK_MASK;
369static inline void RDC_SetMemAccessValid(
RDC_Type *base, rdc_mem_t mem,
bool valid)
371 assert((uint32_t)mem < RDC_MRC_COUNT);
375 base->MR[mem].MRC |= RDC_MRC_ENA_MASK;
379 base->MR[mem].MRC &= ~RDC_MRC_ENA_MASK;
404static inline void RDC_ClearMemViolationFlag(
RDC_Type *base, rdc_mem_t mem)
406 assert((uint32_t)mem < RDC_MRC_COUNT);
408 base->MR[mem].MRVS = RDC_MRVS_AD_MASK;
419static inline uint8_t RDC_GetMemAccessPolicy(
RDC_Type *base, rdc_mem_t mem, uint8_t domainId)
421 assert((uint32_t)mem < RDC_MRC_COUNT);
423 return (uint8_t)((base->MR[mem].MRC >> (domainId * 2U)) & 0x03U);
434static inline uint8_t RDC_GetCurrentMasterDomainId(
RDC_Type *base)
436 return (uint8_t)((base->STAT & RDC_STAT_DID_MASK) >> RDC_STAT_DID_SHIFT);
439#if defined(__cplusplus)
__STATIC_FORCEINLINE void __DSB(void)
Data Synchronization Barrier.
Definition: cmsis_gcc.h:286
enum _rdc_master rdc_master_t
Structure for the RDC mapping.
struct _rdc_hardware_config rdc_hardware_config_t
RDC hardware configuration.
_rdc_flags
RDC status.
Definition: fsl_rdc.h:50
void RDC_GetDefaultPeriphAccessConfig(rdc_periph_access_config_t *config)
Get default peripheral access policy.
Definition: fsl_rdc.c:205
_rdc_interrupts
RDC interrupts.
Definition: fsl_rdc.h:41
void RDC_GetDefaultMasterDomainAssignment(rdc_domain_assignment_t *domainAssignment)
Get default master domain assignment.
Definition: fsl_rdc.c:152
void RDC_Init(RDC_Type *base)
Initializes the RDC module.
Definition: fsl_rdc.c:83
struct _rdc_mem_status rdc_mem_status_t
Memory region access violation status.
void RDC_GetHardwareConfig(RDC_Type *base, rdc_hardware_config_t *config)
Gets the RDC hardware configuration.
Definition: fsl_rdc.c:113
void RDC_GetMemViolationStatus(RDC_Type *base, rdc_mem_t mem, rdc_mem_status_t *status)
Get the memory region violation status.
Definition: fsl_rdc.c:295
void RDC_SetMemAccessConfig(RDC_Type *base, const rdc_mem_access_config_t *config)
Set memory region access policy.
Definition: fsl_rdc.c:228
struct _rdc_mem_access_config rdc_mem_access_config_t
Memory region domain access control configuration.
struct _rdc_periph_access_config rdc_periph_access_config_t
Peripheral domain access permission configuration.
void RDC_SetMasterDomainAssignment(RDC_Type *base, rdc_master_t master, const rdc_domain_assignment_t *domainAssignment)
Set master domain assignment.
Definition: fsl_rdc.c:130
_rdc_access_policy
Access permission policy.
Definition: fsl_rdc.h:68
void RDC_GetDefaultMemAccessConfig(rdc_mem_access_config_t *config)
Get default memory region access policy.
Definition: fsl_rdc.c:269
void RDC_Deinit(RDC_Type *base)
De-initializes the RDC module.
Definition: fsl_rdc.c:97
void RDC_SetPeriphAccessConfig(RDC_Type *base, const rdc_periph_access_config_t *config)
Set peripheral access policy.
Definition: fsl_rdc.c:168
struct _rdc_domain_assignment rdc_domain_assignment_t
Master domain assignment.
@ kRDC_PowerDownDomainOn
Definition: fsl_rdc.h:51
@ kRDC_RestoreCompleteInterrupt
Definition: fsl_rdc.h:42
@ kRDC_NoAccess
Definition: fsl_rdc.h:69
@ kRDC_ReadWrite
Definition: fsl_rdc.h:72
@ kRDC_ReadOnly
Definition: fsl_rdc.h:71
@ kRDC_WriteOnly
Definition: fsl_rdc.h:70
Definition: MIMXRT1166_cm4.h:72217
Master domain assignment.
Definition: fsl_rdc.h:58
uint32_t lock
Definition: fsl_rdc.h:61
uint32_t domainId
Definition: fsl_rdc.h:59
RDC hardware configuration.
Definition: fsl_rdc.h:29
uint32_t domainNumber
Definition: fsl_rdc.h:30
uint32_t masterNumber
Definition: fsl_rdc.h:31
uint32_t periphNumber
Definition: fsl_rdc.h:32
uint32_t memNumber
Definition: fsl_rdc.h:33
Memory region domain access control configuration.
Definition: fsl_rdc.h:96
uint64_t endAddress
Definition: fsl_rdc.h:101
rdc_mem_t mem
Definition: fsl_rdc.h:97
uint16_t policy
Definition: fsl_rdc.h:102
bool lock
Definition: fsl_rdc.h:99
uint64_t baseAddress
Definition: fsl_rdc.h:100
Memory region access violation status.
Definition: fsl_rdc.h:109
uint8_t domainID
Definition: fsl_rdc.h:111
uint64_t address
Definition: fsl_rdc.h:112
bool hasViolation
Definition: fsl_rdc.h:110
Peripheral domain access permission configuration.
Definition: fsl_rdc.h:79
rdc_periph_t periph
Definition: fsl_rdc.h:80
uint16_t policy
Definition: fsl_rdc.h:85
bool enableSema
Definition: fsl_rdc.h:82
bool lock
Definition: fsl_rdc.h:81
Definition: deflate.c:114