1.9.18.13 SDMMCx_CommandErrorGet Function

C

/* x = SDMMC instance number */

uint16_t SDMMCx_CommandErrorGet (void)

Summary

Returns the errors associated with a command transfer.

Description

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

Precondition

A command must have been initiated using the SDMMCx_CommandSend() function.

Parameters

None.

Returns

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

Example

uint16_t cmd_error = SDMMC1_CommandErrorGet();

if (cmd_error != 0)
{
    // Handle command error
}

Remarks

None.