MCUXpresso SDK API Reference Manual
Rev 2.12.1
NXP Semiconductors
|
The MCUXpresso SDK provides a driver for the Trusted Resource Domain Controller (TRDC) block of MCUXpresso SDK devices.
The TRDC module includes four submodules, as follows:
Accordingly, the TRDC driver functions could be grouped as follows:
Data Structures | |
struct | trdc_hardware_config_t |
TRDC hardware configuration. More... | |
struct | trdc_slave_memory_hardware_config_t |
Hardware configuration of the two slave memories within each MBC(memory block checker). More... | |
struct | trdc_processor_domain_assignment_t |
Domain assignment for the processor bus master. More... | |
struct | trdc_non_processor_domain_assignment_t |
Domain assignment for the non-processor bus master. More... | |
struct | trdc_idau_config_t |
IDAU(Implementation-Defined Attribution Unit) configuration for TZ-M function control. More... | |
struct | trdc_flw_config_t |
FLW(Flash Logical Window) configuration. More... | |
struct | trdc_domain_error_t |
TRDC domain error definition. More... | |
struct | trdc_memory_access_control_config_t |
Memory access control configuration for MBC/MRC. More... | |
struct | trdc_mrc_region_descriptor_config_t |
The configuration of each region descriptor per domain per MRC instance. More... | |
struct | trdc_mbc_nse_update_config_t |
The configuration of MBC NSE update. More... | |
struct | trdc_mbc_memory_block_config_t |
The configuration of each memory block per domain per MBC instance. More... | |
Enumerations | |
enum | trdc_did_sel_t { kTRDC_DidMda, kTRDC_DidInput, kTRDC_DidMdaAndInput, kTRDC_DidReserved } |
TRDC domain ID select method, the register bit TRDC_MDA_W0_0_DFMT0[DIDS], used for domain hit evaluation. More... | |
enum | trdc_secure_attr_t { kTRDC_ForceSecure, kTRDC_ForceNonSecure, kTRDC_MasterSecure, kTRDC_MasterSecure1 } |
TRDC secure attribute, the register bit TRDC_MDA_W0_0_DFMT0[SA], used for bus master domain assignment. More... | |
enum | trdc_privilege_attr_t { kTRDC_ForceUser, kTRDC_ForcePrivilege, kTRDC_MasterPrivilege, kTRDC_MasterPrivilege1 } |
TRDC privileged attribute, the register bit TRDC_MDA_W0_x_DFMT1[PA], used for non-processor bus master domain assignment. More... | |
enum | trdc_controller_t { kTRDC_MemBlockController0 = 0U, kTRDC_MemBlockController1 = 1U, kTRDC_MemBlockController2 = 2U, kTRDC_MemBlockController3 = 3U, kTRDC_MemRegionChecker0 = 4U, kTRDC_MemRegionChecker1 = 5U } |
TRDC controller definition for domain error check. More... | |
enum | trdc_error_state_t { kTRDC_ErrorStateNone = 0x00U, kTRDC_ErrorStateNone1 = 0x01U, kTRDC_ErrorStateSingle = 0x02U, kTRDC_ErrorStateMulti = 0x03U } |
TRDC domain error state definition TRDC_MBCn_DERR_W1[EST] or TRDC_MRCn_DERR_W1[EST]. More... | |
enum | trdc_error_attr_t { kTRDC_ErrorSecureUserInst = 0x00U, kTRDC_ErrorSecureUserData = 0x01U, kTRDC_ErrorSecurePrivilegeInst = 0x02U, kTRDC_ErrorSecurePrivilegeData = 0x03U, kTRDC_ErrorNonSecureUserInst = 0x04U, kTRDC_ErrorNonSecureUserData = 0x05U, kTRDC_ErrorNonSecurePrivilegeInst = 0x06U, kTRDC_ErrorNonSecurePrivilegeData = 0x07U } |
TRDC domain error attribute definition TRDC_MBCn_DERR_W1[EATR] or TRDC_MRCn_DERR_W1[EATR]. More... | |
enum | trdc_error_type_t { kTRDC_ErrorTypeRead = 0x00U, kTRDC_ErrorTypeWrite = 0x01U } |
TRDC domain error access type definition TRDC_DERR_W1_n[ERW]. More... | |
enum | _trdc_region_descriptor { kTRDC_RegionDescriptor0 = (1U << 0U), kTRDC_RegionDescriptor1 = (1U << 1U), kTRDC_RegionDescriptor2 = (1U << 2U), kTRDC_RegionDescriptor3 = (1U << 3U), kTRDC_RegionDescriptor4 = (1U << 4U), kTRDC_RegionDescriptor5 = (1U << 5U), kTRDC_RegionDescriptor6 = (1U << 6U), kTRDC_RegionDescriptor7 = (1U << 7U), kTRDC_RegionDescriptor8 = (1U << 8U), kTRDC_RegionDescriptor9 = (1U << 9U), kTRDC_RegionDescriptor10 = (1U << 10U), kTRDC_RegionDescriptor11 = (1U << 11U), kTRDC_RegionDescriptor12 = (1U << 12U), kTRDC_RegionDescriptor13 = (1U << 13U), kTRDC_RegionDescriptor14 = (1U << 14U), kTRDC_RegionDescriptor15 = (1U << 15U) } |
The region descriptor enumeration, used to form a mask to set/clear the NSE bits for one or several regions. More... | |
enum | _trdc_MRC_domain { kTRDC_MrcDomain0 = (1U << 0U), kTRDC_MrcDomain1 = (1U << 1U), kTRDC_MrcDomain2 = (1U << 2U), kTRDC_MrcDomain3 = (1U << 3U), kTRDC_MrcDomain4 = (1U << 4U), kTRDC_MrcDomain5 = (1U << 5U), kTRDC_MrcDomain6 = (1U << 6U), kTRDC_MrcDomain7 = (1U << 7U), kTRDC_MrcDomain8 = (1U << 8U), kTRDC_MrcDomain9 = (1U << 9U), kTRDC_MrcDomain10 = (1U << 10U), kTRDC_MrcDomain11 = (1U << 11U), kTRDC_MrcDomain12 = (1U << 12U), kTRDC_MrcDomain13 = (1U << 13U), kTRDC_MrcDomain14 = (1U << 14U), kTRDC_MrcDomain15 = (1U << 15U) } |
The MRC domain enumeration, used to form a mask to enable/disable the update or clear all NSE bits of one or several domains. More... | |
enum | _trdc_MBC_domain { kTRDC_MbcDomain0 = (1U << 0U), kTRDC_MbcDomain1 = (1U << 1U), kTRDC_MbcDomain2 = (1U << 2U), kTRDC_MbcDomain3 = (1U << 3U), kTRDC_MbcDomain4 = (1U << 4U), kTRDC_MbcDomain5 = (1U << 5U), kTRDC_MbcDomain6 = (1U << 6U), kTRDC_MbcDomain7 = (1U << 7U) } |
The MBC domain enumeration, used to form a mask to enable/disable the update or clear NSE bits of one or several domains. More... | |
enum | _trdc_MBC_memory { kTRDC_MbcSlaveMemory0 = (1U << 0U), kTRDC_MbcSlaveMemory1 = (1U << 1U), kTRDC_MbcSlaveMemory2 = (1U << 2U), kTRDC_MbcSlaveMemory3 = (1U << 3U) } |
The MBC slave memory enumeration, used to form a mask to enable/disable the update or clear NSE bits of one or several memory block. More... | |
enum | _trdc_MBC_bit { kTRDC_MbcBit0 = (1U << 0U), kTRDC_MbcBit1 = (1U << 1U), kTRDC_MbcBit2 = (1U << 2U), kTRDC_MbcBit3 = (1U << 3U), kTRDC_MbcBit4 = (1U << 4U), kTRDC_MbcBit5 = (1U << 5U), kTRDC_MbcBit6 = (1U << 6U), kTRDC_MbcBit7 = (1U << 7U), kTRDC_MbcBit8 = (1U << 8U), kTRDC_MbcBit9 = (1U << 9U), kTRDC_MbcBit10 = (1U << 10U), kTRDC_MbcBit11 = (1U << 11U), kTRDC_MbcBit12 = (1U << 12U), kTRDC_MbcBit13 = (1U << 13U), kTRDC_MbcBit14 = (1U << 14U), kTRDC_MbcBit15 = (1U << 15U), kTRDC_MbcBit16 = (1U << 16U), kTRDC_MbcBit17 = (1U << 17U), kTRDC_MbcBit18 = (1U << 18U), kTRDC_MbcBit19 = (1U << 19U), kTRDC_MbcBit20 = (1U << 20U), kTRDC_MbcBit21 = (1U << 21U), kTRDC_MbcBit22 = (1U << 22U), kTRDC_MbcBit23 = (1U << 23U), kTRDC_MbcBit24 = (1U << 24U), kTRDC_MbcBit25 = (1U << 25U), kTRDC_MbcBit26 = (1U << 26U), kTRDC_MbcBit27 = (1U << 27U), kTRDC_MbcBit28 = (1U << 28U), kTRDC_MbcBit29 = (1U << 29U), kTRDC_MbcBit30 = (1U << 30U), kTRDC_MbcBit31 = (1U << 31U) } |
The MBC bit enumeration, used to form a mask to set/clear configured words' NSE. More... | |
Initialization and deinitialization | |
void | TRDC_Init (TRDC_Type *base) |
Initializes the TRDC module. More... | |
void | TRDC_Deinit (TRDC_Type *base) |
De-initializes the TRDC module. More... | |
Hardware configuration | |
static uint8_t | TRDC_GetCurrentMasterDomainId (TRDC_Type *base) |
Gets the domain ID of the current bus master. More... | |
void | TRDC_GetHardwareConfig (TRDC_Type *base, trdc_hardware_config_t *config) |
Gets the TRDC hardware configuration. More... | |
Master domain assignment | |
static void | TRDC_SetDacGlobalValid (TRDC_Type *base) |
Sets the TRDC DAC(Domain Assignment Controllers) global valid. More... | |
static void | TRDC_LockMasterDomainAssignment (TRDC_Type *base, uint8_t master) |
Locks the bus master domain assignment register. More... | |
static void | TRDC_SetMasterDomainAssignmentValid (TRDC_Type *base, uint8_t master, bool valid) |
Sets the master domain assignment as valid or invalid. More... | |
void | TRDC_GetDefaultProcessorDomainAssignment (trdc_processor_domain_assignment_t *domainAssignment) |
Gets the default master domain assignment for the processor bus master. More... | |
void | TRDC_GetDefaultNonProcessorDomainAssignment (trdc_non_processor_domain_assignment_t *domainAssignment) |
Gets the default master domain assignment for non-processor bus master. More... | |
void | TRDC_SetProcessorDomainAssignment (TRDC_Type *base, const trdc_processor_domain_assignment_t *domainAssignment) |
Sets the processor bus master domain assignment. More... | |
void | TRDC_SetNonProcessorDomainAssignment (TRDC_Type *base, uint8_t master, const trdc_non_processor_domain_assignment_t *domainAssignment) |
Sets the non-processor bus master domain assignment. More... | |
TZ-M congiguration | |
void | TRDC_GetDefaultIDAUConfig (trdc_idau_config_t *idauConfiguration) |
Gets the default IDAU(Implementation-Defined Attribution Unit) configuration. More... | |
void | TRDC_SetIDAU (TRDC_Type *base, const trdc_idau_config_t *idauConfiguration) |
Sets the IDAU(Implementation-Defined Attribution Unit) control configuration. More... | |
FLW(Flash Logical Window) configuration | |
static void | TRDC_EnableFlashLogicalWindow (TRDC_Type *base, bool enable) |
Enables/disables the FLW(flash logical window) function. More... | |
static void | TRDC_LockFlashLogicalWindow (TRDC_Type *base) |
Locks FLW registers. More... | |
static uint32_t | TRDC_GetFlashLogicalWindowPbase (TRDC_Type *base) |
Gets the FLW physical base address. More... | |
static void | TRDC_GetSetFlashLogicalWindowSize (TRDC_Type *base, uint16_t size) |
Sets the FLW size. More... | |
void | TRDC_GetDefaultFlashLogicalWindowConfig (trdc_flw_config_t *flwConfiguration) |
Gets the default FLW(Flsh Logical Window) configuration. More... | |
void | TRDC_SetFlashLogicalWindow (TRDC_Type *base, const trdc_flw_config_t *flwConfiguration) |
Sets the FLW function's configuration. More... | |
Domain error check and clear | |
status_t | TRDC_GetAndClearFirstDomainError (TRDC_Type *base, trdc_domain_error_t *error) |
Gets and clears the first domain error of the current domain. More... | |
status_t | TRDC_GetAndClearFirstSpecificDomainError (TRDC_Type *base, trdc_domain_error_t *error, uint8_t domainId) |
Gets and clears the first domain error of the specific domain. More... | |
MRC configuration | |
static void | TRDC_SetMrcGlobalValid (TRDC_Type *base) |
Sets the TRDC MRC(Memory Region Checkers) global valid. More... | |
static uint8_t | TRDC_GetMrcRegionNumber (TRDC_Type *base, uint8_t mrcIdx) |
Gets the TRDC MRC(Memory Region Checkers) region number valid. More... | |
void | TRDC_MrcSetMemoryAccessConfig (TRDC_Type *base, const trdc_memory_access_control_config_t *config, uint8_t mrcIdx, uint8_t regIdx) |
Sets the memory access configuration for one of the access control register of one MRC. More... | |
void | TRDC_MrcEnableDomainNseUpdate (TRDC_Type *base, uint8_t mrcIdx, uint16_t domianMask, bool enable) |
Enables the update of the selected domians. More... | |
void | TRDC_MrcRegionNseSet (TRDC_Type *base, uint8_t mrcIdx, uint16_t regionMask) |
Sets the NSE bits of the selected regions for domains. More... | |
void | TRDC_MrcRegionNseClear (TRDC_Type *base, uint8_t mrcIdx, uint16_t regionMask) |
Clears the NSE bits of the selected regions for domains. More... | |
void | TRDC_MrcDomainNseClear (TRDC_Type *base, uint8_t mrcIdx, uint16_t domianMask) |
Clears the NSE bits for all the regions of the selected domains. More... | |
void | TRDC_MrcSetRegionDescriptorConfig (TRDC_Type *base, const trdc_mrc_region_descriptor_config_t *config) |
Sets the configuration for one of the region descriptor per domain per MRC instnce. More... | |
MBC configuration | |
static void | TRDC_SetMbcGlobalValid (TRDC_Type *base) |
Sets the TRDC MBC(Memory Block Checkers) global valid. More... | |
void | TRDC_GetMbcHardwareConfig (TRDC_Type *base, trdc_slave_memory_hardware_config_t *config, uint8_t mbcIdx, uint8_t slvIdx) |
Gets the hardware configuration of the one of two slave memories within each MBC(memory block checker). More... | |
void | TRDC_MbcSetNseUpdateConfig (TRDC_Type *base, const trdc_mbc_nse_update_config_t *config, uint8_t mbcIdx) |
Sets the NSR update configuration for one of the MBC instance. More... | |
void | TRDC_MbcWordNseSet (TRDC_Type *base, uint8_t mbcIdx, uint32_t bitMask) |
Sets the NSE bits of the selected configuration words according to NSE update configuration. More... | |
void | TRDC_MbcWordNseClear (TRDC_Type *base, uint8_t mbcIdx, uint32_t bitMask) |
Clears the NSE bits of the selected configuration words according to NSE update configuration. More... | |
void | TRDC_MbcNseClearAll (TRDC_Type *base, uint8_t mbcIdx, uint8_t domainMask, uint8_t memoryMask) |
Clears all configuration words' NSE bits of the selected domain and memory. More... | |
void | TRDC_MbcSetMemoryAccessConfig (TRDC_Type *base, const trdc_memory_access_control_config_t *config, uint8_t mbcIdx, uint8_t rgdIdx) |
Sets the memory access configuration for one of the region descriptor of one MBC. More... | |
void | TRDC_MbcSetMemoryBlockConfig (TRDC_Type *base, const trdc_mbc_memory_block_config_t *config) |
Sets the configuration for one of the memory block per domain per MBC instnce. More... | |
struct trdc_hardware_config_t |
Data Fields | |
uint8_t | masterNumber |
Number of bus masters. More... | |
uint8_t | domainNumber |
Number of domains. More... | |
uint8_t | mbcNumber |
Number of MBCs. More... | |
uint8_t | mrcNumber |
Number of MRCs. More... | |
uint8_t trdc_hardware_config_t::masterNumber |
uint8_t trdc_hardware_config_t::domainNumber |
uint8_t trdc_hardware_config_t::mbcNumber |
uint8_t trdc_hardware_config_t::mrcNumber |
struct trdc_slave_memory_hardware_config_t |
struct trdc_processor_domain_assignment_t |
Data Fields | |
uint32_t | domainId: 3U |
Domain ID. More... | |
uint32_t | __pad0__: 1U |
Reserved. More... | |
uint32_t | domainIdSelect: 2U |
Domain ID select method, see trdc_did_sel_t. More... | |
uint32_t | __pad1__: 8U |
Reserved. More... | |
uint32_t | secureAttr: 2U |
Secure attribute, see trdc_secure_attr_t. More... | |
uint32_t | __pad2__: 14U |
Reserved. More... | |
uint32_t | lock: 1U |
Lock the register. More... | |
uint32_t | __pad3__: 1U |
Reserved. More... | |
uint32_t trdc_processor_domain_assignment_t::domainId |
uint32_t trdc_processor_domain_assignment_t::__pad0__ |
uint32_t trdc_processor_domain_assignment_t::domainIdSelect |
uint32_t trdc_processor_domain_assignment_t::__pad1__ |
uint32_t trdc_processor_domain_assignment_t::secureAttr |
uint32_t trdc_processor_domain_assignment_t::__pad2__ |
uint32_t trdc_processor_domain_assignment_t::lock |
uint32_t trdc_processor_domain_assignment_t::__pad3__ |
struct trdc_non_processor_domain_assignment_t |
Data Fields | |
uint32_t | domainId: 3U |
Domain ID. More... | |
uint32_t | __pad0__: 1U |
Reserved. More... | |
uint32_t | privilegeAttr: 2U |
Privileged attribute, see trdc_privilege_attr_t. More... | |
uint32_t | secureAttr: 2U |
Secure attribute, see trdc_secure_attr_t. More... | |
uint32_t | bypassDomainId: 1U |
Bypass domain ID. More... | |
uint32_t | __pad1__: 21U |
Reserved. More... | |
uint32_t | lock: 1U |
Lock the register. More... | |
uint32_t | __pad2__: 1U |
Reserved. More... | |
uint32_t trdc_non_processor_domain_assignment_t::domainId |
uint32_t trdc_non_processor_domain_assignment_t::__pad0__ |
uint32_t trdc_non_processor_domain_assignment_t::privilegeAttr |
uint32_t trdc_non_processor_domain_assignment_t::secureAttr |
uint32_t trdc_non_processor_domain_assignment_t::bypassDomainId |
uint32_t trdc_non_processor_domain_assignment_t::__pad1__ |
uint32_t trdc_non_processor_domain_assignment_t::lock |
uint32_t trdc_non_processor_domain_assignment_t::__pad2__ |
struct trdc_idau_config_t |
Data Fields | |
uint32_t | __pad0__: 8U |
Reserved. More... | |
uint32_t | lockSecureVTOR: 1U |
Disable writes to secure VTOR(Vector Table Offset Register). More... | |
uint32_t | lockNonsecureVTOR: 1U |
Disable writes to non-secure VTOR, Application interrupt and Reset Control Registers. More... | |
uint32_t | lockSecureMPU: 1U |
Disable writes to secure MPU(Memory Protection Unit) from software or from a debug agent connected to the processor in Secure state. More... | |
uint32_t | lockNonsecureMPU: 1U |
Disable writes to non-secure MPU(Memory Protection Unit) from software or from a debug agent connected to the processor. More... | |
uint32_t | lockSAU: 1U |
Disable writes to SAU(Security Attribution Unit) registers. More... | |
uint32_t | __pad1__: 19U |
Reserved. More... | |
uint32_t trdc_idau_config_t::__pad0__ |
uint32_t trdc_idau_config_t::lockSecureVTOR |
uint32_t trdc_idau_config_t::lockNonsecureVTOR |
uint32_t trdc_idau_config_t::lockSecureMPU |
uint32_t trdc_idau_config_t::lockNonsecureMPU |
uint32_t trdc_idau_config_t::lockSAU |
uint32_t trdc_idau_config_t::__pad1__ |
struct trdc_flw_config_t |
Data Fields | |
uint16_t | blockCount |
Block count of the Flash Logic Window in 32KByte blocks. More... | |
uint32_t | arrayBaseAddr |
Flash array base address of the Flash Logical Window. More... | |
bool | lock |
Disable writes to FLW registers. More... | |
bool | enable |
Enable FLW function. More... | |
uint16_t trdc_flw_config_t::blockCount |
uint32_t trdc_flw_config_t::arrayBaseAddr |
bool trdc_flw_config_t::lock |
bool trdc_flw_config_t::enable |
struct trdc_domain_error_t |
Data Fields | |
trdc_controller_t | controller |
Which controller captured access violation. More... | |
uint32_t | address |
Access address that generated access violation. More... | |
trdc_error_state_t | errorState |
Error state. More... | |
trdc_error_attr_t | errorAttr |
Error attribute. More... | |
trdc_error_type_t | errorType |
Error type. More... | |
uint8_t | errorPort |
Error port. More... | |
uint8_t | domainId |
Domain ID. More... | |
uint8_t | slaveMemoryIdx |
The slave memory index. More... | |
trdc_controller_t trdc_domain_error_t::controller |
uint32_t trdc_domain_error_t::address |
trdc_error_state_t trdc_domain_error_t::errorState |
trdc_error_attr_t trdc_domain_error_t::errorAttr |
trdc_error_type_t trdc_domain_error_t::errorType |
uint8_t trdc_domain_error_t::errorPort |
uint8_t trdc_domain_error_t::domainId |
uint8_t trdc_domain_error_t::slaveMemoryIdx |
Only apply when violation in MBC.
struct trdc_memory_access_control_config_t |
Data Fields | |
uint32_t | nonsecureUsrX: 1U |
Allow nonsecure user execute access. More... | |
uint32_t | nonsecureUsrW: 1U |
Allow nonsecure user write access. More... | |
uint32_t | nonsecureUsrR: 1U |
Allow nonsecure user read access. More... | |
uint32_t | __pad0__: 1U |
Reserved. More... | |
uint32_t | nonsecurePrivX: 1U |
Allow nonsecure privilege execute access. More... | |
uint32_t | nonsecurePrivW: 1U |
Allow nonsecure privilege write access. More... | |
uint32_t | nonsecurePrivR: 1U |
Allow nonsecure privilege read access. More... | |
uint32_t | __pad1__: 1U |
Reserved. More... | |
uint32_t | secureUsrX: 1U |
Allow secure user execute access. More... | |
uint32_t | secureUsrW: 1U |
Allow secure user write access. More... | |
uint32_t | secureUsrR: 1U |
Allow secure user read access. More... | |
uint32_t | __pad2__: 1U |
Reserved. More... | |
uint32_t | securePrivX: 1U |
Allownsecure privilege execute access. More... | |
uint32_t | securePrivW: 1U |
Allownsecure privilege write access. More... | |
uint32_t | securePrivR: 1U |
Allownsecure privilege read access. More... | |
uint32_t | __pad3__: 16U |
Reserved. More... | |
uint32_t | lock: 1U |
Lock the configuration until next reset, only apply to access control register 0. More... | |
uint32_t trdc_memory_access_control_config_t::nonsecureUsrX |
uint32_t trdc_memory_access_control_config_t::nonsecureUsrW |
uint32_t trdc_memory_access_control_config_t::nonsecureUsrR |
uint32_t trdc_memory_access_control_config_t::__pad0__ |
uint32_t trdc_memory_access_control_config_t::nonsecurePrivX |
uint32_t trdc_memory_access_control_config_t::nonsecurePrivW |
uint32_t trdc_memory_access_control_config_t::nonsecurePrivR |
uint32_t trdc_memory_access_control_config_t::__pad1__ |
uint32_t trdc_memory_access_control_config_t::secureUsrX |
uint32_t trdc_memory_access_control_config_t::secureUsrW |
uint32_t trdc_memory_access_control_config_t::secureUsrR |
uint32_t trdc_memory_access_control_config_t::__pad2__ |
uint32_t trdc_memory_access_control_config_t::securePrivX |
uint32_t trdc_memory_access_control_config_t::securePrivW |
uint32_t trdc_memory_access_control_config_t::securePrivR |
uint32_t trdc_memory_access_control_config_t::__pad3__ |
uint32_t trdc_memory_access_control_config_t::lock |
struct trdc_mrc_region_descriptor_config_t |
Data Fields | |
uint8_t | memoryAccessControlSelect |
Select one of the 8 access control policies for this region, for access cotrol policies see trdc_memory_access_control_config_t. More... | |
uint32_t | startAddr |
Physical start address. More... | |
bool | valid |
Lock the register. More... | |
bool | nseEnable |
Enable non-secure accesses and disable secure accesses. More... | |
uint32_t | endAddr |
Physical start address. More... | |
uint8_t | mrcIdx |
The index of the MRC for this configuration to take effect. More... | |
uint8_t | domainIdx |
The index of the domain for this configuration to take effect. More... | |
uint8_t | regionIdx |
The index of the region for this configuration to take effect. More... | |
uint8_t trdc_mrc_region_descriptor_config_t::memoryAccessControlSelect |
uint32_t trdc_mrc_region_descriptor_config_t::startAddr |
bool trdc_mrc_region_descriptor_config_t::valid |
bool trdc_mrc_region_descriptor_config_t::nseEnable |
uint32_t trdc_mrc_region_descriptor_config_t::endAddr |
uint8_t trdc_mrc_region_descriptor_config_t::mrcIdx |
uint8_t trdc_mrc_region_descriptor_config_t::domainIdx |
uint8_t trdc_mrc_region_descriptor_config_t::regionIdx |
struct trdc_mbc_nse_update_config_t |
Data Fields | |
uint32_t | __pad0__: 2U |
Reserved. More... | |
uint32_t | wordIdx: 4U |
MBC configuration word index to be updated. More... | |
uint32_t | __pad1__: 2U |
Reserved. More... | |
uint32_t | memorySelect: 4U |
Bit mask of the selected memory to be updated. More... | |
uint32_t | __pad2__: 4U |
Reserved. More... | |
uint32_t | domianSelect: 8U |
Bit mask of the selected domain to be updated. More... | |
uint32_t | __pad3__: 7U |
Reserved. More... | |
uint32_t | autoIncrement: 1U |
Whether to increment the word index after current word is updated using this configuration. More... | |
uint32_t trdc_mbc_nse_update_config_t::__pad0__ |
uint32_t trdc_mbc_nse_update_config_t::wordIdx |
uint32_t trdc_mbc_nse_update_config_t::__pad1__ |
uint32_t trdc_mbc_nse_update_config_t::memorySelect |
uint32_t trdc_mbc_nse_update_config_t::__pad2__ |
uint32_t trdc_mbc_nse_update_config_t::domianSelect |
uint32_t trdc_mbc_nse_update_config_t::__pad3__ |
uint32_t trdc_mbc_nse_update_config_t::autoIncrement |
struct trdc_mbc_memory_block_config_t |
Data Fields | |
uint32_t | memoryAccessControlSelect: 3U |
Select one of the 8 access control policies for this memory block, for access cotrol policies see trdc_memory_access_control_config_t. More... | |
uint32_t | nseEnable: 1U |
Enable non-secure accesses and disable secure accesses. More... | |
uint32_t | mbcIdx: 4U |
The index of the MBC for this configuration to take effect. More... | |
uint32_t | domainIdx: 8U |
The index of the domain for this configuration to take effect. More... | |
uint32_t | slaveMemoryIdx: 8U |
The index of the slave memory for this configuration to take effect. More... | |
uint32_t | memoryBlockIdx: 8U |
The index of the memory block for this configuration to take effect. More... | |
uint32_t trdc_mbc_memory_block_config_t::memoryAccessControlSelect |
uint32_t trdc_mbc_memory_block_config_t::nseEnable |
uint32_t trdc_mbc_memory_block_config_t::mbcIdx |
uint32_t trdc_mbc_memory_block_config_t::domainIdx |
uint32_t trdc_mbc_memory_block_config_t::slaveMemoryIdx |
uint32_t trdc_mbc_memory_block_config_t::memoryBlockIdx |
enum trdc_did_sel_t |
enum trdc_secure_attr_t |
enum trdc_controller_t |
enum trdc_error_state_t |
enum trdc_error_attr_t |
enum trdc_error_type_t |
enum _trdc_MRC_domain |
enum _trdc_MBC_domain |
enum _trdc_MBC_memory |
enum _trdc_MBC_bit |
void TRDC_Init | ( | TRDC_Type * | base | ) |
This function enables the TRDC clock.
base | TRDC peripheral base address. |
void TRDC_Deinit | ( | TRDC_Type * | base | ) |
This function disables the TRDC clock.
base | TRDC peripheral base address. |
|
inlinestatic |
base | TRDC peripheral base address. |
void TRDC_GetHardwareConfig | ( | TRDC_Type * | base, |
trdc_hardware_config_t * | config | ||
) |
This function gets the TRDC hardware configurations, including number of bus masters, number of domains, number of MRCs and number of PACs.
base | TRDC peripheral base address. |
config | Pointer to the structure to get the configuration. |
|
inlinestatic |
Once enabled, it will remain enabled until next reset.
base | TRDC peripheral base address. |
|
inlinestatic |
This function locks the master domain assignment. After it is locked, the register can't be changed until next reset.
base | TRDC peripheral base address. |
master | Which master to configure. |
assignIndex | Which assignment register to lock. |
|
inlinestatic |
This function sets the master domain assignment as valid or invalid.
base | TRDC peripheral base address. |
master | Which master to configure. |
assignIndex | Index for the domain assignment register. |
valid | True to set valid, false to set invalid. |
void TRDC_GetDefaultProcessorDomainAssignment | ( | trdc_processor_domain_assignment_t * | domainAssignment | ) |
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:
domainAssignment | Pointer to the assignment structure. |
void TRDC_GetDefaultNonProcessorDomainAssignment | ( | trdc_non_processor_domain_assignment_t * | domainAssignment | ) |
This function gets the default master domain assignment for non-processor bus master. It should only be used for the non-processor bus masters, such as DMA. This function sets the assignment as follows:
domainAssignment | Pointer to the assignment structure. |
void TRDC_SetProcessorDomainAssignment | ( | TRDC_Type * | base, |
const trdc_processor_domain_assignment_t * | domainAssignment | ||
) |
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.
base | TRDC peripheral base address. |
domainAssignment | Pointer to the assignment structure. |
void TRDC_SetNonProcessorDomainAssignment | ( | TRDC_Type * | base, |
uint8_t | master, | ||
const trdc_non_processor_domain_assignment_t * | domainAssignment | ||
) |
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.
base | TRDC peripheral base address. |
master | Which master to configure. |
assignIndex | Which assignment register to set. |
domainAssignment | Pointer to the assignment structure. |
void TRDC_GetDefaultIDAUConfig | ( | trdc_idau_config_t * | idauConfiguration | ) |
domainAssignment | Pointer to the configuration structure. |
void TRDC_SetIDAU | ( | TRDC_Type * | base, |
const trdc_idau_config_t * | idauConfiguration | ||
) |
Example: Lock the secure and non-secure MPU registers.
base | TRDC peripheral base address. |
domainAssignment | Pointer to the configuration structure. |
|
inlinestatic |
base | TRDC peripheral base address. |
enable | True to enable, false to disable. |
|
inlinestatic |
Once locked the registers can noy be updated until next reset.
base | TRDC peripheral base address. |
|
inlinestatic |
base | TRDC peripheral base address. |
|
inlinestatic |
base | TRDC peripheral base address. |
size | Size of the FLW in unit of 32k bytes. |
void TRDC_GetDefaultFlashLogicalWindowConfig | ( | trdc_flw_config_t * | flwConfiguration | ) |
flwConfiguration | Pointer to the configuration structure. |
void TRDC_SetFlashLogicalWindow | ( | TRDC_Type * | base, |
const trdc_flw_config_t * | flwConfiguration | ||
) |
base | TRDC peripheral base address. |
flwConfiguration | Pointer to the configuration structure. |
status_t TRDC_GetAndClearFirstDomainError | ( | TRDC_Type * | base, |
trdc_domain_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.
base | TRDC peripheral base address. |
error | Pointer to the error information. return 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_NoData. |
status_t TRDC_GetAndClearFirstSpecificDomainError | ( | TRDC_Type * | base, |
trdc_domain_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.
base | TRDC peripheral base address. |
error | Pointer to the error information. |
domainId | The error of which domain to get and clear. return 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_NoData. |
|
inlinestatic |
Once enabled, it will remain enabled until next reset.
base | TRDC peripheral base address. |
|
inlinestatic |
base | TRDC peripheral base address. |
void TRDC_MrcSetMemoryAccessConfig | ( | TRDC_Type * | base, |
const trdc_memory_access_control_config_t * | config, | ||
uint8_t | mrcIdx, | ||
uint8_t | regIdx | ||
) |
Example: Enable the secure operations and lock the configuration for MRC0 region 1.
base | TRDC peripheral base address. |
config | Pointer to the configuration structure. |
mrcIdx | MRC index. |
regIdx | Register number. |
void TRDC_MrcEnableDomainNseUpdate | ( | TRDC_Type * | base, |
uint8_t | mrcIdx, | ||
uint16_t | domianMask, | ||
bool | enable | ||
) |
After the domians' update are enabled, their regions' NSE bits can be set or clear.
base | TRDC peripheral base address. |
mrcIdx | MRC index. |
domianMask | Bit mask of the domains to be enabled. |
enable | True to enable, false to disable. |
void TRDC_MrcRegionNseSet | ( | TRDC_Type * | base, |
uint8_t | mrcIdx, | ||
uint16_t | regionMask | ||
) |
This function sets the NSE bits for the selected regions for the domains whose update are enabled.
base | TRDC peripheral base address. |
mrcIdx | MRC index. |
regionMask | Bit mask of the regions whose NSE bits to set. |
void TRDC_MrcRegionNseClear | ( | TRDC_Type * | base, |
uint8_t | mrcIdx, | ||
uint16_t | regionMask | ||
) |
This function clears the NSE bits for the selected regions for the domains whose update are enabled.
base | TRDC peripheral base address. |
mrcIdx | MRC index. |
regionMask | Bit mask of the regions whose NSE bits to clear. |
void TRDC_MrcDomainNseClear | ( | TRDC_Type * | base, |
uint8_t | mrcIdx, | ||
uint16_t | domianMask | ||
) |
This function clears the NSE bits for all regions of selected domains whose update are enabled.
base | TRDC peripheral base address. |
mrcIdx | MRC index. |
domianMask | Bit mask of the domians whose NSE bits to clear. |
void TRDC_MrcSetRegionDescriptorConfig | ( | TRDC_Type * | base, |
const trdc_mrc_region_descriptor_config_t * | config | ||
) |
This function sets the configuration for one of the region descriptor, including the start and end address of the region, memory access control policy and valid.
base | TRDC peripheral base address. |
config | Pointer to region descriptor configuration structure. |
|
inlinestatic |
Once enabled, it will remain enabled until next reset.
base | TRDC peripheral base address. |
void TRDC_GetMbcHardwareConfig | ( | TRDC_Type * | base, |
trdc_slave_memory_hardware_config_t * | config, | ||
uint8_t | mbcIdx, | ||
uint8_t | slvIdx | ||
) |
base | TRDC peripheral base address. |
config | Pointer to the structure to get the configuration. |
mbcIdx | MBC number. |
slvIdx | Slave number. |
void TRDC_MbcSetNseUpdateConfig | ( | TRDC_Type * | base, |
const trdc_mbc_nse_update_config_t * | config, | ||
uint8_t | mbcIdx | ||
) |
After set the NSE configuration, the configured memory area can be updateby NSE set/clear.
base | TRDC peripheral base address. |
config | Pointer to NSE update configuration structure. |
mbcIdx | MBC index. |
void TRDC_MbcWordNseSet | ( | TRDC_Type * | base, |
uint8_t | mbcIdx, | ||
uint32_t | bitMask | ||
) |
This function sets the NSE bits of the word for the configured regio, memory.
base | TRDC peripheral base address. |
mbcIdx | MBC index. |
bitMask | Mask of the bits whose NSE bits to set. |
void TRDC_MbcWordNseClear | ( | TRDC_Type * | base, |
uint8_t | mbcIdx, | ||
uint32_t | bitMask | ||
) |
This function sets the NSE bits of the word for the configured regio, memory.
base | TRDC peripheral base address. |
mbcIdx | MBC index. |
bitMask | Mask of the bits whose NSE bits to clear. |
void TRDC_MbcNseClearAll | ( | TRDC_Type * | base, |
uint8_t | mbcIdx, | ||
uint8_t | domainMask, | ||
uint8_t | memoryMask | ||
) |
base | TRDC peripheral base address. |
mbcIdx | MBC index. |
bitMask | Mask of the bits whose NSE bits to clear. |
void TRDC_MbcSetMemoryAccessConfig | ( | TRDC_Type * | base, |
const trdc_memory_access_control_config_t * | config, | ||
uint8_t | mbcIdx, | ||
uint8_t | rgdIdx | ||
) |
Example: Enable the secure operations and lock the configuration for MRC0 region 1.
base | TRDC peripheral base address. |
config | Pointer to the configuration structure. |
mbcIdx | MBC index. |
rgdIdx | Region descriptor number. |
void TRDC_MbcSetMemoryBlockConfig | ( | TRDC_Type * | base, |
const trdc_mbc_memory_block_config_t * | config | ||
) |
This function sets the configuration for one of the memory block, including the memory access control policy and nse enable.
base | TRDC peripheral base address. |
config | Pointer to memory block configuration structure. |