STM32H743I_EVAL BSP User Manual: SD Exported Functions

STM32H743I_EVAL BSP

STM32H743I_EVAL BSP User Manual
SD Exported Functions

Functions

uint8_t BSP_SD_Init (void)
 Initializes the SD card device.
uint8_t BSP_SD_DeInit (void)
 DeInitializes the SD card device.
uint8_t BSP_SD_ITConfig (void)
 Configures Interrupt mode for SD1 detection pin.
uint8_t BSP_SD_IsDetected (void)
 Detects if SD card is correctly plugged in the memory slot or not.
uint8_t BSP_SD_ReadBlocks (uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks, uint32_t Timeout)
 Reads block(s) from a specified address in an SD card, in polling mode.
uint8_t BSP_SD_WriteBlocks (uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks, uint32_t Timeout)
 Writes block(s) to a specified address in an SD card, in polling mode.
uint8_t BSP_SD_ReadBlocks_DMA (uint32_t *pData, uint32_t ReadAddr, uint32_t NumOfBlocks)
 Reads block(s) from a specified address in an SD card, in DMA mode.
uint8_t BSP_SD_WriteBlocks_DMA (uint32_t *pData, uint32_t WriteAddr, uint32_t NumOfBlocks)
 Writes block(s) to a specified address in an SD card, in DMA mode.
uint8_t BSP_SD_Erase (uint32_t StartAddr, uint32_t EndAddr)
 Erases the specified memory area of the given SD card.
__weak void BSP_SD_MspInit (SD_HandleTypeDef *hsd, void *Params)
 Initializes the SD MSP.
__weak void BSP_SD_MspDeInit (SD_HandleTypeDef *hsd, void *Params)
 DeInitializes the SD MSP.
uint8_t BSP_SD_GetCardState (void)
 Gets the current SD card data status.
void BSP_SD_GetCardInfo (BSP_SD_CardInfo *CardInfo)
 Get SD information about specific SD card.
__weak void BSP_SD_AbortCallback (void)
 BSP SD Abort callbacks.
__weak void BSP_SD_WriteCpltCallback (void)
 BSP Tx Transfer completed callbacks.
__weak void BSP_SD_ReadCpltCallback (void)
 BSP Rx Transfer completed callbacks.
__weak void BSP_SD_ErrorCallback (void)
 BSP Error callbacks.
__weak void BSP_SD_DriveTransciver_1_8V_Callback (FlagStatus status)
 BSP SD Transceiver 1.8V Mode Callback.

Function Documentation

void BSP_SD_AbortCallback ( void  )

BSP SD Abort callbacks.

Return values:
None

Definition at line 456 of file stm32h743i_eval_sd.c.

Referenced by HAL_SD_AbortCallback().

uint8_t BSP_SD_DeInit ( void  )

DeInitializes the SD card device.

Return values:
SDstatus

Definition at line 184 of file stm32h743i_eval_sd.c.

References BSP_SD_MspDeInit(), MSD_ERROR, MSD_OK, uSdHandle, and UseExtiModeDetection.

void BSP_SD_DriveTransciver_1_8V_Callback ( FlagStatus  status)

BSP SD Transceiver 1.8V Mode Callback.

Definition at line 495 of file stm32h743i_eval_sd.c.

References BSP_IO_PIN_RESET, BSP_IO_PIN_SET, BSP_IO_WritePin(), and IO_PIN_13.

Referenced by HAL_SD_DriveTransciver_1_8V_Callback().

uint8_t BSP_SD_Erase ( uint32_t  StartAddr,
uint32_t  EndAddr 
)

Erases the specified memory area of the given SD card.

Parameters:
StartAddr,:Start byte address
EndAddr,:End byte address
Return values:
SDstatus

Definition at line 337 of file stm32h743i_eval_sd.c.

References MSD_ERROR, MSD_OK, and uSdHandle.

void BSP_SD_ErrorCallback ( void  )

BSP Error callbacks.

Return values:
None

Definition at line 484 of file stm32h743i_eval_sd.c.

Referenced by HAL_SD_ErrorCallback().

void BSP_SD_GetCardInfo ( BSP_SD_CardInfo CardInfo)

Get SD information about specific SD card.

Parameters:
CardInfo,:Pointer to HAL_SD_CardInfoTypedef structure
Return values:
None

Definition at line 446 of file stm32h743i_eval_sd.c.

References uSdHandle.

uint8_t BSP_SD_GetCardState ( void  )

Gets the current SD card data status.

Return values:
Datatransfer state. This value can be one of the following values:
  • SD_TRANSFER_OK: No data transfer is acting
  • SD_TRANSFER_BUSY: Data transfer is acting

Definition at line 435 of file stm32h743i_eval_sd.c.

References SD_TRANSFER_BUSY, SD_TRANSFER_OK, and uSdHandle.

