STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
Functions
STM32F769I Discovery SD Exported Functions

Functions

uint8_t BSP_SD_Init (void)
 Initializes the SD card device. More...
 
uint8_t BSP_SD_DeInit (void)
 DeInitializes the SD card device. More...
 
uint8_t BSP_SD_ITConfig (void)
 Configures Interrupt mode for SD detection pin. More...
 
uint8_t BSP_SD_ReadBlocks (uint32_t *pData, uint64_t ReadAddr, uint32_t BlockSize, uint32_t NumOfBlocks)
 Reads block(s) from a specified address in an SD card, in polling mode. More...
 
uint8_t BSP_SD_WriteBlocks (uint32_t *pData, uint64_t WriteAddr, uint32_t BlockSize, uint32_t NumOfBlocks)
 Writes block(s) to a specified address in an SD card, in polling mode. More...
 
uint8_t BSP_SD_ReadBlocks_DMA (uint32_t *pData, uint64_t ReadAddr, uint32_t BlockSize, uint32_t NumOfBlocks)
 Reads block(s) from a specified address in an SD card, in DMA mode. More...
 
uint8_t BSP_SD_WriteBlocks_DMA (uint32_t *pData, uint64_t WriteAddr, uint32_t BlockSize, uint32_t NumOfBlocks)
 Writes block(s) to a specified address in an SD card, in DMA mode. More...
 
uint8_t BSP_SD_Erase (uint64_t StartAddr, uint64_t EndAddr)
 Erases the specified memory area of the given SD card. More...
 
HAL_SD_TransferStateTypedef BSP_SD_GetStatus (void)
 Gets the current SD card data status. More...
 
void BSP_SD_GetCardInfo (HAL_SD_CardInfoTypedef *CardInfo)
 Get SD information about specific SD card. More...
 
uint8_t BSP_SD_IsDetected (void)
 Detects if SD card is correctly plugged in the memory slot or not. More...
 
void BSP_SD_MspInit (SD_HandleTypeDef *hsd, void *Params)
 Initializes the SD MSP. More...
 
void BSP_SD_Detect_MspInit (SD_HandleTypeDef *hsd, void *Params)
 Initializes the SD Detect pin MSP. More...
 
void BSP_SD_MspDeInit (SD_HandleTypeDef *hsd, void *Params)
 DeInitializes the SD MSP. More...
 

Detailed Description

Function Documentation

uint8_t BSP_SD_DeInit ( void  )

DeInitializes the SD card device.

Return values
SDstatus

Definition at line 195 of file stm32f769i_discovery_sd.c.

void BSP_SD_Detect_MspInit ( SD_HandleTypeDef hsd,
void *  Params 
)

Initializes the SD Detect pin MSP.

Parameters
hsdSD handle
Return values
None

Definition at line 490 of file stm32f769i_discovery_sd.c.

uint8_t BSP_SD_Erase ( uint64_t  StartAddr,
uint64_t  EndAddr 
)

Erases the specified memory area of the given SD card.

Parameters
StartAddrStart byte address
EndAddrEnd byte address
Return values
SDstatus

Definition at line 369 of file stm32f769i_discovery_sd.c.

void BSP_SD_GetCardInfo ( HAL_SD_CardInfoTypedef CardInfo)

Get SD information about specific SD card.

Parameters
CardInfoPointer to HAL_SD_CardInfoTypedef structure

Definition at line 556 of file stm32f769i_discovery_sd.c.

HAL_SD_TransferStateTypedef BSP_SD_GetStatus ( 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
  • SD_TRANSFER_ERROR: Data transfer error

Definition at line 547 of file stm32f769i_discovery_sd.c.

uint8_t BSP_SD_Init ( void  )

Initializes the SD card device.

Return values
SDstatus

Definition at line 144 of file stm32f769i_discovery_sd.c.

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 240 of file stm32f769i_discovery_sd.c.

uint8_t BSP_SD_ITConfig ( void  )

Configures Interrupt mode for SD detection pin.

Return values
Returns0

Definition at line 218 of file stm32f769i_discovery_sd.c.

void BSP_SD_MspDeInit ( SD_HandleTypeDef hsd,
void *  Params 
)

DeInitializes the SD MSP.

Parameters
hsdSD handle
Params: pointer on additional configuration parameters, can be NULL.

Definition at line 509 of file stm32f769i_discovery_sd.c.

void BSP_SD_MspInit ( SD_HandleTypeDef hsd,
void *  Params 
)

Initializes the SD MSP.

Parameters
hsdSD handle
Params: pointer on additional configuration parameters, can be NULL.

Definition at line 386 of file stm32f769i_discovery_sd.c.

uint8_t BSP_SD_ReadBlocks ( uint32_t *  pData,
uint64_t  ReadAddr,
uint32_t  BlockSize,
uint32_t  NumOfBlocks 
)

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

Parameters
pDataPointer to the buffer that will contain the data to transmit
ReadAddrAddress from where data is to be read
BlockSizeSD card data block size, that should be 512
NumOfBlocksNumber of SD blocks to read
Return values
SDstatus

Definition at line 263 of file stm32f769i_discovery_sd.c.

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

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

Parameters
pDataPointer to the buffer that will contain the data to transmit
ReadAddrAddress from where data is to be read
BlockSizeSD card data block size, that should be 512
NumOfBlocksNumber of SD blocks to read
Return values
SDstatus

Definition at line 303 of file stm32f769i_discovery_sd.c.

uint8_t BSP_SD_WriteBlocks ( uint32_t *  pData,
uint64_t  WriteAddr,
uint32_t  BlockSize,
uint32_t  NumOfBlocks 
)

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

Parameters
pDataPointer to the buffer that will contain the data to transmit
WriteAddrAddress from where data is to be written
BlockSizeSD card data block size, that should be 512
NumOfBlocksNumber of SD blocks to write
Return values
SDstatus

Definition at line 283 of file stm32f769i_discovery_sd.c.

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

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

Parameters
pDataPointer to the buffer that will contain the data to transmit
WriteAddrAddress from where data is to be written
BlockSizeSD card data block size, that should be 512
NumOfBlocksNumber of SD blocks to write
Return values
SDstatus

Definition at line 337 of file stm32f769i_discovery_sd.c.