STM32H735xx HAL User Manual
Functions
MultiBuffer functions
SDEx Exported Functions

Multibuffer functions. More...

Functions

HAL_StatusTypeDef HAL_SDEx_ConfigDMAMultiBuffer (SD_HandleTypeDef *hsd, uint32_t *pDataBuffer0, uint32_t *pDataBuffer1, uint32_t BufferSize)
 Configure DMA Dual Buffer mode.
HAL_StatusTypeDef HAL_SDEx_ReadBlocksDMAMultiBuffer (SD_HandleTypeDef *hsd, uint32_t BlockAdd, uint32_t NumberOfBlocks)
 Reads block(s) from a specified address in a card.
HAL_StatusTypeDef HAL_SDEx_WriteBlocksDMAMultiBuffer (SD_HandleTypeDef *hsd, uint32_t BlockAdd, uint32_t NumberOfBlocks)
 Write block(s) to a specified address in a card.
HAL_StatusTypeDef HAL_SDEx_ChangeDMABuffer (SD_HandleTypeDef *hsd, HAL_SDEx_DMABuffer_MemoryTypeDef Buffer, uint32_t *pDataBuffer)
 Change the DMA Buffer0 or Buffer1 address on the fly.
void HAL_SDEx_Read_DMADoubleBuf0CpltCallback (SD_HandleTypeDef *hsd)
 Read DMA Buffer 0 Transfer completed callbacks.
void HAL_SDEx_Read_DMADoubleBuf1CpltCallback (SD_HandleTypeDef *hsd)
 Read DMA Buffer 1 Transfer completed callbacks.
void HAL_SDEx_Write_DMADoubleBuf0CpltCallback (SD_HandleTypeDef *hsd)
 Write DMA Buffer 0 Transfer completed callbacks.
void HAL_SDEx_Write_DMADoubleBuf1CpltCallback (SD_HandleTypeDef *hsd)
 Write DMA Buffer 1 Transfer completed callbacks.

Detailed Description

Multibuffer functions.

  ==============================================================================
          ##### Multibuffer functions #####
  ==============================================================================
  [..]
    This section provides functions allowing to configure the multibuffer mode and start read and write
    multibuffer mode for SD HAL driver.


Function Documentation

HAL_StatusTypeDef HAL_SDEx_ChangeDMABuffer ( SD_HandleTypeDef hsd,
HAL_SDEx_DMABuffer_MemoryTypeDef  Buffer,
uint32_t *  pDataBuffer 
)

Change the DMA Buffer0 or Buffer1 address on the fly.

Parameters:
hsd,:pointer to a SD_HandleTypeDef structure.
Buffer,:the buffer to be changed, This parameter can be one of the following values: SD_DMA_BUFFER0 or SD_DMA_BUFFER1
pDataBuffer,:The new address
Note:
The BUFFER0 address can be changed only when the current transfer use BUFFER1 and the BUFFER1 address can be changed only when the current transfer use BUFFER0.
Return values:
HALstatus

Definition at line 279 of file stm32h7xx_hal_sd_ex.c.

References __SD_HandleTypeDef::Instance, and SD_DMA_BUFFER0.

HAL_StatusTypeDef HAL_SDEx_ConfigDMAMultiBuffer ( SD_HandleTypeDef hsd,
uint32_t *  pDataBuffer0,
uint32_t *  pDataBuffer1,
uint32_t  BufferSize 
)

Configure DMA Dual Buffer mode.

The Data transfer is managed by an Internal DMA.

Parameters:
hsd,:SD handle
pDataBuffer0,:Pointer to the buffer0 that will contain/receive the transferred data
pDataBuffer1,:Pointer to the buffer1 that will contain/receive the transferred data
BufferSize,:Size of Buffer0 in Blocks. Buffer0 and Buffer1 must have the same size.
Return values:
HALstatus

Definition at line 83 of file stm32h7xx_hal_sd_ex.c.

References BLOCKSIZE, HAL_SD_STATE_READY, __SD_HandleTypeDef::Instance, and __SD_HandleTypeDef::State.

Read DMA Buffer 0 Transfer completed callbacks.

