Error Codes and Solutions
This page lists the various error codes present in µC/USB-Device, their potential causes and some tips to solve the issues they are indicating.
Categories | Value | Error Code | Potential Cause(s) | Solution(s) |
|---|---|---|---|---|
Generic Errors | 0 |
| No error, nothing to do. | None. |
1 |
| Generic error occurred. | Varies depending where the error occurred. | |
2 |
| Generic error occurred during a 'Rx' transfer. | Varies depending where the error occurred. | |
3 |
| Generic error occurred during a 'Tx' transfer. | Varies depending where the error occurred. | |
4 |
| Generic allocation error. | The memory segment (or the heap, from uC/LIB) from which the memory is allocated does not have enough space remaining. Try increasing the size of the memory segment or the heap, if possible. If not, try adjusting the configuration values in | |
5 |
| Null pointer passed as an argument. | See where error occurred and what was the parameter checked. | |
6 |
| An invalid argument has been passed to the function. | See where error occurred and what was the parameter checked. | |
7 |
| The class is in an invalid state. | See where error occurred and what is the current state of the class. | |
Device Errors | 100 |
| Tried to allocate more devices than the configured value allows. |
|
101 |
| Unable to obtain device or driver reference based on specified | Make sure | |
102 |
| Device is in an incorrect state (None, Init, Attached, Default, Addressed, Configured or Suspended) to execute the requested operation. | Verify what state the device is currently in and see why it cannot execute the requested operation or why it is in this state. | |
103 |
| High-speed operation attempted on a driver/controller that does not support high-speed operations. | If the controller used support high-speed operations, make sure the speed declared in the driver configuration (USBD_DrvCfg_xxxx) is correct. If the controller used does not support high-speed operations, high-speed operations cannot be executed. | |
104 |
| The feature requested is unavailable in the module used. | See where/why the error occurred. | |
Configuration Errors | 200 |
| Tried to allocate more USB configuration than the configured value allows. |
|
201 |
| Unable to obtain configuration reference based on | Make sure | |
202 |
|
| Adjust | |
203 |
| Call to driver's | See each driver's | |
Interface Errors | 300 |
| Tried to allocate more USB interfaces than the configured value allows. |
|
301 |
| Unable to obtain interface reference based on | Make sure | |
302 |
| Tried to allocate more USB alternate interfaces than the configured value allows. |
| |
303 |
| Unable to obtain interface reference based on | Make sure | |
304 |
| Tried to allocate more interface groups than the configured value allows. |
| |
305 |
| Interface is already associated with an interface group. | Cannot associate an interface to more than one group. | |
Endpoint Errors | 400 |
| Tried to allocate more endpoints than the configured value allows. |
|
401 |
| Unable to obtain endpoint reference based on | Make sure | |
402 |
| Endpoint is in an invalid state (Close, Open, Stall) to execute requested operation. | Verify what state the endpoint is currently in and see why it cannot execute the requested operation or why it is in this state. | |
403 |
| Endpoint type (Control, Bulk, Interrupt, Isochronous) is invalid. | Make sure the endpoint type matches the type of endpoint of the function called. | |
404 |
| Requested endpoint is unavailable. | Try to adjust the | |
405 |
| Transfer has been aborted, or error when aborting. |
| |
406 |
| Unable to execute correctly the stall operation requested. | See driver's | |
407 |
| A transfer is already in progress on the specified endpoint and the core cannot queue the next transfer after it. | Avoid executing synchronous transfers on busy endpoints or trying to queue asynchronous transfers after synchronous ones. | |
408 |
| Unable to queue URB. | Too much asynchronous transfers are queued at the same time, wait for a transfer to finish before submitting another one. | |
OS Layer Errors | 500 |
| OS layer initialization failed. | See OS User's Manual and OS layer where error occurred for more details. |
501 |
| OS signal creation failed. | See OS User's Manual and OS layer where error occurred for more details. | |
502 |
| OS layer operation failed. | See OS User's Manual and OS layer where error occurred for more details. | |
503 |
| OS pend/lock operation timed-out. | See OS User's Manual and OS layer where error occurred for more details. | |
504 |
| OS pend/lock operation was aborted. | See OS User's Manual and OS layer where error occurred for more details. | |
505 |
| OS layer deletion failed. | See OS User's Manual and OS layer where error occurred for more details. | |
Device Driver Errors | 700 |
| Driver indicated that buffer overflowed. | See device driver for more details. |
701 |
| Driver indicated an invalid packet has been received. | See device driver for more details. | |
Generic Class Errors | 1000 |
|
| Check the value of |
1001 |
| A transfer is already in progress on the endpoint used by the class. | Wait for the transfer to completed before executing another one. | |
Audio Class Errors | 1100 |
| Tried to allocate more audio class instances than configured values allow. | Depending on where the error occurred, either |
1101 |
| Tried to allocate more audio streaming interfaces than configured values allow. | Depending on where the error occurred, either | |
1102 |
| Tried to allocate more input terminals than configured value allows. |
| |
1103 |
| Tried to allocate more output terminals than configured value allows. |
| |
1104 |
| Tried to allocate more feature units than configured value allows. |
| |
1105 |
| Tried to allocate more mixing units than configured value allows. |
| |
1106 |
| Tried to allocate more selector units than configured value allows. |
| |
1107 |
| Unable to process class request, the | The audio class will stall the control endpoint to indicate to the host that the device does not support this type of request. | |
1108 |
| Unable to process class request, the | The audio class will stall the control endpoint to indicate to the host that the device does not support this type of request. | |
1109 |
| Unable to process class request, the | The audio class will stall the control endpoint to indicate to the host that the device does not support this type of request. | |
1110 |
| Unable to process class request for any other reason. | The audio class will stall the control endpoint to indicate to the host that the device does not support this type of request. | |
1111 |
| The requested sampling frequency is not supported. | See specific audio codec's code for setting sampling frequency. | |
1112 |
| Audio codec initialization failed. | See specific audio codec's code for initialization. | |
CDC Errors | 1200 |
| Tried to allocate more CDC instances than configured values allow. | Depending on where the error occurred, either |
1201 |
| Tried to allocate more CDC data interfaces than configured values allow. |
| |
1250 |
| Tried to allocate more instances of a given CDC subclass than configured values allow. |
| |
HID Class Errors | 1300 |
| Tried to allocate more HID class instances than configured values allow. | Depending on where the error occurred, either |
1301 |
| The format of the report descriptor given as parameter to USBD_HID_Add() is invalid. | See where exactly the error occurred in | |
1302 |
| Failed to allocate internal data structure for report descriptor. | There can be a few reasons why this failed. You can try increasing | |
1303 |
| Failed to allocate internal data structure for push-pop item. |
| |
MSC Errors | 1400 |
| Tried to allocate more MSC instances than configured values allow. | Depending on where the error occurred, either |
1401 |
| Command Block Wrapper (CBW) received by the internal MSC task is invalid. | The CBW content contains an error or its length is incorrect. The MSC class will report to the host through the CSW that the SCSI command has failed and the host will take the proper action to continue. | |
1402 |
| Mismatch between direction indicated by CBW and the SCSI command. | The MSC class will report to the host through the CSW that the SCSI command has failed and the host will take the proper recovery action. | |
1403 |
| No more logical unit can be added to the MSC class. |
| |
1404 |
| Vendor ID string associated to a logical unit is too long. | Shorten your vendor string to be less than or equal to 8 characters. | |
1405 |
| Product ID string associated to a logical unit is too long. | Shorten your vendor string to be less than or equal to 16 characters. | |
1406 |
| SCSI command not recognized. | The host has sent a SCSI command not supported by MSC (Refer to section SCSI Commands for supported SCSI commands). The MSC class will report to the host through the CSW that the SCSI command has failed. The host will take the proper action. | |
1407 |
| Read or write SCSI command requires more data to be read or written. | The MSC class will read more data from the storage medium to send it to the host or will wait for data from host to write it to the storage medium. | |
1408 |
| Logical unit not ready to perform any operations. | For any reason, the storage layer has returned that the logical unit is not ready to be accessed. The MSC class will report to the host through the CSW that the SCSI command has failed. The host may send periodically the TEST_UNIT_READY SCSI command until the logical unit is ready to be accessed. | |
1409 |
| Logical unit number not supported. | The storage layer reports that the logical unit number does not exist. The MSC class will report to the host through the CSW that the SCSI command has failed. The host should stop trying to access the logical unit number. | |
1410 |
| Logical unit number is busy with other operations. | For any reason, the storage layer has returned that the logical unit is occupied with an operation in progress. The MSC class will report to the host through the CSW that the SCSI command has failed. The host may send periodically the TEST_UNIT_READY SCSI command until the logical unit has finished its ongoing operation. | |
1411 |
| Logical block address out of range when host asks the device to test one or more sectors. | The MSC class will report to the host through the CSW that the SCSI command has failed. The host should not try to access again this sector. | |
1412 |
| Removable storage medium is not present. | When an MSC device has a fixed storage medium, this one is always present. For MSC devices with a removable storage medium, upon connection to the PC, the medium may not be present. In that case, the MSC class will report to the host through the CSW that the SCSI command has failed. The host may send periodically the TEST_UNIT_READY SCSI command until the storage medium is inserted. | |
1413 |
| The storage medium is transitioning to the ready state. | The storage medium cannot accept yet to be accessed by the host because it changes its internal state. In that case, the storage layer returns this error code. The MSC class will report to the host through the CSW that the SCSI command has failed. The host may send periodically the TEST_UNIT_READY SCSI command until the storage medium has completed its transition to the ready state. | |
1414 |
| The storage medium is transitioning to the not ready state. | The storage medium won't accept anymore to be accessed by the host because it changes its internal state. In that case, the storage layer returns this error code. T he MSC class will report to the host through the CSW that the SCSI command has failed. The host may send periodically the TEST_UNIT_READY SCSI command until the storage medium is afresh in the ready state. | |
1415 |
| Locking a storage medium has failed. | When the host accesses a storage medium, it becomes the only owner of this storage. No embedded file system application can access this storage. The ownership is guaranteed with a lock system. If the lock cannot be acquired, it means that an embedded file system application has the storage ownership. The MSC will report to the host through the CSW that the SCSI command has failed. The host should attempt again the SCSI command until the lock can be acquired. | |
1416 |
| Locking a storage medium has timeout. | If the lock is acquired, an embedded file system application has the storage ownership. The MSC class attempts acquiring the lock during a certain period of time. When this time period has elapsed, the lock attempt timeouts. The MSC will report to the host through the CSW that the SCSI command has failed. The host should attempt again the SCSI command until the lock can be acquired. | |
1417 |
| Unlocking the medium storage has failed. | The MSC class was not able to release the storage ownership. The MSC will report to the host through the CSW that the SCSI command has failed. The host should attempt again the SCSI command until the lock release succeeds. | |
PHDC Errors | 1500 |
| Tried to allocate more PHDC instances than configured values allow. | Depending on where the error occurred, either |
Vendor Errors | 1600 |
| Tried to allocate more Vendor class instances than configured values allow. | Depending on where the error occurred, either |