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

Overview

Data Structures

struct  iee_config_t
 IEE configuration structure. More...
 

Enumerations

enum  iee_region_t {
  kIEE_Region0 = 0U,
  kIEE_Region1 = 1U,
  kIEE_Region2 = 2U,
  kIEE_Region3 = 3U,
  kIEE_Region4 = 4U,
  kIEE_Region5 = 5U,
  kIEE_Region6 = 6U,
  kIEE_Region7 = 7U
}
 
enum  iee_aes_bypass_t {
  kIEE_AesUseMdField = 0U,
  kIEE_AesBypass = 1U
}
 
enum  iee_aes_mode_t {
  kIEE_ModeNone = 0U,
  kIEE_ModeAesXTS = 1U,
  kIEE_ModeAesCTRWAddress = 2U,
  kIEE_ModeAesCTRWOAddress = 3U,
  kIEE_ModeAesCTRkeystream = 4U
}
 
enum  iee_aes_key_size_t {
  kIEE_AesCTR128XTS256 = 0U,
  kIEE_AesCTR256XTS512 = 1U
}
 
enum  iee_aes_key_num_t {
  kIEE_AesKey1 = 1U,
  kIEE_AesKey2 = 2U
}
 

Functions

void IEE_Init (IEE_Type *base)
 Resets IEE module to factory default values. More...
 
void IEE_GetDefaultConfig (iee_config_t *config)
 Loads default values to the IEE configuration structure. More...
 
void IEE_SetRegionConfig (IEE_Type *base, iee_region_t region, iee_config_t *config)
 Sets the IEE module according to the configuration structure. More...
 
status_t IEE_SetRegionKey (IEE_Type *base, iee_region_t region, iee_aes_key_num_t keyNum, const uint8_t *key, size_t keySize)
 Sets the IEE module key. More...
 
static uint32_t IEE_GetOffset (uint32_t addressIee, uint32_t addressMemory)
 Computes IEE offset to be set for specifed memory location. More...
 
void IEE_LockRegionConfig (IEE_Type *base, iee_region_t region)
 Lock the IEE region configuration. More...
 

Driver version

#define FSL_IEE_DRIVER_VERSION   (MAKE_VERSION(2, 1, 0))
 IEE driver version. More...
 

Data Structure Documentation

struct iee_config_t

Data Fields

iee_aes_bypass_t bypass
 AES encryption/decryption bypass.
 
iee_aes_mode_t mode
 AES mode.
 
iee_aes_key_size_t keySize
 size of AES key
 
uint32_t pageOffset
 Offset to physical memory location from IEE start address.
 

Macro Definition Documentation

#define FSL_IEE_DRIVER_VERSION   (MAKE_VERSION(2, 1, 0))

Version 2.1.0.

Current version: 2.1.0

Change log:

  • Version 2.0.0
    • Initial version
  • Version 2.1.0

Enumeration Type Documentation

Enumerator
kIEE_Region0 

IEE region 0.

kIEE_Region1 

IEE region 1.

kIEE_Region2 

IEE region 2.

kIEE_Region3 

IEE region 3.

kIEE_Region4 

IEE region 4.

kIEE_Region5 

IEE region 5.

kIEE_Region6 

IEE region 6.

kIEE_Region7 

IEE region 7.

Enumerator
kIEE_AesUseMdField 

AES encryption/decryption enabled.

kIEE_AesBypass 

AES encryption/decryption bypass.

Enumerator
kIEE_ModeNone 

AES NONE mode.

kIEE_ModeAesXTS 

AES XTS mode.

kIEE_ModeAesCTRWAddress 

CTR w address binding mode.

kIEE_ModeAesCTRWOAddress 

AES CTR w/o address binding mode.

kIEE_ModeAesCTRkeystream 

AES CTR keystream only.

Enumerator
kIEE_AesCTR128XTS256 

AES 128 bits (CTR), 256 bits (XTS)

kIEE_AesCTR256XTS512 

AES 256 bits (CTR), 512 bits (XTS)

Enumerator
kIEE_AesKey1 

AES Key 1.

kIEE_AesKey2 

AES Key 2.

Function Documentation

void IEE_Init ( IEE_Type *  base)

This function performs hardware reset of IEE module. Attributes and keys of all regions are cleared.

Parameters
baseIEER peripheral address.
void IEE_GetDefaultConfig ( iee_config_t config)

Loads default values to the IEE region configuration structure. The default values are as follows.

* config->bypass = kIEE_AesUseMdField;
* config->mode = kIEE_ModeNone;
* config->keySize = kIEE_AesCTR128XTS256;
* config->pageOffset = 0U;
*
Parameters
configConfiguration for the selected IEE region.
void IEE_SetRegionConfig ( IEE_Type *  base,
iee_region_t  region,
iee_config_t config 
)

This function configures IEE region according to configuration structure.

Parameters
baseIEE peripheral address.
regionSelection of the IEE region to be configured.
configConfiguration for the selected IEE region.
status_t IEE_SetRegionKey ( IEE_Type *  base,
iee_region_t  region,
iee_aes_key_num_t  keyNum,
const uint8_t *  key,
size_t  keySize 
)

This function sets specified AES key for the given region.

Parameters
baseIEE peripheral address.
regionSelection of the IEE region to be configured.
keyNumSelection of AES KEY1 or KEY2.
keyAES key.
keySizeSize of AES key.
static uint32_t IEE_GetOffset ( uint32_t  addressIee,
uint32_t  addressMemory 
)
inlinestatic

This function calculates offset that must be set for IEE region to access physical memory location.

Parameters
addressIeeAddress of IEE peripheral.
addressMemoryAddress of physical memory location.
void IEE_LockRegionConfig ( IEE_Type *  base,
iee_region_t  region 
)

This function locks IEE region registers for Key, Offset and Attribute. Only system reset can clear the Lock bit.

Parameters
baseIEE peripheral address.
regionSelection of the IEE region to be locked.