Cryptographic processor (CRYP)
RM0090
738/1731
DocID018909 Rev 11
the IN FIFO that have not been processed and save them in the memory until the
FIFO is empty.
Note:
In GCM/GMAC or CCM/CMAC mode, bits [17:16] of the CRYP_CR register should also be
saved.
2. Configure and execute the other processing.
3. Context
restoration
a) Configure the processor as in
Section 23.3.6: Procedure to perform an encryption
,
with the saved configuration. For the
AES-ECB or AES-CBC decryption, the key must be prepared again.
b) Write the data that were saved during context saving into the IN FIFO.
c) If needed, reconfigure the DMA controller to transfer the rest of the message.
d) Enable the processor by setting the CRYPEN bit and, the DMA requests by setting
the DIEN and DOEN bits.
23.4 CRYP
interrupts
There are two individual maskable interrupt sources generated by the CRYP. These two
sources are combined into a single interrupt signal, which is the only interrupt signal from
the CRYP that drives the NVIC (nested vectored interrupt controller). This combined
interrupt, which is an OR function of the individual masked sources, is asserted if any of the
individual interrupts listed below is asserted and enabled.
You can enable or disable the interrupt sources individually by changing the mask bits in the
CRYP_IMSCR register. Setting the appropriate mask bit to ‘1’ enables the interrupt.
The status of the individual interrupt sources can be read either from the CRYP_RISR
register, for raw interrupt status, or from the CRYP_MISR register, for the masked interrupt
status.
Output FIFO service interrupt - OUTMIS
The output FIFO service interrupt is asserted when there is one or more (32-bit word) data
items in the output FIFO. This interrupt is cleared by reading data from the output FIFO until
there is no valid (32-bit) word left (that is, the interrupt follows the state of the OFNE (output
FIFO not empty) flag).
The output FIFO service interrupt OUTMIS
is NOT enabled with the CRYP enable bit.
Consequently, disabling the CRYP will not force the OUTMIS
signal low if the output FIFO is
not empty.
Input FIFO service interrupt - INMIS
The input FIFO service interrupt is asserted when there are less than four words in the input
FIFO. It is cleared by performing write operations to the input FIFO until it holds four or more
words.
The input FIFO service interrupt INMIS is enabled with the CRYP enable bit. Consequently,
when CRYP is disabled, the INMIS
signal is low even if the input FIFO is empty.