Driverlib KEYSTORECTL API

Module: Driverlib (AM13E232X) APIs

More…

Structures

Name

struct

DL_KEYSTORECTL_KeyWrConfig
Configuration struct for DL_KEYSTORECTL_writeKey.

struct

DL_KEYSTORECTL_Config
Configuration struct for DL_KEYSTORECTL_transferKey.

Types

Name

enum

DL_KEYSTORECTL_NUM_256_KEYS { DL_KEYSTORECTL_NUM_256_KEYS_ZERO = KEYSTORECTL_CFG_NK256_ZERO, DL_KEYSTORECTL_NUM_256_KEYS_ONE = KEYSTORECTL_CFG_NK256_ONE, DL_KEYSTORECTL_NUM_256_KEYS_TWO = KEYSTORECTL_CFG_NK256_TWO, DL_KEYSTORECTL_NUM_256_KEYS_THREE = KEYSTORECTL_CFG_NK256_THREE, DL_KEYSTORECTL_NUM_256_KEYS_FOUR = KEYSTORECTL_CFG_NK256_FOUR}
DL_KEYSTORECTL_NUM_256_KEYS.

enum

DL_KEYSTORECTL_KEY_SIZE { DL_KEYSTORECTL_KEY_SIZE_128_BITS = KEYSTORECTL_KEYWR_KEYSZSEL_K128, DL_KEYSTORECTL_KEY_SIZE_256_BITS = KEYSTORECTL_KEYWR_KEYSZSEL_K256}
DL_KEYSTORECTL_KEY_SIZE.

enum

DL_KEYSTORECTL_NUM_SLOTS { DL_KEYSTORECTL_NUM_SLOTS_TWO = KEYSTORECTL_STATUS_NKEYSLOTS_TWO, DL_KEYSTORECTL_NUM_SLOTS_THREE = KEYSTORECTL_STATUS_NKEYSLOTS_THREE, DL_KEYSTORECTL_NUM_SLOTS_FOUR = KEYSTORECTL_STATUS_NKEYSLOTS_FOUR}
DL_KEYSTORECTL_NUM_SLOTS.

enum

DL_KEYSTORECTL_CRYPTO_SEL { DL_KEYSTORECTL_CRYPTO_SEL_AES = KEYSTORECTL_KEYRD_CRYPTOSEL_AES}
DL_KEYSTORECTL_CRYPTO_SEL.

enum

DL_KEYSTORECTL_STATUS { DL_KEYSTORECTL_STATUS_VALID = KEYSTORECTL_STATUS_STAT_VALID, DL_KEYSTORECTL_STATUS_NO_CONFIG = KEYSTORECTL_STATUS_STAT_NO_CFG, DL_KEYSTORECTL_STATUS_INVALID_NUM_KEYS = KEYSTORECTL_STATUS_STAT_INVALID_NK256, DL_KEYSTORECTL_STATUS_BUSY_RX = KEYSTORECTL_STATUS_STAT_BUSY_RECEIVE, DL_KEYSTORECTL_STATUS_BUSY_TX = KEYSTORECTL_STATUS_STAT_BUSY_TRANSMIT, DL_KEYSTORECTL_STATUS_INVALID_SLOT_WR = KEYSTORECTL_STATUS_STAT_INVALID_KEYSLOTSELW, DL_KEYSTORECTL_STATUS_INVALID_SLOT_RD = KEYSTORECTL_STATUS_STAT_INVALID_KEYSLOTSELR, DL_KEYSTORECTL_STATUS_WRITE_FAILED = 0x0BAD}
DL_KEYSTORECTL_STATUS.

Functions

Name

__STATIC_INLINE void

DL_KEYSTORECTL_setNumberOf256Keys(KEYSTORECTL_Regs * keystorectl, DL_KEYSTORECTL_NUM_256_KEYS numKeys)
Sets the number of combined 256 key slots.

__STATIC_INLINE DL_KEYSTORECTL_NUM_256_KEYS

