STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
Loading...
Searching...
No Matches
Peripheral Control functions

management functions More...

Collaboration diagram for Peripheral Control functions:

Functions

HAL_StatusTypeDef HAL_MMC_ConfigWideBusOperation (MMC_HandleTypeDef *hmmc, uint32_t WideMode)
 Enables wide bus operation for the requested card if supported by card.
 
HAL_StatusTypeDef HAL_MMC_GetCardCID (MMC_HandleTypeDef *hmmc, HAL_MMC_CardCIDTypeDef *pCID)
 Returns information the information of the card which are stored on the CID register.
 
HAL_StatusTypeDef HAL_MMC_GetCardCSD (MMC_HandleTypeDef *hmmc, HAL_MMC_CardCSDTypeDef *pCSD)
 Returns information the information of the card which are stored on the CSD register.
 
HAL_StatusTypeDef HAL_MMC_GetCardInfo (MMC_HandleTypeDef *hmmc, HAL_MMC_CardInfoTypeDef *pCardInfo)
 Gets the MMC card info.
 
HAL_StatusTypeDef HAL_MMC_GetCardExtCSD (MMC_HandleTypeDef *hmmc, uint32_t *pExtCSD, uint32_t Timeout)
 Returns information the information of the card which are stored on the Extended CSD register.
 
HAL_MMC_CardStateTypeDef HAL_MMC_GetCardState (MMC_HandleTypeDef *hmmc)
 Gets the current mmc card data state.
 
HAL_StatusTypeDef HAL_MMC_Abort (MMC_HandleTypeDef *hmmc)
 Abort the current transfer and disable the MMC.
 
HAL_StatusTypeDef HAL_MMC_Abort_IT (MMC_HandleTypeDef *hmmc)
 Abort the current transfer and disable the MMC (IT mode).
 

Detailed Description

management functions

  ==============================================================================
                      ##### Peripheral Control functions #####
  ==============================================================================
  [..]
    This subsection provides a set of functions allowing to control the MMC card
    operations and get the related information

Function Documentation

◆ HAL_MMC_ConfigWideBusOperation()

HAL_StatusTypeDef HAL_MMC_ConfigWideBusOperation ( MMC_HandleTypeDef * hmmc,
uint32_t WideMode )

#include <stm32f4xx_hal_mmc.h>

Enables wide bus operation for the requested card if supported by card.

Parameters
hmmcPointer to MMC handle
WideModeSpecifies the MMC card wide bus mode This parameter can be one of the following values:
  • SDIO_BUS_WIDE_8B: 8-bit data transfer
  • SDIO_BUS_WIDE_4B: 4-bit data transfer
  • SDIO_BUS_WIDE_1B: 1-bit data transfer
Return values
HALstatus

Definition at line 2294 of file stm32f4xx_hal_mmc.c.

References __HAL_MMC_CLEAR_FLAG, assert_param, MMC_HandleTypeDef::ErrorCode, HAL_ERROR, HAL_MMC_ERROR_NONE, HAL_MMC_ERROR_PARAM, HAL_MMC_STATE_BUSY, HAL_MMC_STATE_READY, HAL_OK, MMC_HandleTypeDef::Init, MMC_HandleTypeDef::Instance, MMC_PwrClassUpdate(), MMC_HandleTypeDef::MmcCard, HAL_MMC_CardInfoTypeDef::RelCardAdd, and MMC_HandleTypeDef::State.

Referenced by HAL_MMC_Init().

◆ HAL_MMC_GetCardCID()

HAL_StatusTypeDef HAL_MMC_GetCardCID ( MMC_HandleTypeDef * hmmc,
HAL_MMC_CardCIDTypeDef * pCID )

#include <stm32f4xx_hal_mmc.c>

Returns information the information of the card which are stored on the CID register.

Parameters
hmmcPointer to MMC handle
pCIDPointer to a HAL_MMC_CIDTypedef structure that contains all CID register parameters
Return values
HALstatus

Definition at line 2004 of file stm32f4xx_hal_mmc.c.

