English
Language : 

AT91SAM7XC256 Datasheet, PDF (513/675 Pages) ATMEL Corporation – Thumb-based Microcontrollers
AT91SAM7XC256/128 Preliminary
38.3.2
Start Modes
The SMOD field in the TDES Mode Register (TDES_MR) allows selection of encryption (or
decryption) start mode.
38.3.2.1
Manual Mode
The sequence is as follows:
• Write the 64-bit key(s) in the different Key Word Registers (TDES_KEYxWxR), depending on
whether one, two or three keys are required.
• Write the initialization vector (or counter) in the Initialization Vector Registers (TDES_IVxR).
Note: The Initialization Vector Registers concern all modes except ECB.
• Set the bit DATRDY (Data Ready) in the TDES Interrupt Enable register (TDES_IER),
depending on whether an interrupt is required or not at the end of processing.
• Write the data to be encrypted/decrypted in the authorized Input Data Registers (See Table
38-1).
Table 38-1. Authorized Input Data Registers
Operation Mode
Input Data Registers to Write
ECB
All
CBC
All
OFB
All
CFB 64-bit
All
CFB 32-bit
TDES_IDATA1R
CFB 16-bit
TDES_IDATA1R
CFB 8-bit
TDES_IDATA1R
Note: In 32-, 16- and 8-bit CFB mode, writing to TDES_IDATA2R register is not allowed and may lead to
errors in processing.
• Set the START bit in the TDES Control register TDES_CR to begin the encryption or the
decryption process.
• When the processing completes, the bit DATRDY in the TDES Interrupt Status Register
(TDES_ISR) raises. If an interrupt has been enabled by setting the bit DATRDY in
TDES_IER, the interrupt line of the TDES is activated.
• When the software reads one of the Output Data Registers (TDES_ODATAxR), the DATRDY
bit is automatically cleared.
38.3.2.2
Auto Mode
The Auto Mode is similar to Manual Mode, except that, as soon as the correct number of Input
Data registers is written, processing is automatically started without any action in the control
register.
38.3.2.3
PDC Mode
The Peripheral Data Controller (PDC) can be used in association with the TDES to perform an
encryption/decryption of a buffer without any action by the software during processing.
6209B–ATARM–10-Feb-06
513