STM32H735xx HAL User Manual
Functions
MultiBuffer functions
MMCEx Exported Functions

Multibuffer functions. More...

Functions

HAL_StatusTypeDef HAL_MMCEx_ConfigDMAMultiBuffer (MMC_HandleTypeDef *hmmc, uint32_t *pDataBuffer0, uint32_t *pDataBuffer1, uint32_t BufferSize)
 Configure DMA Dual Buffer mode.
HAL_StatusTypeDef HAL_MMCEx_ReadBlocksDMAMultiBuffer (MMC_HandleTypeDef *hmmc, uint32_t BlockAdd, uint32_t NumberOfBlocks)
 Reads block(s) from a specified address in a card.
HAL_StatusTypeDef HAL_MMCEx_WriteBlocksDMAMultiBuffer (MMC_HandleTypeDef *hmmc, uint32_t BlockAdd, uint32_t NumberOfBlocks)
 Write block(s) to a specified address in a card.
HAL_StatusTypeDef HAL_MMCEx_ChangeDMABuffer (MMC_HandleTypeDef *hmmc, HAL_MMCEx_DMABuffer_MemoryTypeDef Buffer, uint32_t *pDataBuffer)
 Change the DMA Buffer0 or Buffer1 address on the fly.
void HAL_MMCEx_Read_DMADoubleBuf0CpltCallback (MMC_HandleTypeDef *hmmc)
 Read DMA Buffer 0 Transfer completed callbacks.
void HAL_MMCEx_Read_DMADoubleBuf1CpltCallback (MMC_HandleTypeDef *hmmc)
 Read DMA Buffer 1 Transfer completed callbacks.
void HAL_MMCEx_Write_DMADoubleBuf0CpltCallback (MMC_HandleTypeDef *hmmc)
 Write DMA Buffer 0 Transfer completed callbacks.
void HAL_MMCEx_Write_DMADoubleBuf1CpltCallback (MMC_HandleTypeDef *hmmc)
 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 MMC HAL driver.


Function Documentation

HAL_StatusTypeDef HAL_MMCEx_ChangeDMABuffer ( MMC_HandleTypeDef hmmc,
HAL_MMCEx_DMABuffer_MemoryTypeDef  Buffer,
uint32_t *  pDataBuffer 
)

Change the DMA Buffer0 or Buffer1 address on the fly.

Parameters:
hmmc,:pointer to a MMC_HandleTypeDef structure.
Buffer,:the buffer to be changed, This parameter can be one of the following values: MMC_DMA_BUFFER0 or MMC_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 319 of file stm32h7xx_hal_mmc_ex.c.

References __MMC_HandleTypeDef::Instance, and MMC_DMA_BUFFER0.

HAL_StatusTypeDef HAL_MMCEx_ConfigDMAMultiBuffer ( MMC_HandleTypeDef hmmc,
uint32_t *  pDataBuffer0,
uint32_t *  pDataBuffer1,
uint32_t  BufferSize 
)

Configure DMA Dual Buffer mode.

The Data transfer is managed by an Internal DMA.

Parameters:
hmmc,:MMC 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 86 of file stm32h7xx_hal_mmc_ex.c.

References HAL_MMC_STATE_READY, __MMC_HandleTypeDef::Instance, MMC_BLOCKSIZE, and __MMC_HandleTypeDef::State.

Read DMA Buffer 0 Transfer completed callbacks.

Parameters:
hmmc,:MMC handle
Return values:
None

Definition at line 4225 of file stm32h7xx_hal_mmc.c.

Referenced by HAL_MMC_Init(), HAL_MMC_IRQHandler(), and HAL_MMC_UnRegisterCallback().

Read DMA Buffer 1 Transfer completed callbacks.

Parameters:
hmmc,:MMC handle
Return values:
None

Definition at line 4240 of file stm32h7xx_hal_mmc.c.

Referenced by HAL_MMC_Init(), HAL_MMC_IRQHandler(), and HAL_MMC_UnRegisterCallback().

HAL_StatusTypeDef HAL_MMCEx_ReadBlocksDMAMultiBuffer ( MMC_HandleTypeDef hmmc,
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_MMCEx_ConfigDMAMultiBuffer before call this function.

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

Definition at line 112 of file stm32h7xx_hal_mmc_ex.c.

References __HAL_MMC_ENABLE_IT, HAL_MMC_CardInfoTypeDef::CardType, __MMC_HandleTypeDef::Context, __MMC_HandleTypeDef::ErrorCode, __MMC_HandleTypeDef::Ext_CSD, HAL_MMC_ERROR_ADDR_MISALIGNED, HAL_MMC_ERROR_ADDR_OUT_OF_RANGE, HAL_MMC_ERROR_BLOCK_LEN_ERR, HAL_MMC_ERROR_NONE, HAL_MMC_STATE_BUSY, HAL_MMC_STATE_READY, __MMC_HandleTypeDef::Instance, HAL_MMC_CardInfoTypeDef::LogBlockNbr, MMC_BLOCKSIZE, MMC_CONTEXT_DMA, MMC_CONTEXT_READ_MULTIPLE_BLOCK, MMC_EXT_CSD_DATA_SEC_SIZE_INDEX, MMC_EXT_CSD_DATA_SEC_SIZE_POS, MMC_HIGH_CAPACITY_CARD, __MMC_HandleTypeDef::MmcCard, and __MMC_HandleTypeDef::State.

Write DMA Buffer 0 Transfer completed callbacks.

Parameters:
hmmc,:MMC handle
Return values:
None

Definition at line 4255 of file stm32h7xx_hal_mmc.c.

Referenced by HAL_MMC_Init(), HAL_MMC_IRQHandler(), and HAL_MMC_UnRegisterCallback().

Write DMA Buffer 1 Transfer completed callbacks.

Parameters:
hmmc,:MMC handle
Return values:
None

Definition at line 4270 of file stm32h7xx_hal_mmc.c.

Referenced by HAL_MMC_Init(), HAL_MMC_IRQHandler(), and HAL_MMC_UnRegisterCallback().

HAL_StatusTypeDef HAL_MMCEx_WriteBlocksDMAMultiBuffer ( MMC_HandleTypeDef hmmc,
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_MMCEx_ConfigDMAMultiBuffer before call this function.

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

Definition at line 215 of file stm32h7xx_hal_mmc_ex.c.

References __HAL_MMC_ENABLE_IT, HAL_MMC_CardInfoTypeDef::CardType, __MMC_HandleTypeDef::Context, __MMC_HandleTypeDef::ErrorCode, __MMC_HandleTypeDef::Ext_CSD, HAL_MMC_ERROR_ADDR_MISALIGNED, HAL_MMC_ERROR_ADDR_OUT_OF_RANGE, HAL_MMC_ERROR_BLOCK_LEN_ERR, HAL_MMC_ERROR_NONE, HAL_MMC_STATE_BUSY, HAL_MMC_STATE_READY, __MMC_HandleTypeDef::Instance, HAL_MMC_CardInfoTypeDef::LogBlockNbr, MMC_BLOCKSIZE, MMC_CONTEXT_DMA, MMC_CONTEXT_WRITE_MULTIPLE_BLOCK, MMC_EXT_CSD_DATA_SEC_SIZE_INDEX, MMC_EXT_CSD_DATA_SEC_SIZE_POS, MMC_HIGH_CAPACITY_CARD, __MMC_HandleTypeDef::MmcCard, and __MMC_HandleTypeDef::State.