DL_KEYSTORECTL_getNumberOf256Keys(KEYSTORECTL_Regs * keystorectl)
Returns the current number of combined 256 key slots.

__STATIC_INLINE void

DL_KEYSTORECTL_setDestinationKeySlot(KEYSTORECTL_Regs * keystorectl, uint32_t keySlot)
Sets the intended destination key slot for the next write.

__STATIC_INLINE uint32_t

DL_KEYSTORECTL_getDestinationKeySlot(KEYSTORECTL_Regs * keystorectl)
Returns the intended destination key slot for the next write.

__STATIC_INLINE void

DL_KEYSTORECTL_setDestinationKeySize(KEYSTORECTL_Regs * keystorectl, DL_KEYSTORECTL_KEY_SIZE keySize)
Sets the intended destination key slot size for next write.

__STATIC_INLINE DL_KEYSTORECTL_KEY_SIZE

DL_KEYSTORECTL_getDestinationKeySize(KEYSTORECTL_Regs * keystorectl)
Returns the intended destination key size for the next write.

void

DL_KEYSTORECTL_loadKey(KEYSTORECTL_Regs * keystorectl, uint32_t * key, DL_KEYSTORECTL_KEY_SIZE keySize)
Loads key data directly into the KEYSTORECTL KEYIN register.

__STATIC_INLINE void

DL_KEYSTORECTL_setSourceKeySlot(KEYSTORECTL_Regs * keystorectl, uint32_t keySlot)
Gets the intended source key slot for the next transfer.

__STATIC_INLINE uint32_t

DL_KEYSTORECTL_getSourceKeySlot(KEYSTORECTL_Regs * keystorectl)
Gets the intended source key slot for the next transfer.

__STATIC_INLINE void

DL_KEYSTORECTL_setSourceKeySize(KEYSTORECTL_Regs * keystorectl, DL_KEYSTORECTL_KEY_SIZE keySize)
Gets the intended source key slot size for next transfer.

__STATIC_INLINE DL_KEYSTORECTL_KEY_SIZE

DL_KEYSTORECTL_getSourceKeySize(KEYSTORECTL_Regs * keystorectl)
Gets the intended source key size for the next transfer.

__STATIC_INLINE DL_KEYSTORECTL_STATUS

DL_KEYSTORECTL_getStatus(KEYSTORECTL_Regs * keystorectl)
Gets the current status of the KEYSTORECTL module.

__STATIC_INLINE uint32_t

DL_KEYSTORECTL_getValidKeySlots(KEYSTORECTL_Regs * keystorectl)
Gets currently written key slots.

__STATIC_INLINE DL_KEYSTORECTL_NUM_SLOTS

DL_KEYSTORECTL_getNumSlots(KEYSTORECTL_Regs * keystorectl)
Gets the total number of 128-bit key slots in HW on the device.

DL_KEYSTORECTL_STATUS

DL_KEYSTORECTL_writeKey(KEYSTORECTL_Regs * keystorectl, DL_KEYSTORECTL_KeyWrConfig * keyWrConfig)
Initiates a key write into the KEYSTORE (non-blocking)

bool

DL_KEYSTORECTL_validSlot(KEYSTORECTL_Regs * keystorectl, const DL_KEYSTORECTL_KeyWrConfig * keyWrConfig)
Checks whether the expected key slot VALID bits are set.

DL_KEYSTORECTL_STATUS

DL_KEYSTORECTL_transferKey(KEYSTORECTL_Regs * keystorectl, DL_KEYSTORECTL_Config * config)
Initiates a key transfer from KEYSTORE to a crypto engine (non-blocking)

Defines

Name

DL_KEYSTORECTL_KEY_SLOT_0
Keystore Controller Key Slot 0.

DL_KEYSTORECTL_KEY_SLOT_1
Keystore Controller Key Slot 1.

DL_KEYSTORECTL_KEY_SLOT_2
Keystore Controller Key Slot 2.

