CARME-M4 BSP  V1.5

Context swapping functions. More...

+ Collaboration diagram for Context swapping functions:

Functions

ErrorStatus CRYP_SaveContext (CRYP_Context *CRYP_ContextSave, CRYP_KeyInitTypeDef *CRYP_KeyInitStruct)
 Saves the CRYP peripheral Context. More...
 
void CRYP_RestoreContext (CRYP_Context *CRYP_ContextRestore)
 Restores the CRYP peripheral Context. More...
 

Detailed Description

Context swapping functions.

 ===============================================================================
                      ##### Context swapping functions #####
 ===============================================================================  
 [..] This section provides functions allowing to save and store CRYP Context

 [..] It is possible to interrupt an encryption/ decryption/ key generation process 
      to perform another processing with a higher priority, and to complete the 
      interrupted process later on, when the higher-priority task is complete. To do 
      so, the context of the interrupted task must be saved from the CRYP registers 
      to memory, and then be restored from memory to the CRYP registers.
   
   (#) To save the current context, use CRYP_SaveContext() function
   (#) To restore the saved context, use CRYP_RestoreContext() function 

Function Documentation

void CRYP_RestoreContext ( CRYP_Context CRYP_ContextRestore)

Restores the CRYP peripheral Context.

Note
Since teh DMA transfer is stopped in CRYP_SaveContext() function, after restoring the context, you have to enable the DMA again (if the DMA was previously used).
Parameters
CRYP_ContextRestorepointer to a CRYP_Context structure that contains the repository for saved context.
Note
The data that were saved during context saving must be rewrited into the IN FIFO.
Return values
None

Definition at line 602 of file stm32f4xx_cryp.c.

ErrorStatus CRYP_SaveContext ( CRYP_Context CRYP_ContextSave,
CRYP_KeyInitTypeDef CRYP_KeyInitStruct 
)

Saves the CRYP peripheral Context.

Note
This function stops DMA transfer before to save the context. After restoring the context, you have to enable the DMA again (if the DMA was previously used).
Parameters
CRYP_ContextSavepointer to a CRYP_Context structure that contains the repository for current context.
CRYP_KeyInitStructpointer to a CRYP_KeyInitTypeDef structure that contains the configuration information for the CRYP Keys.
Return values
None

Definition at line 497 of file stm32f4xx_cryp.c.