Functions
Configuration functions
Peripheral Driver » LL Driver » AES » Functions

## Functions
__STATIC_INLINE void | ll_aes_enable (aes_regs_t *AESx)
| Enable AES. More...
__STATIC_INLINE void | ll_aes_disable (aes_regs_t *AESx)
| Disable AES. More...
__STATIC_INLINE uint32_t | ll_aes_is_enabled (aes_regs_t *AESx)
| Indicate whether the AES is enabled. More...
__STATIC_INLINE void | ll_aes_enable_start (aes_regs_t *AESx)
| Enable AES start in MCU mode. More...
__STATIC_INLINE void | ll_aes_disable_start (aes_regs_t *AESx)
| Disable AES start in MCU mode. More...
__STATIC_INLINE uint32_t | ll_aes_is_enabled_start (aes_regs_t *AESx)
| Indicate whether the AES start in MCU mode is enabled. More...
__STATIC_INLINE void | ll_aes_enable_dma_start (aes_regs_t *AESx)
| Enable AES DMA mode. More...
__STATIC_INLINE void | ll_aes_disable_dma_start (aes_regs_t *AESx)
| Disable AES DMA mode. More...
__STATIC_INLINE uint32_t | ll_aes_is_enabled_dma_start (aes_regs_t *AESx)
| Indicate whether the AES DMA mode is enabled. More...
__STATIC_INLINE void | ll_aes_enable_read_key (aes_regs_t *AESx)
| Enable fetch key through AHB/key port. More...
__STATIC_INLINE void | ll_aes_set_key_size (aes_regs_t *AESx, uint32_t size)
| Set AES key size. More...
__STATIC_INLINE uint32_t | ll_aes_get_key_size (aes_regs_t *AESx)
| Get AES key size. More...
__STATIC_INLINE void | ll_aes_enable_full_mask (aes_regs_t *AESx)
| Enable AES full mask. More...
__STATIC_INLINE void | ll_aes_disable_full_mask (aes_regs_t *AESx)
| Disable AES full mask. More...
__STATIC_INLINE uint32_t | ll_aes_is_enabled_full_mask (aes_regs_t *AESx)
| Indicate whether the AES full mask is enabled. More...
__STATIC_INLINE void | ll_aes_enable_encryption (aes_regs_t *AESx)
| Enable AES encryption mode. More...
__STATIC_INLINE void | ll_aes_disable_encryption (aes_regs_t *AESx)
| Disable AES encryption mode. More...
__STATIC_INLINE uint32_t | ll_aes_is_enabled_encryption (aes_regs_t *AESx)
| Indicate whether the AES encryption mode is enabled. More...
__STATIC_INLINE void | ll_aes_set_load_seed (aes_regs_t *AESx)
| Set AES to load seed for LFSR. More...
__STATIC_INLINE void | ll_aes_set_first_block (aes_regs_t *AESx)
| Set AES in first block before starting the first block in normal CBC and DMA CBC mode. More...
__STATIC_INLINE void | ll_aes_enable_little_endian (aes_regs_t *AESx)
| Enable AES in little endian. More...
__STATIC_INLINE void | ll_aes_disable_little_endian (aes_regs_t *AESx)
| Disable AES in little endian. More...
__STATIC_INLINE uint32_t | ll_aes_is_enabled_little_endian (aes_regs_t *AESx)
| Indicate whether the AES is in little endian. More...
__STATIC_INLINE void | ll_aes_set_operation_mode (aes_regs_t *AESx, uint32_t mode)
| Set AES operation mode. More...
__STATIC_INLINE uint32_t | ll_aes_get_operation_mode (aes_regs_t *AESx)
| Get AES operation mode. More...
__STATIC_INLINE void | ll_aes_set_key_type (aes_regs_t *AESx, uint32_t Type)
| Set ways to obtain AES key. More...
__STATIC_INLINE uint32_t | ll_aes_get_key_type (aes_regs_t *AESx)
| Get ways to obtain AES key. More...
__STATIC_INLINE void | ll_aes_set_key_mode (aes_regs_t *AESx, uint32_t mode)
| Set AES key mode. More...
__STATIC_INLINE uint32_t | ll_aes_get_key_mode (aes_regs_t *AESx)
| Get AES key mode. More...