DL_KEYSTORECTL_KEY_SLOT_3
Keystore Controller Key Slot 3.

DL_KEYSTORECTL_KEY_SLOT_4
Keystore Controller Key Slot 4.

DL_KEYSTORECTL_KEY_SLOT_5
Keystore Controller Key Slot 5.

DL_KEYSTORECTL_KEY_SLOT_6
Keystore Controller Key Slot 6.

DL_KEYSTORECTL_KEY_SLOT_7
Keystore Controller Key Slot 7.

DL_KEYSTORECTL_KEY_SLOT_0_AND_1
Keystore Controller Key Combined Slot 0 and 1.

DL_KEYSTORECTL_KEY_SLOT_2_AND_3
Keystore Controller Key Combined Slot 2 and 3.

DL_KEYSTORECTL_KEY_SLOT_4_AND_5
Keystore Controller Key Combined Slot 4 and 5.

DL_KEYSTORECTL_KEY_SLOT_6_AND_7
Keystore Controller Key Combined Slot 6 and 7.

Detailed Description

The KEYSTORECTL Driver Library allows full configuration of the KEYSTORECTL module.

Types Documentation

enum DL_KEYSTORECTL_NUM_256_KEYS

Enumerator

Value

Description

DL_KEYSTORECTL_NUM_256_KEYS_ZERO

KEYSTORECTL_CFG_NK256_ZERO

No 256-bit keys

DL_KEYSTORECTL_NUM_256_KEYS_ONE

KEYSTORECTL_CFG_NK256_ONE

One 256-bit keys

DL_KEYSTORECTL_NUM_256_KEYS_TWO

KEYSTORECTL_CFG_NK256_TWO

Two 256-bit keys

DL_KEYSTORECTL_NUM_256_KEYS_THREE

KEYSTORECTL_CFG_NK256_THREE

Three 256-bit keys

DL_KEYSTORECTL_NUM_256_KEYS_FOUR

KEYSTORECTL_CFG_NK256_FOUR

Four 256-bit keys

DL_KEYSTORECTL_NUM_256_KEYS.

enum DL_KEYSTORECTL_KEY_SIZE

Enumerator

Value

Description

DL_KEYSTORECTL_KEY_SIZE_128_BITS

KEYSTORECTL_KEYWR_KEYSZSEL_K128

Key size set to 128

DL_KEYSTORECTL_KEY_SIZE_256_BITS

KEYSTORECTL_KEYWR_KEYSZSEL_K256

Key size set to 256

DL_KEYSTORECTL_KEY_SIZE.

enum DL_KEYSTORECTL_NUM_SLOTS

Enumerator

Value

Description

DL_KEYSTORECTL_NUM_SLOTS_TWO

KEYSTORECTL_STATUS_NKEYSLOTS_TWO

Two 128-bit key slots present on device

DL_KEYSTORECTL_NUM_SLOTS_THREE

KEYSTORECTL_STATUS_NKEYSLOTS_THREE

Three 128-bit key slots present on device

DL_KEYSTORECTL_NUM_SLOTS_FOUR

KEYSTORECTL_STATUS_NKEYSLOTS_FOUR

Four 128-bit key slots present on device

DL_KEYSTORECTL_NUM_SLOTS.

enum DL_KEYSTORECTL_CRYPTO_SEL

Enumerator

Value

Description

DL_KEYSTORECTL_CRYPTO_SEL_AES

KEYSTORECTL_KEYRD_CRYPTOSEL_AES

Transfer the key from keystore KEYSTORECTL to the AES engine

DL_KEYSTORECTL_CRYPTO_SEL.

enum DL_KEYSTORECTL_STATUS

Enumerator

Value

Description

DL_KEYSTORECTL_STATUS_VALID

KEYSTORECTL_STATUS_STAT_VALID

Valid status bit. Configuration is valid or operation completed.

DL_KEYSTORECTL_STATUS_NO_CONFIG

KEYSTORECTL_STATUS_STAT_NO_CFG