Parameters:
hsd,:SD handle
Return values:
None

Definition at line 3979 of file stm32h7xx_hal_sd.c.

Referenced by HAL_SD_Init(), HAL_SD_IRQHandler(), and HAL_SD_UnRegisterCallback().

Read DMA Buffer 1 Transfer completed callbacks.

Parameters:
hsd,:SD handle
Return values:
None

Definition at line 3994 of file stm32h7xx_hal_sd.c.

Referenced by HAL_SD_Init(), HAL_SD_IRQHandler(), and HAL_SD_UnRegisterCallback().

HAL_StatusTypeDef HAL_SDEx_ReadBlocksDMAMultiBuffer ( SD_HandleTypeDef hsd,
uint32_t  BlockAdd,
uint32_t  NumberOfBlocks 
)

Reads block(s) from a specified address in a card.

The received Data will be stored in Buffer0 and Buffer1. Buffer0, Buffer1 and BufferSize need to be configured by function HAL_SDEx_ConfigDMAMultiBuffer before call this function.

Parameters:
hsd,:SD handle
BlockAdd,:Block Address from where data is to be read
NumberOfBlocks,:Total number of blocks to read
Return values:
HALstatus

Definition at line 109 of file stm32h7xx_hal_sd_ex.c.

References __HAL_SD_CLEAR_FLAG, __HAL_SD_ENABLE_IT, BLOCKSIZE, CARD_SDHC_SDXC, HAL_SD_CardInfoTypeDef::CardType, __SD_HandleTypeDef::Context, __SD_HandleTypeDef::ErrorCode, HAL_SD_ERROR_ADDR_OUT_OF_RANGE, HAL_SD_ERROR_NONE, HAL_SD_STATE_BUSY, HAL_SD_STATE_READY, __SD_HandleTypeDef::Instance, HAL_SD_CardInfoTypeDef::LogBlockNbr, SD_CONTEXT_DMA, SD_CONTEXT_READ_MULTIPLE_BLOCK, __SD_HandleTypeDef::SdCard, and __SD_HandleTypeDef::State.

Write DMA Buffer 0 Transfer completed callbacks.

Parameters:
hsd,:SD handle
Return values:
None

Definition at line 4009 of file stm32h7xx_hal_sd.c.

Referenced by HAL_SD_Init(), HAL_SD_IRQHandler(), and HAL_SD_UnRegisterCallback().

Write DMA Buffer 1 Transfer completed callbacks.

Parameters:
hsd,:SD handle
Return values:
None

Definition at line 4024 of file stm32h7xx_hal_sd.c.

Referenced by HAL_SD_Init(), HAL_SD_IRQHandler(), and HAL_SD_UnRegisterCallback().

HAL_StatusTypeDef HAL_SDEx_WriteBlocksDMAMultiBuffer ( SD_HandleTypeDef hsd,
uint32_t  BlockAdd,
uint32_t  NumberOfBlocks 
)

Write block(s) to a specified address in a card.

The transferred Data are stored in Buffer0 and Buffer1. Buffer0, Buffer1 and BufferSize need to be configured by function HAL_SDEx_ConfigDMAMultiBuffer before call this function.

Parameters:
hsd,:SD handle
BlockAdd,:Block Address from where data is to be read
NumberOfBlocks,:Total number of blocks to read
Return values:
HALstatus

Definition at line 195 of file stm32h7xx_hal_sd_ex.c.

References __HAL_SD_ENABLE_IT, BLOCKSIZE, CARD_SDHC_SDXC, HAL_SD_CardInfoTypeDef::CardType, __SD_HandleTypeDef::Context, __SD_HandleTypeDef::ErrorCode, HAL_SD_ERROR_ADDR_OUT_OF_RANGE, HAL_SD_ERROR_NONE, HAL_SD_STATE_BUSY, HAL_SD_STATE_READY, __SD_HandleTypeDef::Instance, HAL_SD_CardInfoTypeDef::LogBlockNbr, SD_CONTEXT_DMA, SD_CONTEXT_WRITE_MULTIPLE_BLOCK, __SD_HandleTypeDef::SdCard, and __SD_HandleTypeDef::State.