Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Pointer to variable that will receive the return error code from this function:

FS_DEV_SD_CARD_ERR_NONE

No error.

FS_DEV_SD_CARD_ERR_NO_CARD

No card present.

FS_DEV_SD_CARD_ERR_UNKNOWN

Unknown or other error.

FS_DEV_SD_CARD_ERR_WAIT_TIMEOUT

Timeout in waiting for command response.

FS_DEV_SD_CARD_ERR_RESP_TIMEOUT

Timeout in receiving command response.

FS_DEV_SD_CARD_ERR_RESP_CHKSUM

Error in response checksum.

FS_DEV_SD_CARD_ERR_RESP_CMD_IX

Response command index error.

FS_DEV_SD_CARD_ERR_RESP_END_BIT

Response end bit error.

FS_DEV_SD_CARD_ERR_RESP

Other response error.

FS_DEV_SD_CARD_ERR_DATA

Other data error.

Returned Value

None.

Notes/Warnings

...

  1. This function will be called even if no response is expected from the command.

...

  1. This function will not be called if FSDev_SD_Card_BSP_CmdStart() returned an error.

...

  1. The data stored in the response buffer should include only the response data, i.e., should not include the start bit, transmission bit, command index, CRC and end bit.
    • For a command with a normal (48-bit) response, a 4-byte response should be stored in p_resp.
    • For a command with a long (136-bit) response, a 16-byte response should be returned in p_resp:

      The first 4-byte word should hold bits 127..96 of the response.

      The second 4-byte word should hold bits 95..64 of the response.

      The third 4-byte word should hold bits 63..32 of the response.

      The four 4-byte word should hold bits 31.. 0 of the response.

Example

The implementation of FSDev_SD_Card_BSP_CmdWaitEnd() in is targeted for the same host controller as the other listings in this chapter; for more information, see FSDev_SD_Card_BSP_CmdStart().

...