www.ti.com
Peripheral Library APIs
373
SWRU543–January 2019
Submit Documentation Feedback
Copyright © 2019, Texas Instruments Incorporated
SD Host Controller Interface
• Parameters:
– ulBase – Base address of the SD host module
– ulSDHostClk – The rate of clock supplied to SD host module
– ulCardClk – Required SD interface clock
• Return: None
void SDHostRespGet(unsigned long ulBase, unsigned long ulRespnse[4])
• Description: This function gets the response from the SD card for the last command send.
• Parameters:
– ulBase – Base address of the SD host module
– ulRespnse – 128-bit response
• Return: None
void SDHostBlockSizeSet(unsigned long ulBase, unsigned short ulBlkSize)
• Description: This function sets the block size of the data transfer.
• Parameters:
– ulBase – Base address of the SD host module
– ulBlkSize – Transfer block size in bytes
The parameter ulBlkSize is the size of each data block in bytes. This size should be in a range from 0
to 2
10
.
• Return: None
void SDHostBlockCountSet(unsigned long ulBase, unsigned short ulBlkCount)
• Description: This function sets block count for the data transfer. This block count must be set for each
block transfer.
• Parameters:
– ulBase – Base address of the SD host module
– ulBlkCount – Number of blocks
• Return: None
tBoolean SDHostDataNonBlockingWrite(unsigned long ulBase, unsigned long ulData)
• Description: This function writes one data word into the SD host write buffer. The function returns true
if a space was available in the buffer; else returns false.
• Parameters:
– ulBase – Base address of the SD host module
– ulData – Data word to be transferred
• Return: Return true on success, false otherwise
tBoolean SDHostDataNonBlockingRead(unsigned long ulBase, unsigned long *pulData)
• Description: This function reads a data word from the SD host read buffer. The function returns true if
data was available in the buffer; else returns false.
• Parameters:
– ulBase – Base address of the SD host module
– pulData – Pointer to data word to be transferred
• Return: Return true on success, false otherwise