40.4.3.2.2 If AES_MR.LOD = 1

This mode is optimized to process AES CBC-MAC operating mode.

The user must first wait for the AES_ISR.ENDTX (or AES_ISR.TXBUFE) flag to be raised, then for DATRDY to ensure that the encryption/decryption is completed (see the following figure).

The PDC receive channel must not be used. Prior to reading the CBC-MAC result, AES_MR.SMOD must be written to 0. To restart a CBC-MAC on a new buffer, AES_MR.SMOD must be written to 2.

The output data are only available on AES_ODATARx.

Figure 40-4. PDC Transfer with AES_MR.LOD = 1

The following table summarizes the different cases.

Table 40-1. Last Output Data Mode Behavior versus Start Modes
SequenceManual and Auto ModesPDC Mode
AES_MR.LOD = 0AES_MR.LOD = 1AES_MR.LOD = 0AES_MR.LOD = 1
DATRDY Flag Clearing Condition(1)At least one AES_ODATAR must be readAt least one AES_IDATAR must be writtenNot usedManaged by the PDC
End of Encryption/Decryption NotificationDATRDYDATRDYENDRX (or RXBUFF)ENDTX (or TXBUFE) then DATRDY
Encrypted/Decrypted Data Result LocationIn AES_ODATARxIn AES_ODATARxAt the address specified in AES_RPRIn AES_ODATARx
Note: Depending on the mode, there are other ways of clearing the AES_ISR.DATRDY flag. See AES_ISR.
Warning: In PDC mode, reading AES_ODATARx before the last data transfer may lead to unpredictable results.