STM32F4 Standard Peripheral bibliotheek  1.0
ST Microelectronics bibliotheek documentatie voor de STM32F4 Standard Peripheral Library
 All Data Structures Files Functions Variables Enumerations Enumerator Groups
Context swapping functions

Context swapping functions. More...

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.
   
  1. To save the current context, use CRYP_SaveContext() function
  2. 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_ContextRestore,:pointer 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
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_ContextSave,:pointer to a CRYP_Context structure that contains the repository for current context.
CRYP_KeyInitStruct,:pointer to a CRYP_KeyInitTypeDef structure that contains the configuration information for the CRYP Keys.
Return values
None