7.2.4.8.3 DMA Mode

The DMA Controller can be used in association with the AES to perform an encryption/decryption of a buffer without any action by software during processing.

AES_MR.SMOD must be configured to 2 and the DMA must be configured with non-incremental addresses.

For all operating modes except CBC-MAC (AES_MR.LOD=1), 2 DMA channels must be programmed (transmit and receive). In CBC-MAC, only 1 transmit channel must be programmed.

The start address of any transfer descriptor must be configured with the address of AES_IDATAR0.

The DMA chunk size configuration depends on the AES mode of operation and is summarized in the following table.

When writing data to AES with a first DMA channel, data are first fetched from a memory buffer (source data). It is recommended to configure the size of source data to “words” even for CFB modes. On the contrary, the destination data size depends on the mode of operation. When reading data from the AES with the second DMA channel, the source data is the data read from AES and data destination is the memory buffer. In this case, the source data size depends on the AES mode of operation, as shown in the following table.

Table 7-3. DMA Data Transfer Type for the Different Operating Modes
Operating ModeChunk SizeDestination/Source Data Transfer Type
ECB4Word
CBC4Word
OFB4Word
CFB 128-bit4Word
CFB 64-bit1Word
CFB 32-bit1Word
CFB 16-bit1Half-word
CFB 8-bit1Byte
CTR4Word
GCM4Word
XTS4Word