STM32L486xx HAL User Manual
Functions
Input and Output operation functions
DMA Exported Functions

Input and Output operation functions. More...

Functions

HAL_StatusTypeDef HAL_DMA_Start (DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
 Start the DMA Transfer.
HAL_StatusTypeDef HAL_DMA_Start_IT (DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
 Start the DMA Transfer with interrupt enabled.
HAL_StatusTypeDef HAL_DMA_Abort (DMA_HandleTypeDef *hdma)
 Abort the DMA Transfer.
HAL_StatusTypeDef HAL_DMA_Abort_IT (DMA_HandleTypeDef *hdma)
 Aborts the DMA Transfer in Interrupt mode.
HAL_StatusTypeDef HAL_DMA_PollForTransfer (DMA_HandleTypeDef *hdma, HAL_DMA_LevelCompleteTypeDef CompleteLevel, uint32_t Timeout)
 Polling for transfer complete.
void HAL_DMA_IRQHandler (DMA_HandleTypeDef *hdma)
 Handle DMA interrupt request.
HAL_StatusTypeDef HAL_DMA_RegisterCallback (DMA_HandleTypeDef *hdma, HAL_DMA_CallbackIDTypeDef CallbackID, void(*pCallback)(DMA_HandleTypeDef *_hdma))
 Register callbacks.
HAL_StatusTypeDef HAL_DMA_UnRegisterCallback (DMA_HandleTypeDef *hdma, HAL_DMA_CallbackIDTypeDef CallbackID)
 UnRegister callbacks.

Detailed Description

Input and Output operation functions.

 ===============================================================================
                      #####  IO operation functions  #####
 ===============================================================================
    [..]  This section provides functions allowing to:
      (+) Configure the source, destination address and data length and Start DMA transfer
      (+) Configure the source, destination address and data length and
          Start DMA transfer with interrupt
      (+) Abort DMA transfer
      (+) Poll for transfer complete
      (+) Handle DMA interrupt request


Function Documentation

HAL_StatusTypeDef HAL_DMA_Abort ( DMA_HandleTypeDef hdma)
HAL_StatusTypeDef HAL_DMA_Abort_IT ( DMA_HandleTypeDef hdma)
HAL_StatusTypeDef HAL_DMA_PollForTransfer ( DMA_HandleTypeDef hdma,
HAL_DMA_LevelCompleteTypeDef  CompleteLevel,
uint32_t  Timeout 
)

Polling for transfer complete.

Parameters:
hdmapointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA Channel.
CompleteLevelSpecifies the DMA level complete.
TimeoutTimeout duration.
Return values:
HALstatus

Definition at line 685 of file stm32l4xx_hal_dma.c.

References __DMA_HandleTypeDef::ChannelIndex, DMA_FLAG_HT1, DMA_FLAG_TC1, DMA_FLAG_TE1, __DMA_HandleTypeDef::DmaBaseAddress, __DMA_HandleTypeDef::ErrorCode, HAL_DMA_ERROR_NO_XFER, HAL_DMA_ERROR_NOT_SUPPORTED, HAL_DMA_ERROR_REQGEN, HAL_DMA_ERROR_SYNC, HAL_DMA_ERROR_TE, HAL_DMA_ERROR_TIMEOUT, HAL_DMA_FULL_TRANSFER, HAL_DMA_STATE_BUSY, HAL_DMA_STATE_READY, HAL_GetTick(), __DMA_HandleTypeDef::Instance, and __DMA_HandleTypeDef::State.

HAL_StatusTypeDef HAL_DMA_RegisterCallback ( DMA_HandleTypeDef hdma,
HAL_DMA_CallbackIDTypeDef  CallbackID,
void(*)(DMA_HandleTypeDef *_hdma)  pCallback 
)

Register callbacks.

Parameters:
hdmapointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA Channel.
CallbackIDUser Callback identifer a HAL_DMA_CallbackIDTypeDef ENUM as parameter.
pCallbackpointer to private callbacsk function which has pointer to a DMA_HandleTypeDef structure as parameter.
Return values:
HALstatus

Definition at line 909 of file stm32l4xx_hal_dma.c.

References HAL_DMA_STATE_READY, HAL_DMA_XFER_ABORT_CB_ID, HAL_DMA_XFER_CPLT_CB_ID, HAL_DMA_XFER_ERROR_CB_ID, HAL_DMA_XFER_HALFCPLT_CB_ID, __DMA_HandleTypeDef::State, __DMA_HandleTypeDef::XferAbortCallback, __DMA_HandleTypeDef::XferCpltCallback, __DMA_HandleTypeDef::XferErrorCallback, and __DMA_HandleTypeDef::XferHalfCpltCallback.

HAL_StatusTypeDef HAL_DMA_Start ( DMA_HandleTypeDef hdma,
uint32_t  SrcAddress,
uint32_t  DstAddress,
uint32_t  DataLength 
)

Start the DMA Transfer.

Parameters:
hdmapointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA Channel.
SrcAddressThe source memory Buffer address
DstAddressThe destination memory Buffer address
DataLengthThe length of data to be transferred from source to destination
Return values:
HALstatus

Definition at line 447 of file stm32l4xx_hal_dma.c.

References __HAL_DMA_DISABLE, __HAL_DMA_ENABLE, assert_param, DMA_SetConfig(), __DMA_HandleTypeDef::ErrorCode, HAL_DMA_ERROR_NONE, HAL_DMA_STATE_BUSY, HAL_DMA_STATE_READY, IS_DMA_BUFFER_SIZE, and __DMA_HandleTypeDef::State.

HAL_StatusTypeDef HAL_DMA_Start_IT ( DMA_HandleTypeDef hdma,
uint32_t  SrcAddress,
uint32_t  DstAddress,
uint32_t  DataLength 
)

Start the DMA Transfer with interrupt enabled.

Parameters:
hdmapointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA Channel.
SrcAddressThe source memory Buffer address
DstAddressThe destination memory Buffer address
DataLengthThe length of data to be transferred from source to destination
Return values:
HALstatus

Definition at line 490 of file stm32l4xx_hal_dma.c.

References __HAL_DMA_DISABLE, __HAL_DMA_DISABLE_IT, __HAL_DMA_ENABLE, __HAL_DMA_ENABLE_IT, assert_param, DMA_IT_HT, DMA_IT_TC, DMA_IT_TE, DMA_SetConfig(), __DMA_HandleTypeDef::ErrorCode, HAL_DMA_ERROR_NONE, HAL_DMA_STATE_BUSY, HAL_DMA_STATE_READY, IS_DMA_BUFFER_SIZE, __DMA_HandleTypeDef::State, and __DMA_HandleTypeDef::XferHalfCpltCallback.

Referenced by CRYP_Authentication_SetDMAConfig(), CRYP_SetDMAConfig(), HAL_ADC_Start_DMA(), HAL_ADCEx_MultiModeStart_DMA(), HAL_DAC_Start_DMA(), HAL_DFSDM_FilterInjectedMsbStart_DMA(), HAL_DFSDM_FilterInjectedStart_DMA(), HAL_DFSDM_FilterRegularMsbStart_DMA(), HAL_DFSDM_FilterRegularStart_DMA(), HAL_I2C_Master_Receive_DMA(), HAL_I2C_Master_Sequential_Receive_DMA(), HAL_I2C_Master_Sequential_Transmit_DMA(), HAL_I2C_Master_Transmit_DMA(), HAL_I2C_Mem_Read_DMA(), HAL_I2C_Mem_Write_DMA(), HAL_I2C_Slave_Receive_DMA(), HAL_I2C_Slave_Sequential_Receive_DMA(), HAL_I2C_Slave_Sequential_Transmit_DMA(), HAL_I2C_Slave_Transmit_DMA(), HAL_IRDA_Receive_DMA(), HAL_IRDA_Transmit_DMA(), HAL_QSPI_Receive_DMA(), HAL_QSPI_Transmit_DMA(), HAL_SAI_Receive_DMA(), HAL_SAI_Transmit_DMA(), HAL_SD_ReadBlocks_DMA(), HAL_SD_WriteBlocks_DMA(), HAL_SMARTCARD_Receive_DMA(), HAL_SMARTCARD_Transmit_DMA(), HAL_SPI_Receive_DMA(), HAL_SPI_Transmit_DMA(), HAL_SPI_TransmitReceive_DMA(), HAL_SRAM_Read_DMA(), HAL_SRAM_Write_DMA(), HAL_SWPMI_Receive_DMA(), HAL_SWPMI_Transmit_DMA(), HAL_TIM_Base_Start_DMA(), HAL_TIM_DMABurst_ReadStart(), HAL_TIM_DMABurst_WriteStart(), HAL_TIM_Encoder_Start_DMA(), HAL_TIM_IC_Start_DMA(), HAL_TIM_OC_Start_DMA(), HAL_TIM_PWM_Start_DMA(), HAL_TIMEx_HallSensor_Start_DMA(), HAL_TIMEx_OCN_Start_DMA(), HAL_TIMEx_PWMN_Start_DMA(), HAL_UART_Receive_DMA(), HAL_UART_Transmit_DMA(), HAL_USART_Receive_DMA(), HAL_USART_Transmit_DMA(), HAL_USART_TransmitReceive_DMA(), I2C_DMAMasterReceiveCplt(), and I2C_DMAMasterTransmitCplt().

HAL_StatusTypeDef HAL_DMA_UnRegisterCallback ( DMA_HandleTypeDef hdma,
HAL_DMA_CallbackIDTypeDef  CallbackID 
)

UnRegister callbacks.

Parameters:
hdmapointer to a DMA_HandleTypeDef structure that contains the configuration information for the specified DMA Channel.
CallbackIDUser Callback identifer a HAL_DMA_CallbackIDTypeDef ENUM as parameter.
Return values:
HALstatus

Definition at line 960 of file stm32l4xx_hal_dma.c.

References HAL_DMA_STATE_READY, HAL_DMA_XFER_ABORT_CB_ID, HAL_DMA_XFER_ALL_CB_ID, HAL_DMA_XFER_CPLT_CB_ID, HAL_DMA_XFER_ERROR_CB_ID, HAL_DMA_XFER_HALFCPLT_CB_ID, __DMA_HandleTypeDef::State, __DMA_HandleTypeDef::XferAbortCallback, __DMA_HandleTypeDef::XferCpltCallback, __DMA_HandleTypeDef::XferErrorCallback, and __DMA_HandleTypeDef::XferHalfCpltCallback.