3.7.4.11 USB_HOST_MSD_ERROR_CODE Enumeration

C

typedef enum {
  USB_HOST_MSD_ERROR_CODE_INSUFFICIENT_INSTANCES = 1,
  USB_HOST_MSD_ERROR_CODE_NOT_FOUND_BULK_IN_ENDPOINT,
  USB_HOST_MSD_ERROR_CODE_NOT_FOUND_BULK_OUT_ENDPOINT,
  USB_HOST_MSD_ERROR_CODE_FAILED_PIPE_OPEN,
  USB_HOST_MSD_ERROR_CODE_FAILED_GET_MAX_LUN,
  USB_HOST_MSD_ERROR_CODE_FAILED_BOT_TRANSFER,
  USB_HOST_MSD_ERROR_CODE_FAILED_RESET_RECOVERY,
  USB_HOST_MSD_ERROR_CODE_CBW_STALL_RESET_RECOVERY,
  USB_HOST_MSD_ERROR_CODE_TRANSFER_BUSY,
  USB_HOST_MSD_ERROR_CODE_CSW_PHASE_ERROR,
  USB_HOST_MSD_ERROR_CODE_CSW_UNKNOWN_ERROR
} USB_HOST_MSD_ERROR_CODE;

Summary

USB Host MSD Error Codes.

This enumeration defines the codes that the MSD Client Driver returns for possible errors that lead to the device being placed in an error state. The MSD client driver will not operate on a device which is in an error state. The error are returned in the USB_HOST_MSD_ErrorCallback function.

Description

Description of the function

Members

Members Description
USB_HOST_MSD_ERROR_CODE_INSUFFICIENT_INSTANCES = 1 This error occurs when the number of MSD instances defined via USB_HOST_MSD_INSTANCES_NUMBER (in system_config.h) is insufficient. For example, this error would occur if the value of USB_HOST_MSD_INSTANCES_NUMBER is 2, two MSC devices are already connected and third MSC device is connected to the host. The object identifier in this case will be the USB_HOST_DEVICE_OBJ_HANDLE value.
USB_HOST_MSD_ERROR_CODE_NOT_FOUND_BULK_IN_ENDPOINT This error occurs when the driver descriptor parser could not find a Bulk IN endpoint in the interface descriptor. The object identifier in this case will be the USB_HOST_DEVICE_OBJ_HANDLE value.
USB_HOST_MSD_ERROR_CODE_NOT_FOUND_BULK_OUT_ENDPOINT This error occurs when the driver descriptor parser could not find a Bulk OUT endpoint in the interface descriptor. The object identifier in this case will be USB_HOST_DEVICE_OBJ_HANDLE value.
USB_HOST_MSD_ERROR_CODE_FAILED_PIPE_OPEN This error occurs when the driver could not open a Bulk pipe. This typically happens either due to a host layer error or due to insufficient number of pipes (which is configured via USB_HOST_PIPES_NUMBER). The object identifier in this case will be USB_HOST_DEVICE_OBJ_HANDLE value.
USB_HOST_MSD_ERROR_CODE_FAILED_GET_MAX_LUN This error occurs when the Get Max LUN request issued by the driver fails for any reason. The object identifier in this case will be the MSC device instance index.
USB_HOST_MSD_ERROR_CODE_FAILED_BOT_TRANSFER This error occurs when any stage of the BOT has failed due to bus error or an unknown failure. The object identifier in this case will be the MSC device instance index.
USB_HOST_MSD_ERROR_CODE_FAILED_RESET_RECOVERY This error occurs when the MSD Reset Recovery procedure has failed. A MSC device should not fail a MSD Reset Recovery procedure. The object identifier in this case will be the device instance index.
USB_HOST_MSD_ERROR_CODE_CBW_STALL_RESET_RECOVERY This error code indicates a condtion where the CBW stage of the BOT was stalled and the driver is about to launch MSD reset recovery. The identifier in this case if the MSC Device instance index. This code is generated from an interrupt context. The driver may continue to function normally post this condition.
USB_HOST_MSD_ERROR_CODE_TRANSFER_BUSY This error code indicates a condition where the BOT transfer could not be initiated because a transfer is already in progress. The identifier in this case is the MSC Device Instance Index. The driver may continue to function normal post this condition. This condition may occur several times.
USB_HOST_MSD_ERROR_CODE_CSW_PHASE_ERROR This error code indicates a condition where the BOT transfer failed due a phase error in the CSW stage of the BOT. The identifier in this case if the MSC Device instance index. This code is generated from an interrupt context. The driver may continue to function normally post this condition.
USB_HOST_MSD_ERROR_CODE_CSW_UNKNOWN_ERROR This error code indicates that a condition where an unknown error has occurred during the CSW stage of the BOT. The identifier in this case if the MSC Device instance index. This code is generated from an interrupt context. The driver may continue to function normally post this condition.

Remarks

None.