References MMC_HandleTypeDef::CID, HAL_MMC_CardCIDTypeDef::CID_CRC, HAL_OK, HAL_MMC_CardCIDTypeDef::ManufactDate, HAL_MMC_CardCIDTypeDef::ManufacturerID, HAL_MMC_CardCIDTypeDef::OEM_AppliID, HAL_MMC_CardCIDTypeDef::ProdName1, HAL_MMC_CardCIDTypeDef::ProdName2, HAL_MMC_CardCIDTypeDef::ProdRev, HAL_MMC_CardCIDTypeDef::ProdSN, HAL_MMC_CardCIDTypeDef::Reserved1, and HAL_MMC_CardCIDTypeDef::Reserved2.

◆ HAL_MMC_GetCardCSD()

HAL_StatusTypeDef HAL_MMC_GetCardCSD ( MMC_HandleTypeDef * hmmc,
HAL_MMC_CardCSDTypeDef * pCSD )

#include <stm32f4xx_hal_mmc.c>

Returns information the information of the card which are stored on the CSD register.

Parameters
hmmcPointer to MMC handle
pCSDPointer to a HAL_MMC_CardCSDTypeDef structure that contains all CSD register parameters
Return values
HALstatus

< Reserved

Definition at line 2037 of file stm32f4xx_hal_mmc.c.

References __HAL_MMC_CLEAR_FLAG, HAL_MMC_CardInfoTypeDef::BlockNbr, HAL_MMC_CardInfoTypeDef::BlockSize, HAL_MMC_CardCSDTypeDef::CardComdClasses, HAL_MMC_CardInfoTypeDef::CardType, HAL_MMC_CardCSDTypeDef::ContentProtectAppli, HAL_MMC_CardCSDTypeDef::CopyFlag, MMC_HandleTypeDef::CSD, HAL_MMC_CardCSDTypeDef::CSD_CRC, HAL_MMC_CardCSDTypeDef::CSDStruct, HAL_MMC_CardCSDTypeDef::DeviceSize, HAL_MMC_CardCSDTypeDef::DeviceSizeMul, HAL_MMC_CardCSDTypeDef::DSRImpl, HAL_MMC_CardCSDTypeDef::ECC, HAL_MMC_CardCSDTypeDef::EraseGrMul, HAL_MMC_CardCSDTypeDef::EraseGrSize, MMC_HandleTypeDef::ErrorCode, HAL_MMC_CardCSDTypeDef::FileFormat, HAL_MMC_CardCSDTypeDef::FileFormatGroup, HAL_ERROR, HAL_MMC_ERROR_UNSUPPORTED_FEATURE, HAL_MMC_STATE_READY, HAL_OK, HAL_MMC_CardInfoTypeDef::LogBlockNbr, HAL_MMC_CardInfoTypeDef::LogBlockSize, HAL_MMC_CardCSDTypeDef::ManDeflECC, HAL_MMC_CardCSDTypeDef::MaxBusClkFrec, HAL_MMC_CardCSDTypeDef::MaxRdCurrentVDDMax, HAL_MMC_CardCSDTypeDef::MaxRdCurrentVDDMin, HAL_MMC_CardCSDTypeDef::MaxWrBlockLen, HAL_MMC_CardCSDTypeDef::MaxWrCurrentVDDMax, HAL_MMC_CardCSDTypeDef::MaxWrCurrentVDDMin, MMC_HIGH_CAPACITY_CARD, MMC_LOW_CAPACITY_CARD, MMC_ReadExtCSD(), MMC_HandleTypeDef::MmcCard, HAL_MMC_CardCSDTypeDef::NSAC, HAL_MMC_CardCSDTypeDef::PartBlockRead, HAL_MMC_CardCSDTypeDef::PermWrProtect, HAL_MMC_CardCSDTypeDef::RdBlockLen, HAL_MMC_CardCSDTypeDef::RdBlockMisalign, HAL_MMC_CardCSDTypeDef::Reserved1, HAL_MMC_CardCSDTypeDef::Reserved2, HAL_MMC_CardCSDTypeDef::Reserved3, HAL_MMC_CardCSDTypeDef::Reserved4, MMC_HandleTypeDef::State, HAL_MMC_CardCSDTypeDef::SysSpecVersion, HAL_MMC_CardCSDTypeDef::TAAC, HAL_MMC_CardCSDTypeDef::TempWrProtect, HAL_MMC_CardCSDTypeDef::WrBlockMisalign, HAL_MMC_CardCSDTypeDef::WriteBlockPaPartial, HAL_MMC_CardCSDTypeDef::WrProtectGrEnable, HAL_MMC_CardCSDTypeDef::WrProtectGrSize, and HAL_MMC_CardCSDTypeDef::WrSpeedFact.