No Configuration Status bit, no number of 256 keys has been identified. The user must call DL_KEYSTORECTL_setNumberOf256Keys.

DL_KEYSTORECTL_STATUS_INVALID_NUM_KEYS

KEYSTORECTL_STATUS_STAT_INVALID_NK256

Invalid number set during DL_KEYSTORECTL_setNumberOf256Keys

DL_KEYSTORECTL_STATUS_BUSY_RX

KEYSTORECTL_STATUS_STAT_BUSY_RECEIVE

Busy RX status bit. The engine is busy receiving a key deposit.

DL_KEYSTORECTL_STATUS_BUSY_TX

KEYSTORECTL_STATUS_STAT_BUSY_TRANSMIT

Busy TX status bit. The engine is busy transmitting a key to a crypto engine

DL_KEYSTORECTL_STATUS_INVALID_SLOT_WR

KEYSTORECTL_STATUS_STAT_INVALID_KEYSLOTSELW

Invalid key write configuration. This means one or more of the following: the selected slot exceeds available slots, the selected slot already contains a valid programmed key, the selected slot has a mismatched key size compared to the KEYSTORECTL configuration.

DL_KEYSTORECTL_STATUS_INVALID_SLOT_RD

KEYSTORECTL_STATUS_STAT_INVALID_KEYSLOTSELR

Invalid key read configuration (transmitting a key). This means one or more of the following: the selected slot exceeds available slots, the selected slot does not contain a valid programmed key, the selected slot has a mismatched key size

DL_KEYSTORECTL_STATUS_WRITE_FAILED

0x0BAD

Key slots are not valid after a write. Write failed during the DL_KEYSTORECTL_writeKey (driver library specific).

DL_KEYSTORECTL_STATUS.

Functions Documentation

function DL_KEYSTORECTL_setNumberOf256Keys

__STATIC_INLINE void DL_KEYSTORECTL_setNumberOf256Keys(
    KEYSTORECTL_Regs * keystorectl,
    DL_KEYSTORECTL_NUM_256_KEYS numKeys
)

Sets the number of combined 256 key slots.

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

  • numKeys Number of 256-bit keys, one of DL_KEYSTORECTL_NUM_256_KEYS. Must be less than the total key slots on the device divided by two

Note: this function can only be written in a secure operating state before the INITDONE signal is asserted.

For a given number of 128-bit key slots n, there can be up to n/2 slots combined to work as one 256-bit key slot. These larger slots are added to earlier slots first. Thus, a 4-slot device with one 256-key slot will have slots 0 and 1 combined, and slot 2 and 3 will remain 128-bit key slots. Refer to the device datasheet for the specific number of key slots.

function DL_KEYSTORECTL_getNumberOf256Keys

__STATIC_INLINE DL_KEYSTORECTL_NUM_256_KEYS DL_KEYSTORECTL_getNumberOf256Keys(
    KEYSTORECTL_Regs * keystorectl
)

Returns the current number of combined 256 key slots.

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

See: DL_KEYSTORECTL_setNumberOf256Keys

Return: number of 256-bit keys. One of DL_KEYSTORECTL_NUM_256_KEYS

function DL_KEYSTORECTL_setDestinationKeySlot

__STATIC_INLINE void DL_KEYSTORECTL_setDestinationKeySlot(
    KEYSTORECTL_Regs * keystorectl,
    uint32_t keySlot
)

Sets the intended destination key slot for the next write.

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

  • keySlot The intended key slot. Can be 128-bit or a 256-bit. One of [DL_KEYSTORECTL_KEY_SLOT]

See:

Note: this function can only be written in a secure operating state before the INITDONE signal is asserted.

Sets the destination key slot for a data write to that region. In the case of 128-bit key slot, only one slot should be selected. In the case of a 256- bit key slot, both registers should be selected and the key size should also reflect this change. If 256- it keys are desired, they should be configured using DL_KEYSTORECTL_NUM_256_KEYS. Refer to the device datasheet for the specific number of key slots.