## Detailed Description

## Function Documentation

## ◆ ll_aes_disable()

__STATIC_INLINE void ll_aes_disable | ( | aes_regs_t * | AESx | ) |

Disable AES.

Register|BitsName ---------------|--------------- CTRL | MODULE_EN

Parameters

  AESx | AES instance

Return values

  None |

Definition at line 238 of file ll_aes.h.

## ◆ ll_aes_disable_dma_start()

__STATIC_INLINE void ll_aes_disable_dma_start | ( | aes_regs_t * | AESx | ) |

Disable AES DMA mode.

Register|BitsName ---------------|--------------- CTRL | DMA_MODE_EN

Parameters

  AESx | AES instance

Return values

  None |

Definition at line 328 of file ll_aes.h.

## ◆ ll_aes_disable_encryption()

__STATIC_INLINE void ll_aes_disable_encryption | ( | aes_regs_t * | AESx | ) |

Disable AES encryption mode.

Register|BitsName ---------------|--------------- CFG | DEC_ENC_SEL

Parameters

  AESx | AES instance

Return values

  None |

Definition at line 470 of file ll_aes.h.

## ◆ ll_aes_disable_full_mask()

__STATIC_INLINE void ll_aes_disable_full_mask | ( | aes_regs_t * | AESx | ) |

Disable AES full mask.

Register|BitsName ---------------|--------------- CFG | FULL_MASK_EN

Parameters

  AESx | AES instance

Return values

  None |

Definition at line 425 of file ll_aes.h.

## ◆ ll_aes_disable_little_endian()

__STATIC_INLINE void ll_aes_disable_little_endian | ( | aes_regs_t * | AESx | ) |

Disable AES in little endian.

Register|BitsName ---------------|--------------- CFG | ENDIAN

Parameters

  AESx | AES instance

Return values

  None |

Definition at line 545 of file ll_aes.h.

## ◆ ll_aes_disable_start()

__STATIC_INLINE void ll_aes_disable_start | ( | aes_regs_t * | AESx | ) |

Disable AES start in MCU mode.

Register|BitsName ---------------|--------------- CTRL | MCU_MODE_EN

Parameters

  AESx | AES instance

Return values

  None |

Definition at line 283 of file ll_aes.h.

## ◆ ll_aes_enable()

__STATIC_INLINE void ll_aes_enable | ( | aes_regs_t * | AESx | ) |

Enable AES.

Register|BitsName ---------------|--------------- CTRL | MODULE_EN

Parameters

  AESx | AES instance

Return values

  None |

Definition at line 223 of file ll_aes.h.

## ◆ ll_aes_enable_dma_start()

__STATIC_INLINE void ll_aes_enable_dma_start | ( | aes_regs_t * | AESx | ) |

Enable AES DMA mode.

Register|BitsName ---------------|--------------- CTRL | DMA_MODE_EN

Parameters

  AESx | AES instance

Return values

  None |

Definition at line 313 of file ll_aes.h.

## ◆ ll_aes_enable_encryption()

__STATIC_INLINE void ll_aes_enable_encryption | ( | aes_regs_t * | AESx | ) |

Enable AES encryption mode.

Register|BitsName ---------------|--------------- CFG | DEC_ENC_SEL

Parameters

  AESx | AES instance

Return values

  None |

Definition at line 455 of file ll_aes.h.

## ◆ ll_aes_enable_full_mask()

__STATIC_INLINE void ll_aes_enable_full_mask | ( | aes_regs_t * | AESx | ) |

Enable AES full mask.

Register|BitsName ---------------|--------------- CFG | FULL_MASK_EN

Parameters

  AESx | AES instance

Return values

  None |

Definition at line 410 of file ll_aes.h.

## ◆ ll_aes_enable_little_endian()

__STATIC_INLINE void ll_aes_enable_little_endian | ( | aes_regs_t * | AESx | ) |

Enable AES in little endian.

Register|BitsName ---------------|--------------- CFG | ENDIAN

Parameters

  AESx | AES instance

Return values

  None |

Definition at line 530 of file ll_aes.h.

## ◆ ll_aes_enable_read_key()

