The following list describes the requirements for initializing the AES and associated modules.
- Configure the AES DMA channels for Context In,
Context Out, Data In, and Data Out by programming the appropriate encoding
value in the S_SYSCONFIG register.
- If the AES channels are configured in the DMA,
enable the required AES DMA requests by programming bits [9:5] of the
S_SYSCONFIG
register, in addition to the completion interrupts in the AES DMA Interrupt
Mask (S_EIP36T_IMST) register.
- Specify the size of the keys by programming the
KEY_SIZE bit field in the S_CTRL register.
- Load the AES Key 1 (S_KEY1_n) register.
- Load the AES Key 2 (S_KEY2_n) register if it is used by the configuration mode.
- Configure the AES for the appropriate encryption
or decryption mode (see Section 7.3.4.3.8.1.2).
- Select encryption or decryption by programming
the DIRECTION bit in the AES Control (HSM_AES_S_CTRL) register.