A read command handler must check the Short Status to determine whether read data is available and to check whether any errors have occurred. Errors could be related to the current command transaction or other background software processes. Figure 3-12 describes the flow of a command handler for read commands.
More detail on the Short Status can be found in Section 8.2.87 (Main Application) and Section 7.2.6 (Boot Application). This command handler flow is valid for both applications.
- Read Pre-Fetch - Send a read command op-code and its associated command parameters using the Read Pre-Fetch Protocol. Record the tag that was selected for this command (A).
- Read Short Status - Read the Short Status using the Short Status Read Protocol.
- Emergency Shutdown? - This Short Status bit indicates whether an emergency shutdown condition occurred. If this occurs, command handling should cease in order to handle the emergency shutdown. The HOST_IRQ signal will also trigger if this occurs. Refer to Section 6.2 for more information on emergency shutdown.
- COMM | CMD Error? - Check for Communication Error or Command Error Short Status bits. If either are set, the Read Pre-Fetch command has failed. In this situation, the Error History should be read to determine the specific error details. Once the Error History is read, the Error History and Short Status should be cleared of previous errors prior to the next transaction. The host can then determine what action to take such as re-sending the Read Pre-Fetch command or restarting the system.
- CmdTag == (A)? - Check whether the Short Status contains the tag that was sent with the Read Pre-Fetch command. This indicates that the Read Pre-Fetch was executed by software. If this does not match the desired tag (A), continue polling the Short Status until the tag matches.
- Read Data Available? - Check whether the Read Data Available bit is set in Short Status. If it is set, the requested read data is available. If it is not set, continue polling the Short Status.
- Read Activate - Once the read data is available, a Read Activate command may be used to read the requested data using the Read Activate Protocol.
- Read Short Status - Read the Short Status using the Short Status Read Protocol to check for any errors after the Read Activate.
- COMM | CMD Error? - Check for Communication Error or Command Error Short Status bits. If either are set, the read activate command has failed. In this situation, the Error History should be read to determine the specific error details.
- BIST | Oper Error? - Check for BIST Error or Operational Error Short Status bits. If either bit is set, a background process encountered an error. If these error bits are set without the CMD error bit being set, the error is not related to the current command transaction. An example of this is a temperature sensor failure during regular main application polling. In this situation, the Error History should still be read to determine the cause of the error, but it does not mean that the current read command transaction has failed.
Note that only Command Error and Communication Error Short Status bits should be considered a command failure. If BIST Error or Operational Error bits are set without Command or Communication error bits, another process received an error but the command still completed.