The following list describes the requirements for initializing the AES and associated modules.
- Configure the DMA Trigger Source corresponding to AES. For more information, refer to the Direct Memory Access (DMA) chapter.
- Specify the size of the keys by programming the KEY_SIZE bit field in the AES_CTRL register.
- Load the AES Key 1 (AES_KEY1_n) register.
- Load the AES Key 2 (AES_KEY2_n) register if it is used by the configuration mode.
- Configure the AES for the appropriate encryption or decryption mode (see Section 30.4.1.2).
- Select encryption or decryption by programming the DIRECTION bit in the AES Control (AES_CTRL) register.