Functions
Interrupts and flags management functions

Interrupts and flags management functions. More...

Collaboration diagram for Interrupts and flags management functions:

Functions

FunctionalState CRYP_GetCmdStatus (void)
 Returns whether CRYP peripheral is enabled or disabled. More...
 
FlagStatus CRYP_GetFlagStatus (uint8_t CRYP_FLAG)
 Checks whether the specified CRYP flag is set or not. More...
 
ITStatus CRYP_GetITStatus (uint8_t CRYP_IT)
 Checks whether the specified CRYP interrupt has occurred or not. More...
 
void CRYP_ITConfig (uint8_t CRYP_IT, FunctionalState NewState)
 Enables or disables the specified CRYP interrupts. More...
 

Detailed Description

Interrupts and flags management functions.

 ===============================================================================
              ##### Interrupts and flags management functions #####
 ===============================================================================  
 
 [..] This section provides functions allowing to configure the CRYP Interrupts and 
      to get the status and Interrupts pending bits.

 [..] The CRYP provides 2 Interrupts sources and 7 Flags:

 *** Flags : ***
 ===============
 [..] 
   (#) CRYP_FLAG_IFEM :  Set when Input FIFO is empty. This Flag is cleared only
       by hardware.
      
   (#) CRYP_FLAG_IFNF :  Set when Input FIFO is not full. This Flag is cleared 
       only by hardware.


   (#) CRYP_FLAG_INRIS  : Set when Input FIFO Raw interrupt is pending it gives 
       the raw interrupt state prior to masking of the input FIFO service interrupt.
       This Flag is cleared only by hardware.
     
   (#) CRYP_FLAG_OFNE   : Set when Output FIFO not empty. This Flag is cleared 
       only by hardware.
        
   (#) CRYP_FLAG_OFFU   : Set when Output FIFO is full. This Flag is cleared only 
       by hardware.
                           
   (#) CRYP_FLAG_OUTRIS : Set when Output FIFO Raw interrupt is pending it gives 
       the raw interrupt state prior to masking of the output FIFO service interrupt.
       This Flag is cleared only by hardware.
                               
   (#) CRYP_FLAG_BUSY   : Set when the CRYP core is currently processing a block 
       of data or a key preparation (for AES decryption). This Flag is cleared 
       only by hardware. To clear it, the CRYP core must be disabled and the last
       processing has completed. 

 *** Interrupts : ***
 ====================
 [..]
   (#) CRYP_IT_INI   : The input FIFO service interrupt is asserted when there 
      are less than 4 words in the input FIFO. This interrupt is associated to 
      CRYP_FLAG_INRIS flag.

      -@- This interrupt is cleared by performing write operations to the input FIFO 
          until it holds 4 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.



   (#) CRYP_IT_OUTI  : 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 associated to CRYP_FLAG_OUTRIS flag.

       -@- 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).

 *** Managing the CRYP controller events : ***
 =============================================
 [..] The user should identify which mode will be used in his application to manage 
      the CRYP controller events: Polling mode or Interrupt mode.

   (#) In the Polling Mode it is advised to use the following functions:
       (++) CRYP_GetFlagStatus() : to check if flags events occur. 

       -@@- The CRYPT flags do not need to be cleared since they are cleared as 
            soon as the associated event are reset.   


   (#) In the Interrupt Mode it is advised to use the following functions:
       (++) CRYP_ITConfig()       : to enable or disable the interrupt source.
       (++) CRYP_GetITStatus()    : to check if Interrupt occurs.

       -@@- The CRYPT interrupts have no pending bits, the interrupt is cleared as 
             soon as the associated event is reset. 

Function Documentation

FunctionalState CRYP_GetCmdStatus ( void  )

Returns whether CRYP peripheral is enabled or disabled.

Parameters
none.
Return values
Currentstate of the CRYP peripheral (ENABLE or DISABLE).

Definition at line 853 of file stm32f4xx_cryp.c.

FlagStatus CRYP_GetFlagStatus ( uint8_t  CRYP_FLAG)

Checks whether the specified CRYP flag is set or not.

Parameters
CRYP_FLAGspecifies the CRYP flag to check. This parameter can be one of the following values:
  • CRYP_FLAG_IFEM: Input FIFO Empty flag.
  • CRYP_FLAG_IFNF: Input FIFO Not Full flag.
  • CRYP_FLAG_OFNE: Output FIFO Not Empty flag.
  • CRYP_FLAG_OFFU: Output FIFO Full flag.
  • CRYP_FLAG_BUSY: Busy flag.
  • CRYP_FLAG_OUTRIS: Output FIFO raw interrupt flag.
  • CRYP_FLAG_INRIS: Input FIFO raw interrupt flag.
Return values
Thenew state of CRYP_FLAG (SET or RESET).

Definition at line 883 of file stm32f4xx_cryp.c.

ITStatus CRYP_GetITStatus ( uint8_t  CRYP_IT)

Checks whether the specified CRYP interrupt has occurred or not.

Note
This function checks the status of the masked interrupt (i.e the interrupt should be previously enabled).
Parameters
CRYP_ITspecifies the CRYP (masked) interrupt source to check. This parameter can be one of the following values:
  • CRYP_IT_INI: Input FIFO interrupt
  • CRYP_IT_OUTI: Output FIFO interrupt
Return values
Thenew state of CRYP_IT (SET or RESET).

Definition at line 827 of file stm32f4xx_cryp.c.

void CRYP_ITConfig ( uint8_t  CRYP_IT,
FunctionalState  NewState 
)

Enables or disables the specified CRYP interrupts.

Parameters
CRYP_ITspecifies the CRYP interrupt source to be enabled or disabled. This parameter can be any combination of the following values:
  • CRYP_IT_INI: Input FIFO interrupt
  • CRYP_IT_OUTI: Output FIFO interrupt
NewStatenew state of the specified CRYP interrupt. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 799 of file stm32f4xx_cryp.c.



rosflight_firmware
Author(s): Daniel Koch , James Jackson
autogenerated on Wed Jul 3 2019 19:59:29