RM0351
To suspend mode CMAC during header phase, the user must respect the following steps:
•
Before interrupting the current message:
a)
b)
c)
d)
e)
•
To resume:
f)
g)
h)
i)
j)
25.8
Data type
Data are entered in the AES processor 32 bits at a time (words), by writing them in the
AES_DINR register. AES handles 128-bit data blocks. The AES_DINR or AES_DOUTR
registers must be read or written four times to handle one 128-bit data block with the MSB
first.
The system memory organization is little-endian: whatever the data type (bit, byte, 16-bit
half-word, 32-bit word) used, the less-significant data occupies the lowest address location.
Thus, there must be a bit, byte, or half-word swapping operation to be performed on data to
be written in the AES_DINR from system memory before entering the AES processor, and
the same swapping must be performed for AES data to be read from the AES_DOUTR
register to the system memory, depending on to the kind of data to be encrypted or
decrypted.
The DATATYPE bits in the AES_CR register offer different swap modes to be applied to the
AES_DINR register before sending it to the AES processor and to be applied on the
AES_DOUTR register on the data coming out from the processor (refer to
Note:
The swapping operation concerns only the AES_DOUTR and AES_DINR registers. The
AES_KEYRx and AES_IVRx registers are not sensitive to the swap mode selected. They
have a fixed little-endian configuration (refer to
Advanced encryption standard hardware accelerator (AES)
Make sure that CCF flag in AES_SR is set to 1.
Clear CCF flag in AES_SR register by setting CCFC bit to 1 in AES_CR.
Save AES initialization vector registers AES_IVx and AES_SUSPxR registers in
the memory (AES_IVx registers are modified during header phase)
Disable AES processor by setting EN in AES_CR to 0.
Save the current AES configuration values in the memory.
Make sure that AES processor is disabled by reading bit EN in AES_CR.
Write back AES_SUSPxR registers into their corresponding suspend registers.
Write back AES_IVx registers into their AES initialization vector registers
Re-configure AES with the initial setting values in CR register and key registers.
Enable the AES processor by setting EN in AES_CR register.
DocID024597 Rev 3
Section 25.4
and
Section
Figure
180).
25.14).
729/1693
751
Need help?
Do you have a question about the STM32L4x6 and is the answer not in the manual?
Questions and answers