CRYPTOCELL support direct memory access (DMA) to allow cryptographic operations on memory mapped regions without involving the CPU.
The following table indicates which memory is accessible by CRYPTOCELL DMA engines.
| Memory type | Read | Write |
|---|---|---|
| SRAM | Yes | Yes |
| Flash | Yes | Yes |
Data stored in a memory type not accessible by CRYPTOCELL DMA engines must be copied to an accessible memory type before it can be processed by the CRYPTOCELL subsystem. Maximum DMA transaction size is limited to 216-1 bytes.
The CRYPTOCELL DMA engine can also run in Bypass mode, meaning data is read and written without being piped through a cryptographic engine. Thus CRYPTOCELL can act as a general purpose DMA engine for moving data.
- Enable DMA engines clock using register DMA_CLK.
-
Configure cryptographic control for
Bypassmode using register CRYPTO_CTL. - Set the the output destination address and size of the receiving buffer.
- Start the DMA transaction by configuring the input source address and the number of bytes to transfer.
-
Status of the DMA transaction can be monitored by either polling register
DOUT_DMA_MEM_BUSY, or by unmasking the interrupt for field
DOUT_TO_MEM_MASKin register IMR.
See DIN DMA engine and DOUT DMA engine for more information.