MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Otfad

Overview

Data Structures

struct  otfad_encryption_config_t
 OTFAD encryption configuration structure. More...
 
struct  otfad_config_t
 OTFAD configuration structure. More...
 

Enumerations

enum  {
  kStatus_OTFAD_ResRegAccessMode = MAKE_STATUS(kStatusGroup_OTFAD, 0),
  kStatus_OTFAD_AddressError = MAKE_STATUS(kStatusGroup_OTFAD, 1),
  kStatus_OTFAD_RegionOverlap,
  kStatus_OTFAD_RegionMiss
}
 Status codes for the OTFAD driver. More...
 
enum  {
  kOTFAD_Context_0 = 0U,
  kOTFAD_Context_1 = 1U,
  kOTFAD_Context_2 = 2U,
  kOTFAD_Context_3 = 3U
}
 OTFAD context type. More...
 
enum  {
  kOTFAD_NRM = 0x00U,
  kOTFAD_SVM = 0x02U,
  kOTFAD_LDM = 0x03U
}
 OTFAD operate mode. More...
 

Driver version

#define FSL_OTFAD_DRIVER_VERSION   (MAKE_VERSION(2U, 0U, 0U))
 Driver version 2.0.0. More...
 

Initialization and deinitialization

void OTFAD_GetDefaultConfig (otfad_config_t *config)
 OTFAD module initialization function. More...
 
 AT_QUICKACCESS_SECTION_CODE (void OTFAD_Init(OTFAD_Type *base, const otfad_config_t *config))
 OTFAD module initialization function. More...
 
 AT_QUICKACCESS_SECTION_CODE (void OTFAD_Deinit(OTFAD_Type *base))
 Deinitializes the OTFAD.
 

Status

static uint32_t OTFAD_GetOperateMode (OTFAD_Type *base)
 OTFAD module get operate mode. More...
 
static uint32_t OTFAD_GetStatus (OTFAD_Type *base)
 OTFAD module get status. More...
 

functional

status_t OTFAD_SetEncryptionConfig (OTFAD_Type *base, const otfad_encryption_config_t *config)
 OTFAD module set encryption configuration. More...
 
status_t OTFAD_GetEncryptionConfig (OTFAD_Type *base, otfad_encryption_config_t *config)
 OTFAD module get encryption configuration. More...
 
status_t OTFAD_HitDetermination (OTFAD_Type *base, uint32_t address, uint8_t *contextIndex)
 OTFAD module do hit determination. More...
 

Data Structure Documentation

struct otfad_encryption_config_t
struct otfad_config_t

Macro Definition Documentation

#define FSL_OTFAD_DRIVER_VERSION   (MAKE_VERSION(2U, 0U, 0U))

Enumeration Type Documentation

anonymous enum
Enumerator
kStatus_OTFAD_ResRegAccessMode 

Restricted register mode.

kStatus_OTFAD_AddressError 

End address less than start address.

kStatus_OTFAD_RegionOverlap 

the OTFAD does not support any form of memory region overlap, for system accesses that hit in multiple contexts or no contexts, the fetched data is simply bypassed

kStatus_OTFAD_RegionMiss 

For accesses that hit in a single context, but not the selected one.

anonymous enum
Enumerator
kOTFAD_Context_0 

context 0

kOTFAD_Context_1 

context 1

kOTFAD_Context_2 

context 2

kOTFAD_Context_3 

context 3

anonymous enum
Enumerator
kOTFAD_NRM 

Normal Mode.

kOTFAD_SVM 

Security Violation Mode.

kOTFAD_LDM 

Logically Disabled Mode.

Function Documentation

void OTFAD_GetDefaultConfig ( otfad_config_t config)
Parameters
configOTFAD configuration.
AT_QUICKACCESS_SECTION_CODE ( void   OTFAD_InitOTFAD_Type *base, const otfad_config_t *config)
Parameters
baseOTFAD base address.
configOTFAD configuration.
static uint32_t OTFAD_GetOperateMode ( OTFAD_Type *  base)
inlinestatic
Parameters
baseOTFAD base address.
static uint32_t OTFAD_GetStatus ( OTFAD_Type *  base)
inlinestatic
Parameters
baseOTFAD base address.
status_t OTFAD_SetEncryptionConfig ( OTFAD_Type *  base,
const otfad_encryption_config_t config 
)
Parameters
baseOTFAD base address.
configencryption configuration.

Note: if enable keyblob process, the first 256 bytes external memory is use for keyblob data, so this region shouldn't be in OTFAD region.

status_t OTFAD_GetEncryptionConfig ( OTFAD_Type *  base,
otfad_encryption_config_t config 
)
Parameters
baseOTFAD base address.
configencryption configuration.

Note: if enable keyblob process, the first 256 bytes external memory is use for keyblob data, so this region shouldn't be in OTFAD region.

status_t OTFAD_HitDetermination ( OTFAD_Type *  base,
uint32_t  address,
uint8_t *  contextIndex 
)
Parameters
baseOTFAD base address.
addressthe physical address space assigned to the QuadSPI(FlexSPI) module.
contextIndexhitted context region index.
Returns
status, such as kStatus_Success or kStatus_OTFAD_ResRegAccessMode.