TDES_MR.LOD = 1

This mode is optimized to process the TDES CBC-MAC operating mode.

The user must first wait for the DMA buffer transfer complete flag, then for the flag DATRDY to rise to ensure that the encryption/decryption is completed (see the figure below).

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

The output data is only available on TDES_ODATARx.

Figure 7-28. DMA Transfer with LOD = 1

The table below summarizes the different cases.

Table 7-8. Last Output Data Mode Behavior versus Start Modes
SequenceManual and Auto ModesDMA Transfer
LOD = 0LOD = 1LOD = 0LOD = 1
DATRDY Flag Clearing Condition(1)At least one TDES_ODATARx must be readAt least one TDES_IDATARx must be writtenNot usedManaged by the DMA
End of Encryption/DecryptionDATRDYDATRDY2 DMA buffer transfer complete flags (channel m and channel n)DMA buffer transfer complete flag, then TDES DATRDY flag
Encrypted/Decrypted Data Result LocationIn TDES_ODATARxIn TDES_ODATARxNot availableIn TDES_ODATARx
Note: Depending on the mode, there are other ways of clearing the DATRDY flag. See TDES Interrupt Status Register.
Warning: In DMA mode, reading to TDES_ODATARx before the last data transfer may lead to unpredictable results.