A write command handler must check the Short Status to ensure that the system is no longer busy from prior transactions and to check whether any errors have occurred. Errors could be related to the current command transaction or other background system processes.Figure 3-5 describes the flow of a command handler for any write command using either short or bulk write protocols.
More detail on the Short Status can be found in Section 8.2.110 (Main Application) and Section 7.2.6 (Boot Application). This command handler flow is valid for both applications.
- Write Any Command - Write the desired command using the Short Write Protocol or Bulk Write Protocol as required for the specific command. 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.
-
CmdTag == (A)? - Check whether the Short Status contains the tag that was sent with the write command. This indicates that the command was executed by the software, regardless of whether it was successful or not. If this does not match the desired tag (A), continue polling the Short Status until the tag matches.
- System Busy | Request In Progress? - Check whether the System Busy or Request In Progress Short Status bits are set. If these are set, the system is still working on the write command and new commands should not be sent. If one of these bits is set, continue polling the Short Status until both are cleared.
-
COMM | CMD Error? - Check for Communication Error or Command Error Short Status bits. If either are set, the write 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 command or restarting the system.
- BIST | Oper Error? - Check for BIST Error or Operational Error Short Status bits. If either bit is set, a background process has encountered an error. If either error bit is 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 write 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 was still completed.