MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
BEE: Bus Encryption Engine

The MCUXpresso SDK provides a peripheral driver for the Bus Encryption Engine (BEE) module.

The BEE module is implemented as an on-the-fly decryption engine. Main features of the BEE module are:

• Standard AXI interconnection • On-the-fly AES-128 decryption, supporting ECB and CTR mode • Aliased memory space support. Address remapping for up to two individual regions • Independent AES Key management for those two individual regions • Bus access pattern optimization with the aid of local store and forward buffer • Non-secured access filtering based on security label of the access • Illegal access check and filtering.

The known hardware limitations of the BEE module are as follows: • Only supports 128 bits data width AXI interconnection • Only supports 16-byte burst access size. For single transaction, the minimum supported access size is limited to 4-byte. • Granularity of the address bias is 128 KB per step

BEE Driver Initialization and Configuration

The function BEE_Init() initializes the BEE to default values. The function BEE_GetDefaultConfig() Loads default values to the BEE region configuration structure. The default values are described below.

Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/bee The function BEE_Deinit() performs hardware reset of BEE module and disables clocks. Configuration and keys from software for both regions are cleared.

Enable & Disable BEE

The function BEE_Enable() enables decryption using BEE. The function BEE_Disable() disables decryption using BEE.

Set BEE region config and key

The function BEE_SetRegionConfig() sets BEE region settings accorging to given configuration structure. The structure is described below.

Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/bee The function BEE_SetRegionKey() loads given AES key and nonce(only AES CTR mode) to BEE register for the given region. Please note, that eFuse BEE_KEYx_SEL must be set accordingly to be able to load and use key loaded in BEE registers. Otherwise, key cannot loaded and BEE will use key from OTPMK or SW_GP2.

Status

Provides functions to get and clear the BEE status.

The function BEE_GetStatusFlags() returns status of BEE peripheral. The function BEE_ClearStatusFlags() clears the BEE status flags.

Get offset

The function BEE_GetOffset() calculates offset that must be set for BEE region to access physical memory location.

BEE example

Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/bee