Commands with No Data Transfer | Kickoff

Commands with No Data Transfer

24 Mar

Commands with No Data Transfer
On an SPI bus, a command with no data transfer has these steps:
1. The host brings CS low.
2. The host sends the 48-bit command and continues to generate clock cycles.
3. After receiving the command followed by 8 to 64 clock cycles, the card sends the command’s response.
4. The host can bring CS high any time after receiving the response.
5. The host generates 8 clock cycles to complete the command.

Commands that Read Data from the Storage Media On an SPI bus, a command that requests a single data block from the storage media has these steps:
1. The host brings CS low.
2. The host sends the 48-bit command and continues to generate clock cycles.
3. After receiving the command followed by 8 to 64 clock cycles, the card sends the command’s response.
4. The host continues to generate clock cycles.
5. After between 8 clock cycles and the card-specific access time, the card sends the requested data block. On error, the card sends a data_error token instead of a data token.

6. The host can bring CS high at any time after receiving the data block or a data_error token.
7. The host generates 8 clock cycles to complete the command. In a command that reads multiple blocks, step 5 repeats as many times as needed to transfer the data blocks. Steps 6 and 7 occur when any of the following is true: the card has sent the requested number of data blocks, the card has sent a data_error token, or the host has sent a STOP_TRANSMISSION command (CMD12).

Commands that Write Data to the Storage Media On an SPI bus, a command that writes a single data block to the storage media has these steps:
1. The host brings CS low.
2. The host sends the 48-bit command followed by clock cycles.
3. After between 8 and 64 clock cycles, the card sends the command’s response.
4. After 8 or more clock cycles, the host sends a data block in a data token and continues to generate clock cycles.
5. The card sends a data_response token immediately after receiving the data token. If the card received the data token without error, the card follows the data_response token with continuous busy tokens (by holding DataOut low) until the controller has finished programming the data block into the storage media. The card then brings DataOut high.

6. The host can bring CS high any time after writing the data tokens or receiving a data_error token. If the host brings CS high before DataOut goes high, the host must bring CS low again and read DataOut to verify that the write operation completed

7. The host generates 8 clock cycles to complete the command.

In a command that writes multiple blocks, steps 4 and 5 repeat as many times as needed to transfer the data blocks. After DataOut goes high to indicate that the card has programmed the previous block, the host generates at least 8 clock cycles before sending the next data block. The transfer ends when any of the following is true: the card has received and programmed the specified number of data blocks, the card has sent an error indication in a data_response token, or the host has sent a Stop Tran data token instead of a data block.

The host can check the result of a write operation by sending CMD13 (SEND_STATUS). The card returns a response that contains the status information.

Random Posts

No comments yet

Leave a Reply

You must be logged in to post a comment.