UM1940
__IO uint16_t CrypOutCount
HAL_StatusTypeDef Status
HAL_PhaseTypeDef Phase
DMA_HandleTypeDef * hdmain
DMA_HandleTypeDef * hdmaout
HAL_LockTypeDef Lock
__IO HAL_CRYP_STATETypeDef State
Field Documentation
CRYP_TypeDef* CRYP_HandleTypeDef::Instance
CRYP registers base address
CRYP_InitTypeDef CRYP_HandleTypeDef::Init
CRYP required parameters
uint8_t* CRYP_HandleTypeDef::pCrypInBuffPtr
Pointer to CRYP processing (encryption, decryption,...) buffer
uint8_t* CRYP_HandleTypeDef::pCrypOutBuffPtr
Pointer to CRYP processing (encryption, decryption,...) buffer
__IO uint16_t CRYP_HandleTypeDef::CrypInCount
Counter of inputed data
__IO uint16_t CRYP_HandleTypeDef::CrypOutCount
Counter of output data
HAL_StatusTypeDef CRYP_HandleTypeDef::Status
CRYP peripheral status
HAL_PhaseTypeDef CRYP_HandleTypeDef::Phase
CRYP peripheral phase
DMA_HandleTypeDef* CRYP_HandleTypeDef::hdmain
CRYP In DMA handle parameters
DMA_HandleTypeDef* CRYP_HandleTypeDef::hdmaout
CRYP Out DMA handle parameters
HAL_LockTypeDef CRYP_HandleTypeDef::Lock
CRYP locking object
__IO HAL_CRYP_STATETypeDef CRYP_HandleTypeDef::State
CRYP peripheral state
11.2
CRYP Firmware driver API description
11.2.1
How to use this driver
The CRYP HAL driver can be used as follows:
1.
Initialize the CRYP low level resources by implementing the HAL_CRYP_MspInit():
a.
b.
c.
Enable the CRYP interface clock using __HAL_RCC_CRYP_CLK_ENABLE()
In case of using interrupts (e.g. HAL_CRYP_AESECB_Encrypt_IT())
Configure the CRYP interrupt priority using HAL_NVIC_SetPriority()
Enable the CRYP IRQ handler using HAL_NVIC_EnableIRQ()
In CRYP IRQ handler, call HAL_CRYP_IRQHandler()
In case of using DMA to control data transfer (e.g.
HAL_CRYP_AESECB_Encrypt_DMA())
Enable the DMAx interface clock using __DMAx_CLK_ENABLE()
Configure and enable two DMA streams one for managing data transfer
from memory to peripheral (input stream) and another stream for managing
data transfer from peripheral to memory (output stream)
Associate the initialized DMA handle to the CRYP DMA handle using
__HAL_LINKDMA()
DocID028236 Rev 2
HAL CRYP Generic Driver
137/1371
Need help?
Do you have a question about the STM32F2 and is the answer not in the manual?