STM32L486xx HAL User Manual
Functions
SD_Exported_Functions_Group3
SD_Exported_Functions

management functions More...

Functions

HAL_StatusTypeDef HAL_SD_GetCardCID (SD_HandleTypeDef *hsd, HAL_SD_CardCIDTypedef *pCID)
 Returns information the information of the card which are stored on the CID register.
HAL_StatusTypeDef HAL_SD_GetCardCSD (SD_HandleTypeDef *hsd, HAL_SD_CardCSDTypedef *pCSD)
 Returns information the information of the card which are stored on the CSD register.
HAL_StatusTypeDef HAL_SD_GetCardStatus (SD_HandleTypeDef *hsd, HAL_SD_CardStatusTypedef *pStatus)
 Gets the SD status info.
HAL_StatusTypeDef HAL_SD_GetCardInfo (SD_HandleTypeDef *hsd, HAL_SD_CardInfoTypeDef *pCardInfo)
 Gets the SD card info.
HAL_StatusTypeDef HAL_SD_ConfigWideBusOperation (SD_HandleTypeDef *hsd, uint32_t WideMode)
 Enables wide bus operation for the requested card if supported by card.
HAL_SD_CardStateTypedef HAL_SD_GetCardState (SD_HandleTypeDef *hsd)
 Gets the current sd card data state.
HAL_StatusTypeDef HAL_SD_Abort (SD_HandleTypeDef *hsd)
 Abort the current transfer and disable the SD.
HAL_StatusTypeDef HAL_SD_Abort_IT (SD_HandleTypeDef *hsd)
 Abort the current transfer and disable the SD (IT mode).

Detailed Description

management functions

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


Function Documentation

HAL_StatusTypeDef HAL_SD_Abort ( SD_HandleTypeDef *  hsd)

Abort the current transfer and disable the SD.

Parameters:
hsd,:pointer to a SD_HandleTypeDef structure that contains the configuration information for SD module.
Return values:
HALstatus

Definition at line 2699 of file stm32l4xx_hal_sd.c.

References HAL_DMA_Abort(), and HAL_SD_GetCardState().

HAL_StatusTypeDef HAL_SD_Abort_IT ( SD_HandleTypeDef *  hsd)

Abort the current transfer and disable the SD (IT mode).

Parameters:
hsd,:pointer to a SD_HandleTypeDef structure that contains the configuration information for SD module.
Return values:
HALstatus

Definition at line 2759 of file stm32l4xx_hal_sd.c.

References HAL_DMA_Abort_IT(), HAL_SD_AbortCallback(), HAL_SD_GetCardState(), SD_DMARxAbort(), and SD_DMATxAbort().

HAL_StatusTypeDef HAL_SD_ConfigWideBusOperation ( SD_HandleTypeDef *  hsd,
uint32_t  WideMode 
)

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

Parameters:
hsd,:Pointer to SD handle
WideMode,:Specifies the SD card wide bus mode This parameter can be one of the following values:
  • SDMMC_BUS_WIDE_8B: 8-bit data transfer
  • SDMMC_BUS_WIDE_4B: 4-bit data transfer
  • SDMMC_BUS_WIDE_1B: 1-bit data transfer
Return values:
HALstatus

Definition at line 2576 of file stm32l4xx_hal_sd.c.

References assert_param, __SAI_HandleTypeDef::Init, SD_WideBus_Disable(), and SD_WideBus_Enable().

Referenced by HAL_SD_Init().

HAL_StatusTypeDef HAL_SD_GetCardCID ( SD_HandleTypeDef *  hsd,
HAL_SD_CardCIDTypedef *  pCID 
)

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

Parameters:
hsd,:Pointer to SD handle
pCID,:Pointer to a HAL_SD_CIDTypedef structure that contains all CID register parameters
Return values:
HALstatus

Definition at line 2356 of file stm32l4xx_hal_sd.c.

HAL_StatusTypeDef HAL_SD_GetCardCSD ( SD_HandleTypeDef *  hsd,
HAL_SD_CardCSDTypedef *  pCSD 
)

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

Parameters:
hsd,:Pointer to SD handle
pCSD,:Pointer to a HAL_SD_CardInfoTypedef structure that contains all CSD register parameters
Return values:
HALstatus

< Reserved

Definition at line 2389 of file stm32l4xx_hal_sd.c.

Referenced by SD_InitCard().

HAL_StatusTypeDef HAL_SD_GetCardInfo ( SD_HandleTypeDef *  hsd,
HAL_SD_CardInfoTypeDef *  pCardInfo 
)

Gets the SD card info.

Parameters:
hsd,:Pointer to SD handle
pCardInfo,:Pointer to the HAL_SD_CardInfoTypeDef structure that will contain the SD card status information
Return values:
HALstatus

Definition at line 2551 of file stm32l4xx_hal_sd.c.

HAL_SD_CardStateTypedef HAL_SD_GetCardState ( SD_HandleTypeDef *  hsd)

Gets the current sd card data state.

Parameters:
hsd,:pointer to SD handle
Return values:
Cardstate

Definition at line 2676 of file stm32l4xx_hal_sd.c.

References SD_SendStatus().

Referenced by HAL_SD_Abort(), HAL_SD_Abort_IT(), SD_DMAError(), SD_DMARxAbort(), and SD_DMATxAbort().

HAL_StatusTypeDef HAL_SD_GetCardStatus ( SD_HandleTypeDef *  hsd,
HAL_SD_CardStatusTypedef *  pStatus 
)

Gets the SD status info.

Parameters:
hsd,:Pointer to SD handle
pStatus,:Pointer to the HAL_SD_CardStatusTypedef structure that will contain the SD card status information
Return values:
HALstatus

Definition at line 2503 of file stm32l4xx_hal_sd.c.

References SD_SendSDStatus().