__STATIC_INLINE void ll_aes_enable_read_key | ( | aes_regs_t * | AESx | ) |

Enable fetch key through AHB/key port.

Register|BitsName ---------------|--------------- CTRL | FKEY_EN

Parameters

  AESx | AES instance

Return values

  None |

Definition at line 358 of file ll_aes.h.

## ◆ ll_aes_enable_start()

__STATIC_INLINE void ll_aes_enable_start | ( | aes_regs_t * | AESx | ) |

Enable AES start in MCU mode.

Register|BitsName ---------------|--------------- CTRL | MCU_MODE_EN

Parameters

  AESx | AES instance

Return values

  None |

Definition at line 268 of file ll_aes.h.

## ◆ ll_aes_get_key_mode()

__STATIC_INLINE uint32_t ll_aes_get_key_mode | ( | aes_regs_t * | AESx | ) |

Get AES key mode.

Register|BitsName ---------------|--------------- CFG | KEY_WRAP

Parameters

  AESx | AES instance

Return values

  Returned | value can be one of the following values: LL_AES_KEYMODE_NORMAL LL_AES_KEYMODE_KEYWRAP

Definition at line 667 of file ll_aes.h.

## ◆ ll_aes_get_key_size()

__STATIC_INLINE uint32_t ll_aes_get_key_size | ( | aes_regs_t * | AESx | ) |

Get AES key size.

Register|BitsName ---------------|--------------- CFG | KEY_MODE

Parameters

  AESx | AES instance

Return values

  Returned | value can be one of the following values: LL_AES_KEY_SIZE_128 LL_AES_KEY_SIZE_192 LL_AES_KEY_SIZE_256

Definition at line 395 of file ll_aes.h.

## ◆ ll_aes_get_key_type()

__STATIC_INLINE uint32_t ll_aes_get_key_type | ( | aes_regs_t * | AESx | ) |

Get ways to obtain AES key.

Register|BitsName ---------------|--------------- CFG | KEY_TYPE

Parameters

  AESx | AES instance

Return values

  Returned | value can be one of the following values: LL_AES_KEYTYPE_MCU LL_AES_KEYTYPE_AHB LL_AES_KEYTYPE_KRAM

Definition at line 632 of file ll_aes.h.

## ◆ ll_aes_get_operation_mode()

__STATIC_INLINE uint32_t ll_aes_get_operation_mode | ( | aes_regs_t * | AESx | ) |

Get AES operation mode.

Register|BitsName ---------------|--------------- CFG | OPT_MODE

Parameters

  AESx | AES instance

Return values

  Returned | value can be one of the following values: LL_AES_OPERATION_MODE_ECB LL_AES_OPERATION_MODE_CBC

Definition at line 595 of file ll_aes.h.

## ◆ ll_aes_is_enabled()

__STATIC_INLINE uint32_t ll_aes_is_enabled | ( | aes_regs_t * | AESx | ) |

Indicate whether the AES is enabled.

Register|BitsName ---------------|--------------- CTRL | MODULE_EN

Parameters

  AESx | AES instance

Return values

  State | of bit (1 or 0).

Definition at line 253 of file ll_aes.h.

## ◆ ll_aes_is_enabled_dma_start()

__STATIC_INLINE uint32_t ll_aes_is_enabled_dma_start | ( | aes_regs_t * | AESx | ) |

Indicate whether the AES DMA mode is enabled.

Register|BitsName ---------------|--------------- CTRL | DMA_MODE_EN

Parameters

  AESx | AES instance

Return values

  State | of bit (1 or 0).

Definition at line 343 of file ll_aes.h.

## ◆ ll_aes_is_enabled_encryption()

__STATIC_INLINE uint32_t ll_aes_is_enabled_encryption | ( | aes_regs_t * | AESx | ) |

Indicate whether the AES encryption mode is enabled.

Register|BitsName ---------------|--------------- CFG | DEC_ENC_SEL

Parameters

  AESx | AES instance

Return values

  State | of bit (1 or 0).

Definition at line 485 of file ll_aes.h.

## ◆ ll_aes_is_enabled_full_mask()

__STATIC_INLINE uint32_t ll_aes_is_enabled_full_mask | ( | aes_regs_t * | AESx | ) |