uint8_t BSP_SD_Init ( void  )

Initializes the SD card device.

Return values:
SDstatus

Definition at line 141 of file stm32h743i_eval_sd.c.

References BSP_IO_ConfigPin(), BSP_IO_Init(), BSP_SD_IsDetected(), BSP_SD_MspInit(), MSD_ERROR, MSD_ERROR_SD_NOT_PRESENT, MSD_OK, SD_PRESENT, and uSdHandle.

uint8_t BSP_SD_IsDetected ( void  )

Detects if SD card is correctly plugged in the memory slot or not.

Return values:
Returnsif SD is detected or not

Definition at line 224 of file stm32h743i_eval_sd.c.

References BSP_IO_ConfigPin(), BSP_IO_ReadPin(), SD_NOT_PRESENT, SD_PRESENT, and UseExtiModeDetection.

Referenced by BSP_SD_Init(), and BSP_SD_ITConfig().

uint8_t BSP_SD_ITConfig ( void  )

Configures Interrupt mode for SD1 detection pin.

Return values:
Returns0

Definition at line 210 of file stm32h743i_eval_sd.c.

References BSP_SD_IsDetected(), and UseExtiModeDetection.

void BSP_SD_MspDeInit ( SD_HandleTypeDef *  hsd,
void *  Params 
)

DeInitializes the SD MSP.

Parameters:
hsd,:SD handle
Params,:Pointer to void
Return values:
None

Definition at line 413 of file stm32h743i_eval_sd.c.

Referenced by BSP_SD_DeInit().

void BSP_SD_MspInit ( SD_HandleTypeDef *  hsd,
void *  Params 
)

Initializes the SD MSP.

Parameters:
hsd,:SD handle
Params,:Pointer to void
Return values:
None

Definition at line 356 of file stm32h743i_eval_sd.c.

Referenced by BSP_SD_Init().

uint8_t BSP_SD_ReadBlocks ( uint32_t *  pData,
uint32_t  ReadAddr,
uint32_t  NumOfBlocks,
uint32_t  Timeout 
)

Reads block(s) from a specified address in an SD card, in polling mode.

Parameters:
pData,:Pointer to the buffer that will contain the data to transmit
ReadAddr,:Address from where data is to be read
NumOfBlocks,:Number of SD blocks to read
Timeout,:Timeout for read operation
Return values:
SDstatus

Definition at line 255 of file stm32h743i_eval_sd.c.

References MSD_ERROR, MSD_OK, and uSdHandle.

uint8_t BSP_SD_ReadBlocks_DMA ( uint32_t *  pData,
uint32_t  ReadAddr,
uint32_t  NumOfBlocks 
)

Reads block(s) from a specified address in an SD card, in DMA mode.

Parameters:
pData,:Pointer to the buffer that will contain the data to transmit
ReadAddr,:Address from where data is to be read
NumOfBlocks,:Number of SD blocks to read
Return values:
SDstatus

Definition at line 297 of file stm32h743i_eval_sd.c.

References MSD_ERROR, MSD_OK, and uSdHandle.

void BSP_SD_ReadCpltCallback ( void  )

BSP Rx Transfer completed callbacks.

Return values:
None

Definition at line 474 of file stm32h743i_eval_sd.c.

Referenced by HAL_SD_RxCpltCallback().

uint8_t BSP_SD_WriteBlocks ( uint32_t *  pData,
uint32_t  WriteAddr,
uint32_t  NumOfBlocks,
uint32_t  Timeout 
)

Writes block(s) to a specified address in an SD card, in polling mode.

Parameters:
pData,:Pointer to the buffer that will contain the data to transmit
WriteAddr,:Address from where data is to be written
NumOfBlocks,:Number of SD blocks to write
Timeout,:Timeout for write operation
Return values:
SDstatus

Definition at line 277 of file stm32h743i_eval_sd.c.

References MSD_ERROR, MSD_OK, and uSdHandle.

uint8_t BSP_SD_WriteBlocks_DMA ( uint32_t *  pData,
uint32_t  WriteAddr,
uint32_t  NumOfBlocks 
)

Writes block(s) to a specified address in an SD card, in DMA mode.

Parameters:
pData,:Pointer to the buffer that will contain the data to transmit
WriteAddr,:Address from where data is to be written
NumOfBlocks,:Number of SD blocks to write
Return values:
SDstatus

Definition at line 317 of file stm32h743i_eval_sd.c.

References MSD_ERROR, MSD_OK, and uSdHandle.

void BSP_SD_WriteCpltCallback ( void  )

BSP Tx Transfer completed callbacks.

Return values:
None

Definition at line 465 of file stm32h743i_eval_sd.c.

Referenced by HAL_SD_TxCpltCallback().

Generated on Wed Aug 23 2017 17:45:14 for STM32H743I_EVAL BSP User Manual by   doxygen 1.7.6.1