This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430F5638: Windows error "USB device not recognized"

Part Number: MSP430F5638


While trying to use the TI sample USB software the error "USB Device not recognized" was seen. On the same hardware the example code for the "emptyUsbProject" was compiled and run. That connected properly and showed up as a COM port. Then the example "MSC_massStorage" was tried with the calls to read_disk and write_disk changed to call the target functions. The code never reached any of the disk functions. It stayed in a loop with the call to USB_getConnectionState() always returning ST_ENUM_IN_PROGRESS. 

The configuration file is as supplied in the example although it is not clear how the code sees this file as it is an XML file and there does not seem to be any place in the project which references this file.(M2_SDCardReader.xml). An attempt was made to replace the file with one made with one made with the "MSP Descriptor tool" but that did not change anything.

Any suggestions would be appreciated.

  • I had this before in a project. In my case, it was related to the MCU going into an infinite loop at a UNMI interrupt.
    Just as a suggestion, try to bypass the function to break out of the infinite loop.
  • Hi Mark,

    I don't have a clear understanding of what you are trying to do.  Can you tell me where you got the M2_SDCardReader example from? Was it downloaded from CCS or was it from the MSP430USBDevelopersPackage?  If it was from the developers package can you list the version number?   Also what Windows OS are you running the example on?

    Just so that I understand...you changed the code in the M2_SDCardReader example application and that is why you are getting the above error?   Or did you update the emptyUSBProject with the M2_SDCardReader .c and .h files but left the descriptors.h/.c files for the CDC class - COM port? 

    Can you delete out the M2_SDCardReader example project you have or you can re-name it and then download the original example again and try running it?

    The M2_SDCardReader.xml file is the file that is used by the Descriptor Tool if you ever want to change out any of the configuration values in the descriptors.c/.h files.  It is not used by the application to run the example. 

    Mass storage examples don't have .inf driver files and so when you see the above error it is because the device did not enumerate correctly.

    Regards,

    Arthi

  • After doing a bunch of file swaps, I believe the error is from the "descriptor" file. I think it has the wrong path. As the descriptor file is xml and does not seem to be anywhere in the project file list. How does it get integrated into the final loadable file and what points to it so the code can find it? So how do I name it and what links have to be changed to point to it?

    The help link within the Descriptor_Tool seems to be broken, it shows a blank screen so there is not much help there.

  • The idea is that an attempt is being made to use the example code for a "card reader" and first extract the project so that it can be integrated into another large project. Thus only the parts of the example tree that are relevant are to be copied out. Then all disk io calls are replaced with calls to the actual memory device.

    The code is from the file MSP430USBDevelopersPackage_5_20_06_02 and all this is being done on windows 10.

    There has been some progress. Now Windows recognizes the connection but it appears under "universal serial bus controllers" as "unknown USB device (device descriptor request failed".

    It seems that there is a device configuration problem. The code works if absolutely nothing is changed from the example. Moving the entire project to another location out of the original tree seems to break it.

    Additionally, attempts to use the "descriptor tool" seems to only generate an XML file. No matching .c and .h files. As I now understand from the documentation, it should generate a file set.

    I suspect that in the process of copying out the specific project some path is now a problem. The plan is now to try and do the entire "copy" again. This is non-trivial as the IAR project configuration files do not port nicely.
  • What parts of the M2_SDCardReader is copied from the TI example to your project?  Are you coping out entire directories or only certain files? 

    You say that the M2_SDCardReader example works with no issue.  Then is it possbile to move your code (the disk IO calls) to M2_SDCardReader project while you leave the descriptors.c, .h as in the USB_config folder of the M2_SDCardReader example?  Don't use the one you have created but use the one that is part of the M2_SDCardReader. 

    If copying your application code/IO calls cannot be done, then how about copying the entire contents of the USB_config directory from the M2_SDCardReader to your project?  If  your project shows up as Universal Bus controller and unknown device, the descriptors that you created are not correct, I am assuming.  So copying the descriptors.c, descriptos.h and the UsbIsr.c file from M2_SDCardReader to your project should solve the enumeration issue, unless you have changed the core USB library APIs.

    In regards to the DescriptorTool not generating any .c or .h files, there might be some synchronization issues going on.  So you can start from a clean state by deleting the MSP_USB_Descriptor_Tool directory from this path:

    C:\Users\<your_computer_name>\Texas_Instruments\

    Arthi

  • USB Device not recognized problem can be easily resolved by following the steps given below:-

    1. Update Device Driver

    2. Remove USB HUB and connect directly (If you are using any)

    3. Update Generic USB Hub Driver

    4. Uninstall USB Deivce and Resinstall again

    5. Restart your PC

    These steps are describe in brief here:-

    https://www.howali.com/2017/04/how-to-fix-usb-device-not-recognized-in-windows-10.html

  • The problem was solved by doing everything over with a "clean slate". I took the sample code and modified it again, in theory the same way but this time it worked. No real explanation on what the difference was.

**Attention** This is a public forum