Referenced by MMC_InitCard().

◆ HAL_MMC_GetCardInfo()

HAL_StatusTypeDef HAL_MMC_GetCardInfo ( MMC_HandleTypeDef * hmmc,
HAL_MMC_CardInfoTypeDef * pCardInfo )

#include <stm32f4xx_hal_mmc.c>

Gets the MMC card info.

Parameters
hmmcPointer to MMC handle
pCardInfoPointer to the HAL_MMC_CardInfoTypeDef structure that will contain the MMC card status information
Return values
HALstatus

Definition at line 2154 of file stm32f4xx_hal_mmc.c.

References HAL_MMC_CardInfoTypeDef::BlockNbr, HAL_MMC_CardInfoTypeDef::BlockSize, HAL_MMC_CardInfoTypeDef::CardType, HAL_MMC_CardInfoTypeDef::Class, HAL_OK, HAL_MMC_CardInfoTypeDef::LogBlockNbr, HAL_MMC_CardInfoTypeDef::LogBlockSize, MMC_HandleTypeDef::MmcCard, and HAL_MMC_CardInfoTypeDef::RelCardAdd.

◆ HAL_MMC_GetCardExtCSD()

HAL_StatusTypeDef HAL_MMC_GetCardExtCSD ( MMC_HandleTypeDef * hmmc,
uint32_t * pExtCSD,
uint32_t Timeout )

#include <stm32f4xx_hal_mmc.c>

Returns information the information of the card which are stored on the Extended CSD register.

Parameters
hmmcPointer to MMC handle
pExtCSDPointer to a memory area (512 bytes) that contains all Extended CSD register parameters
TimeoutSpecify timeout value
Return values
HALstatus

Definition at line 2176 of file stm32f4xx_hal_mmc.c.

References __HAL_MMC_CLEAR_FLAG, __HAL_MMC_GET_FLAG, MMC_HandleTypeDef::ErrorCode, HAL_ERROR, HAL_GetTick(), HAL_MMC_ERROR_DATA_CRC_FAIL, HAL_MMC_ERROR_DATA_TIMEOUT, HAL_MMC_ERROR_NONE, HAL_MMC_ERROR_PARAM, HAL_MMC_ERROR_RX_OVERRUN, HAL_MMC_ERROR_TIMEOUT, HAL_MMC_STATE_BUSY, HAL_MMC_STATE_READY, HAL_OK, HAL_TIMEOUT, MMC_HandleTypeDef::Instance, and MMC_HandleTypeDef::State.

Referenced by MMC_InitCard().

◆ HAL_MMC_GetCardState()

HAL_MMC_CardStateTypeDef HAL_MMC_GetCardState ( MMC_HandleTypeDef * hmmc)

#include <stm32f4xx_hal_mmc.c>

Gets the current mmc card data state.

Parameters
hmmcpointer to MMC handle
Return values
Cardstate

Definition at line 2393 of file stm32f4xx_hal_mmc.c.

References MMC_HandleTypeDef::ErrorCode, HAL_MMC_ERROR_NONE, and MMC_SendStatus().

Referenced by HAL_MMC_Abort(), HAL_MMC_Abort_IT(), MMC_DMAError(), MMC_DMARxAbort(), and MMC_DMATxAbort().

◆ HAL_MMC_Abort()

◆ HAL_MMC_Abort_IT()