1.2.20.11 SDMMCx_DataErrorGet Function

C

/* x = SDMMC instance number */

uint16_t SDMMCx_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 SDMMCx_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 = SDMMC1_DataErrorGet();

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

Remarks

None.