function DL_KEYSTORECTL_getDestinationKeySlot

__STATIC_INLINE uint32_t DL_KEYSTORECTL_getDestinationKeySlot(
    KEYSTORECTL_Regs * keystorectl
)

Returns the intended destination key slot for the next write.

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

See: DL_KEYSTORECTL_setDestinationKeySlot

Return: The intended key slot. Can be 128-bit or a 256-bit. One of [DL_KEYSTORECTL_KEY_SLOT]

Note: this function can only be read in a secure operating state before the INITDONE signal is asserted.

Refer to the device datasheet for the specific number of key slots.

function DL_KEYSTORECTL_setDestinationKeySize

__STATIC_INLINE void DL_KEYSTORECTL_setDestinationKeySize(
    KEYSTORECTL_Regs * keystorectl,
    DL_KEYSTORECTL_KEY_SIZE keySize
)

Sets the intended destination key slot size for next write.

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

  • keySize The intended key size. One of DL_KEYSTORECTL_KEY_SIZE

See:

Note: this function can only be written in a secure operating state before the INITDONE signal is asserted.

Sets the destination key slot size for a data write to that region. If 256- bit keys are desired, they should be configured using DL_KEYSTORECTL_NUM_256_KEYS. Refer to the device datasheet for the specific number of key slots.

function DL_KEYSTORECTL_getDestinationKeySize

__STATIC_INLINE DL_KEYSTORECTL_KEY_SIZE DL_KEYSTORECTL_getDestinationKeySize(
    KEYSTORECTL_Regs * keystorectl
)

Returns the intended destination key size for the next write.

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

See: DL_KEYSTORECTL_setDestinationKeySize

Return: The intended key size. One of DL_KEYSTORECTL_KEY_SIZE

Note: this function can only be read in a secure operating state before the INITDONE signal is asserted.

function DL_KEYSTORECTL_loadKey

void DL_KEYSTORECTL_loadKey(
    KEYSTORECTL_Regs * keystorectl,
    uint32_t * key,
    DL_KEYSTORECTL_KEY_SIZE keySize
)

Loads key data directly into the KEYSTORECTL KEYIN register.

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

  • key Pointer to a uint32_t array containing the key data

  • keySize Size of the key. One of DL_KEYSTORECTL_KEY_SIZE

See:

Note:

  • The KEYWR slot and size must be configured before calling this.

  • Can only be called in a secure operating state before INITDONE.

Writes the key words sequentially to the KEYIN register. The destination slot and key size must already be configured in KEYWR before calling this function (e.g. via DL_KEYSTORECTL_setDestinationKeySlot and DL_KEYSTORECTL_setDestinationKeySize), or by using DL_KEYSTORECTL_writeKey which handles the full sequence.

The number of words written is determined by keySize:

function DL_KEYSTORECTL_setSourceKeySlot

__STATIC_INLINE void DL_KEYSTORECTL_setSourceKeySlot(
    KEYSTORECTL_Regs * keystorectl,
    uint32_t keySlot
)

Gets the intended source key slot for the next transfer.

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

  • keySlot The intended key slot. Can be 128-bit or a 256-bit. One of [DL_KEYSTORECTL_KEY_SLOT]

See:

Sets the source key slot for a data transfer to another crypto peripheral. In the case of 128-bit key slot, only one slot should be selected. In the case of a 256-bit key slot, both registers should be selected and the key size should also reflect this change. If 256- it keys are desired, they can be accessed using DL_KEYSTORECTL_getNumberOf256Keys. Refer to the device datasheet for the specific number of key slots.

function DL_KEYSTORECTL_getSourceKeySlot

__STATIC_INLINE uint32_t DL_KEYSTORECTL_getSourceKeySlot(
    KEYSTORECTL_Regs * keystorectl
)

Gets the intended source key slot for the next transfer.

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

See: DL_KEYSTORECTL_setSourceKeySlot

Return: The intended key slot. Can be 128-bit or a 256-bit. One of [DL_KEYSTORECTL_KEY_SLOT]

