1.32.25.11 SDHCx_DataErrorGet Function

C

/* x = SDHC instance number (x is applicable only on devices with more than one instances of SDHC) */

uint16_t SDHCx_DataErrorGet (void)

Summary

Returns the errors associated with a data transfer.

Description

Returns the errors associated with a data transfer. For a data transfer, the returned value is a bit wise OR of the following errors, ADMA Error, Data Timeout Error, Data CRC Error and Data End Bit Error. Refer the data sheet for the bit position of the errors.

Precondition

A command containing a data stage must have been initiated using the SDHCx_CommandSend() function.

Parameters

None.

Returns

Bit wise OR of the following data error flags - ADMA Error, Data Timeout Error, Data CRC Error and Data End Bit Error. Refer the data sheet for the bit position of the errors.

Example

uint16_t data_error = SDHC1_DataErrorGet();

if (data_error != 0)
{
    // Handle data error
}

Remarks

None