Indicate whether the AES full mask is enabled.

Register|BitsName ---------------|--------------- CFG | FULL_MASK_EN

Parameters

  AESx | AES instance

Return values

  State | of bit (1 or 0).

Definition at line 440 of file ll_aes.h.

## ◆ ll_aes_is_enabled_little_endian()

__STATIC_INLINE uint32_t ll_aes_is_enabled_little_endian | ( | aes_regs_t * | AESx | ) |

Indicate whether the AES is in little endian.

Register|BitsName ---------------|--------------- CFG | ENDIAN

Parameters

  AESx | AES instance

Return values

  State | of bit (1 or 0).

Definition at line 560 of file ll_aes.h.

## ◆ ll_aes_is_enabled_start()

__STATIC_INLINE uint32_t ll_aes_is_enabled_start | ( | aes_regs_t * | AESx | ) |

Indicate whether the AES start in MCU mode is enabled.

Register|BitsName ---------------|--------------- CTRL | MCU_MODE_EN

Parameters

  AESx | AES instance

Return values

  State | of bit (1 or 0).

Definition at line 298 of file ll_aes.h.

## ◆ ll_aes_set_first_block()

__STATIC_INLINE void ll_aes_set_first_block | ( | aes_regs_t * | AESx | ) |

Set AES in first block before starting the first block in normal CBC and DMA CBC mode.

Register|BitsName ---------------|--------------- CFG | FIRST_BLK

Parameters

  AESx | AES instance

Return values

  None |

Definition at line 515 of file ll_aes.h.

## ◆ ll_aes_set_key_mode()

__STATIC_INLINE void ll_aes_set_key_mode | ( | aes_regs_t * | AESx,
|  | uint32_t | mode
| ) |  |

Set AES key mode.

Register|BitsName ---------------|--------------- CFG | KEY_WRAP

Parameters

  AESx | AES instance
  mode | This parameter can be one of the following values: LL_AES_KEYMODE_NORMAL LL_AES_KEYMODE_KEYWRAP

Return values

  None |

Definition at line 650 of file ll_aes.h.

## ◆ ll_aes_set_key_size()

__STATIC_INLINE void ll_aes_set_key_size | ( | aes_regs_t * | AESx,
|  | uint32_t | size
| ) |  |

Set AES key size.

Register|BitsName ---------------|--------------- CFG | KEY_MODE

Parameters

  AESx | AES instance
  size | This parameter can be one of the following values: LL_AES_KEY_SIZE_128 LL_AES_KEY_SIZE_192 LL_AES_KEY_SIZE_256

Return values

  None |

Definition at line 377 of file ll_aes.h.

## ◆ ll_aes_set_key_type()

__STATIC_INLINE void ll_aes_set_key_type | ( | aes_regs_t * | AESx,
|  | uint32_t | Type
| ) |  |

Set ways to obtain AES key.

Register|BitsName ---------------|--------------- CFG | KEY_TYPE

Parameters

  AESx | AES instance
  Type | This parameter can be one of the following values: LL_AES_KEYTYPE_MCU LL_AES_KEYTYPE_AHB LL_AES_KEYTYPE_KRAM

Return values

  None |

Definition at line 614 of file ll_aes.h.

## ◆ ll_aes_set_load_seed()

__STATIC_INLINE void ll_aes_set_load_seed | ( | aes_regs_t * | AESx | ) |

Set AES to load seed for LFSR.

Register|BitsName ---------------|--------------- CFG | LOAD_SEED

Parameters

  AESx | AES instance

Return values

  None |

Definition at line 500 of file ll_aes.h.

## ◆ ll_aes_set_operation_mode()

__STATIC_INLINE void ll_aes_set_operation_mode | ( | aes_regs_t * | AESx,
|  | uint32_t | mode
| ) |  |

Set AES operation mode.

Register|BitsName ---------------|--------------- CFG | OPT_MODE

Parameters

  AESx | AES instance
  mode | This parameter can be one of the following values: LL_AES_OPERATION_MODE_ECB LL_AES_OPERATION_MODE_CBC

Return values

  None |

Definition at line 578 of file ll_aes.h.