Refer to the device datasheet for the specific number of key slots.

function DL_KEYSTORECTL_setSourceKeySize

__STATIC_INLINE void DL_KEYSTORECTL_setSourceKeySize(
    KEYSTORECTL_Regs * keystorectl,
    DL_KEYSTORECTL_KEY_SIZE keySize
)

Gets the intended source key slot size for next transfer.

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

  • keySize The intended key size. One of DL_KEYSTORECTL_KEY_SIZE

See:

Sets the source key slot size for a data transfer to that region. If 256- bit keys are desired, they should be configured using DL_KEYSTORECTL_NUM_256_KEYS. Refer to the device datasheet for the specific number of key slots.

function DL_KEYSTORECTL_getSourceKeySize

__STATIC_INLINE DL_KEYSTORECTL_KEY_SIZE DL_KEYSTORECTL_getSourceKeySize(
    KEYSTORECTL_Regs * keystorectl
)

Gets the intended source key size for the next transfer.

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

See: DL_KEYSTORECTL_setSourceKeySize

Return: The intended key size. One of DL_KEYSTORECTL_KEY_SIZE

function DL_KEYSTORECTL_getStatus

__STATIC_INLINE DL_KEYSTORECTL_STATUS DL_KEYSTORECTL_getStatus(
    KEYSTORECTL_Regs * keystorectl
)

Gets the current status of the KEYSTORECTL module.

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

Return: The status of the keystorectl. One of DL_KEYSTORECTL_STATUS

function DL_KEYSTORECTL_getValidKeySlots

__STATIC_INLINE uint32_t DL_KEYSTORECTL_getValidKeySlots(
    KEYSTORECTL_Regs * keystorectl
)

Gets currently written key slots.

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

Return: Bitwise OR of all valid slots, corresponding to [DL_KEYSTORECTL_KEY_SLOT] values.

To understand the key slot configuration, consider the configuration of the keys including the number of 256-bit keys, and the number of available key slots

function DL_KEYSTORECTL_getNumSlots

__STATIC_INLINE DL_KEYSTORECTL_NUM_SLOTS DL_KEYSTORECTL_getNumSlots(
    KEYSTORECTL_Regs * keystorectl
)

Gets the total number of 128-bit key slots in HW on the device.

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

Return: The number of 128-bit slots on the device. One of DL_KEYSTORECTL_NUM_SLOTS

This is the number of key slots that the KEYSTORECTL module has in HW on the device. It does not reflect the configuration or the number of 256-bit keys, only the total number of slots. This also governs the valid configurations, and the number of 256-bit keys must be less than or equal to half the value.

function DL_KEYSTORECTL_writeKey

DL_KEYSTORECTL_STATUS DL_KEYSTORECTL_writeKey(
    KEYSTORECTL_Regs * keystorectl,
    DL_KEYSTORECTL_KeyWrConfig * keyWrConfig
)

Initiates a key write into the KEYSTORE (non-blocking)

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

  • keyWrConfig Pointer to the write key configuration struct DL_KEYSTORECTL_KeyWrConfig

See: DL_KEYSTORECTL_validSlot

Return: Status immediately after loading key data.

Note:

  • DL_KEYSTORECTL_setNumberOf256Keys must be called before this.

  • Keys cannot be overwritten. A BOOTRST is required to re-initialize.

  • Can only be called in a secure operating state before INITDONE.

Configures the key write (size and slot), confirms the configuration is valid, then loads the key data into the KEYIN buffer. The hardware asserts BUSY_RX while it programs the key. This function returns immediately after loading the data — it does NOT wait for BUSY_RX to clear.

The caller is responsible for:

  1. Polling DL_KEYSTORECTL_getStatus until no longer BUSY_RX

  2. Calling DL_KEYSTORECTL_validSlot to verify the slot VALID bits

function DL_KEYSTORECTL_validSlot

