EasyManuals Logo

ST STM32F2 User Manual

ST STM32F2
1371 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #358 background imageLoading...
Page #358 background image
HAL MMC Generic Driver
UM1940
358/1371
DocID028236 Rev 2
done correctly. The check is done through HAL_MMC_GetCardState() function for
MMC card state.
You can write to MMC card in DMA mode by using function
HAL_MMC_WriteBlocks_DMA(). This function allows the read of 512 bytes blocks.
You can choose either one block read operation or multiple block read operation by
adjusting the "NumberOfBlocks" parameter. After this, you have to ensure that the
transfer is done correctly. The check is done through HAL_MMC_GetCardState()
function for MMC card state. You could also check the DMA transfer process through
the MMC Tx interrupt event.
You can write to MMC card in Interrupt mode by using function
HAL_MMC_WriteBlocks_IT(). This function allows the read of 512 bytes blocks. You
can choose either one block read operation or multiple block read operation by
adjusting the "NumberOfBlocks" parameter. After this, you have to ensure that the
transfer is done correctly. The check is done through HAL_MMC_GetCardState()
function for MMC card state. You could also check the IT transfer process through the
MMC Tx interrupt event.
MMC card status
The MMC Status contains status bits that are related to the MMC Memory Card
proprietary features. To get MMC card status use the HAL_MMC_GetCardStatus().
MMC card information
To get MMC card information, you can use the function HAL_MMC_GetCardInfo(). It
returns useful information about the MMC card such as block size, card type, block
number ...
MMC card CSD register
The HAL_MMC_GetCardCSD() API allows to get the parameters of the CSD register.
Some of the CSD parameters are useful for card initialization and identification.
MMC card CID register
The HAL_MMC_GetCardCID() API allows to get the parameters of the CID register.
Some of the CID parameters are useful for card initialization and identification.
MMC HAL driver macros list
Below the list of most used macros in MMC HAL driver.
__HAL_MMC_ENABLE : Enable the MMC device
__HAL_MMC_DISABLE : Disable the MMC device
__HAL_MMC_DMA_ENABLE: Enable the SDMMC DMA transfer
__HAL_MMC_DMA_DISABLE: Disable the SDMMC DMA transfer
__HAL_MMC_ENABLE_IT: Enable the MMC device interrupt
__HAL_MMC_DISABLE_IT: Disable the MMC device interrupt
__HAL_MMC_GET_FLAG:Check whether the specified MMC flag is set or not
__HAL_MMC_CLEAR_FLAG: Clear the MMC's pending flags
You can refer to the MMC HAL driver header file for more useful macros

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32F2 and is the answer not in the manual?

ST STM32F2 Specifications

General IconGeneral
BrandST
ModelSTM32F2
CategoryMicrocontrollers
LanguageEnglish

Related product manuals