3.4 Client Command Processing and Response Generation

The Microchip Device Firmware Update Protocol specifies that all communications are initiated by the host sending a command to the client. The client only takes action and generates a response after receiving a command from the host. Responses are generated for a specific command as part of the command-response pair and the host can identify the command associated with a response using the Response Sequence Field.

Responses serve multiple purposes:

  • Responses provide an opportunity for the client to inform the host that a command was executed successfully and return data associated with that command
  • Responses provide the client with an opportunity to inform the host about errors detected by the client and include important details such as:
    • The type of error detected: Response Status
    • If recovery from the error is requested: Resend Request
    • If the error is unrecoverable and the client wants to stop the update: ABORT_FILE_TRANSFER Response
    • Useful debugging information in the form of response data payloads for responses with an error status
  • Responses from the client are a key part of the protocol Flow Control mechanism

3.4.1 Client Command Processing and Response Generation Algorithm

The following figure shows the process a client goes through to receive an incoming command, check the command for errors, process/execute the command, generate a response, and send the response to the host.

Important: After executing a command, a client must retain the response to that command until the client can conclude that the host will not request that specific response be resent. See the Recoverable Errors section of the specification for more information on the error recovery algorithms. See the Client Sequence Number Processing section of the specification for more information on when a client can discard a response to an executed command.
Figure 3-7. MDFU Protocol Client
Figure Notes
Note 1:See Client Sequence Number Processing section of the specification for more information.
Note 2:The only responses resent by the client are responses to executed commands3. Ephemeral Resend Request Responses4 are never resent by the client.
Note 3:Responses to executed commands must be retained by the client until the client can conclude that the host will not request for the response to be resent.
Note 4:Ephemeral Resend Request Responses are never resent by the client, and the client can discard them as soon as they have been sent to the host.
Note 5:See Unrecoverable Errors section of the specification for more information on these errors.