bool DL_KEYSTORECTL_validSlot(
    KEYSTORECTL_Regs * keystorectl,
    const DL_KEYSTORECTL_KeyWrConfig * keyWrConfig
)

Checks whether the expected key slot VALID bits are set.

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

  • keyWrConfig Pointer to the same write key configuration struct used in DL_KEYSTORECTL_writeKey

Returns:

  • true The expected slot VALID bits are set — key was written

  • false The expected slot VALID bits are not set — write failed

See: DL_KEYSTORECTL_writeKey

After calling DL_KEYSTORECTL_writeKey and polling until no longer BUSY_RX, call this function to confirm the key was successfully programmed.

function DL_KEYSTORECTL_transferKey

DL_KEYSTORECTL_STATUS DL_KEYSTORECTL_transferKey(
    KEYSTORECTL_Regs * keystorectl,
    DL_KEYSTORECTL_Config * config
)

Initiates a key transfer from KEYSTORE to a crypto engine (non-blocking)

Parameters:

  • keystorectl Pointer to the register overlay for the peripheral

  • config Pointer to a filled out config struct of type DL_KEYSTORECTL_Config

Return: Status immediately after triggering the transfer.

Configures the read transfer (size, crypto destination, slot) and triggers the hardware transfer by writing to KEYRD. Returns the status immediately after triggering — it does NOT wait for BUSY_TX to clear.

The caller is responsible for polling DL_KEYSTORECTL_getStatus until no longer BUSY_TX, using an application-level timeout.

Macros Documentation

define DL_KEYSTORECTL_KEY_SLOT_0

#define DL_KEYSTORECTL_KEY_SLOT_0 (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT0)

Keystore Controller Key Slot 0.

define DL_KEYSTORECTL_KEY_SLOT_1

#define DL_KEYSTORECTL_KEY_SLOT_1 (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT1)

Keystore Controller Key Slot 1.

define DL_KEYSTORECTL_KEY_SLOT_2

#define DL_KEYSTORECTL_KEY_SLOT_2 (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT2)

Keystore Controller Key Slot 2.

define DL_KEYSTORECTL_KEY_SLOT_3

#define DL_KEYSTORECTL_KEY_SLOT_3 (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT3)

Keystore Controller Key Slot 3.

define DL_KEYSTORECTL_KEY_SLOT_4

#define DL_KEYSTORECTL_KEY_SLOT_4 (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT4)

Keystore Controller Key Slot 4.

define DL_KEYSTORECTL_KEY_SLOT_5

#define DL_KEYSTORECTL_KEY_SLOT_5 (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT5)

Keystore Controller Key Slot 5.

define DL_KEYSTORECTL_KEY_SLOT_6

#define DL_KEYSTORECTL_KEY_SLOT_6 (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT6)

Keystore Controller Key Slot 6.

define DL_KEYSTORECTL_KEY_SLOT_7

#define DL_KEYSTORECTL_KEY_SLOT_7 (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT7)

Keystore Controller Key Slot 7.

define DL_KEYSTORECTL_KEY_SLOT_0_AND_1

#define DL_KEYSTORECTL_KEY_SLOT_0_AND_1 ((KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT0) | (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT1))

Keystore Controller Key Combined Slot 0 and 1.

define DL_KEYSTORECTL_KEY_SLOT_2_AND_3

#define DL_KEYSTORECTL_KEY_SLOT_2_AND_3 ((KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT2) | (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT3))

Keystore Controller Key Combined Slot 2 and 3.

define DL_KEYSTORECTL_KEY_SLOT_4_AND_5

#define DL_KEYSTORECTL_KEY_SLOT_4_AND_5 ((KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT4) | (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT5))

Keystore Controller Key Combined Slot 4 and 5.

define DL_KEYSTORECTL_KEY_SLOT_6_AND_7

#define DL_KEYSTORECTL_KEY_SLOT_6_AND_7 ((KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT6) | (KEYSTORECTL_KEYWR_KEYSLOTSEL_SLOT7))

Keystore Controller Key Combined Slot 6 and 7.