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.

DFUProg USB driver loading failure in Windows (XP)

Other Parts Discussed in Thread: CONTROLSUITE

Hello All,

I am using Piccolo F28069U controller on a custom board with USB connector. I am using the USB bootloader provided in controlSUITE.

I have customized both bootloader code and DFUProg.exe. When I connect the USB cable and controller is in bootcode, device is detected and the driver is loaded by Windows.

But if I connect the USB cable when application code is running (where DFU runtime mmode is active), device is detected but driver is not loaded by Windows.

the New Hardware Found wizard tells that "Can not find the driver".

I tried lots of methods from changing the INF file to changing VID/PID of the device but I am totally lost.

any help will be greatly appreciated.

thank you,

--

Vishwanatha

  • Vishwanatha,

    Which INF file are you pointing windows to when the application code is running?  You should be using boot_demo_usb.inf.  Also of note, if you have another USB application running at the same time, you'll probably need to modify the INF to reflect that other application.

    Trey

  • Hi Trey,

    I did use boot_demo_usb.inf and there is only one application running. I verified VID, PID and indices. I tried
    modifying path to DLLs, but no use.
    I am sure there is no prolem with DLLs, as same DLLs are working in one PC (that already has installed the driver).
    Problem is only with installing the new drivers using INF.
    I am unable to understand how can it detect boot_usb.inf and not boot_demo_usb.inf.
    There is no difference between boot_usb.inf and boot_demo_usb.inf except for PID, Interface index and few other cosmetic
    changes.
    My suspicion is that there is a mismatch between the device descriptor and INF, but have no idea what it is.

    --
    Vishwanatha

  • Vishwanatha,

    I honestly don't know what to tell you.  I just tested the bl_app example in the latest release of controlSUITE along with the boot_demo_usb.inf and Windows 7 recognized the device and installed the driver (I had to manually tell it where the driver was though).

    I would strip out as much application code as possible and make sure that the USB DFU code that remains matches the code from the example.

    Trey

  • Hi Trey,
    Is there any dependency on the EOF format for INF files?
    I tried with default controlsuite bootloader and Windows detected the INF. I was surprised and compared boot_demo_usb.inf of
    controlsuite project and the INF of my custom project and I saw that the difference is in EOF (my custom file did not
    have CR_LF).

    However, the confirmation tests again failed - i removed the CR_LF and connected, and still Windows detected the driver.
    Right now, the problem is solved but I don't know how!!!

    --
    Vishwanatha

  • Vishwanatha,

    I'm honestly not sure if Windows cares about the EOL format.  Windows does use a "non-standard" EOL format so it wouldn't suprise me if it got confused by a file with unix line endings.

    Glad to hear its working now!


    Trey

  • Hi,
    I have a basic question now:
    I modified the controlsuite bl_app project to suite my project requirements.
    changes are:
    1. I retained the device as composite device but removed HID-Mouse class from it.
    2. further, I changed the number of devices (NUM_DEVICES) to 1 and DESCRIPTOR_BUFFER_SIZE to COMPOSITE_DDFU_SIZE.
    my question is:
    1) is it allowed to have a device as Composite Device and have Number of devices as 1?
    2) If yes, are the above changes sufficient to convert a two-device unit into single-device unit?

    thank you,

    --
    Vishwanatha

  • I don't think you can have a run time DFU device without another application.  Certainly it doesn't look like the USBLib stack is designed to handle this case because the DFU device instance structure doesn't have entries for VID/PID or power consumption.

    So your application is only using USB for firmware update?  I would recommend you just setup the other device to be a CDC class device (i.e. serial port).  This will give you a way to dump debug information or otherwise communicate with your firmware internal to the device, and then you can have a composite device with which DFU will work.

    I would recommend looking through the DFU spec at the USB-IF website to make sure you fully understand what you can and cannot do.

  • Hi Trey,

    I changed the software to have both DFU and Mouse and it is working now.

    However, I faced a problem yesterday when I tried to test it on Windows 7. It says windows detected the driver but encountered error during installation.

    any clue on this?

    thank you,

    Vishwanatha

  • Vishwanatha,

    I'm honestly not sure why Windows 7 would be giving you trouble.  I just tested the bl_app example in Windows 7 and it installed the drivers just fine.  I suspect maybe something in the PC driver doesn't match up with your application.

    If you test with the bl_app example do the drivers install and work correctly?

    Trey

  • Hi Trey,

    I have not tested the example code. I'll test and update.

    But, you mentioned that you tested it on Win7. I am curious why should the PC driver have any dependency to Windows to interact with the firmware!!

    It works in WinXP.

    --

    Vishwanatha

  • Vishwanatha,

    That is puzzling that it works on XP, but not on 7.  I'm honestly not an expert on windows, so I'm not sure how much help I can be on this issue.  My recommendation would be to find a Windows developer forum and see if any of the experts there could help you.  I just don't know enough about Windows 7 to hypothesize on what could be the issue.

    Trey

  • Vishwanatha,

    I talked to some of my USB friends from the Stellaris group and they suggested looking at the setupAPI.log files.  These contain information on device driver installation and should give us a hint as to why this is failing in windows 7.  On Windows XP its a single file that is located in c:\windows.  On Windows 7 there are a few files that all start with setupAPI and they are located in c:\windows\inf\.  Can you zip up copies of these files and attach them to you next post.

    FYI there is also a trouble shooting guide here:

    http://msdn.microsoft.com/en-us/library/windows/hardware/gg463393.aspx

    Trey

  • Hi Trey,

    Thank you for the hints. I'll check these and see if there is any improvement.

    --

    Vishwanatha

  • Trey,

    After a small disturbance, I could look into this problem today.

    And the result is interesting:

    I loaded the very software from controlSuite, without any modification and loaded the PC driver, unmodified.

    I observed that the bootloader driver was installed correctly whereas the bl_app driver (Mouse with DFU - runtime mode) failed.

    It says "Windows found the driver but encountered error" and gives "system can not find the file specified" as the reason.

    So I tried with the same firmware, but changed the INF file to use lm*.dll files instead of ti*.dll files. And it worked !!

    I am not sure what kind of problem is with tidfu*.dll files.

    Could you help me in finding this out?

    Thank you,

    Vishwanatha

  • Trey,

    I had a breakthrough in finding the reason out.
    I looked into the INF file boot_demo_usb.inf and saw that the file mentions files tidfu64*.* in the path \amd64.
    But these are not available in this directory and hence Windows says that it found the driver but file specified is not found.
    However, there are 64bit versions of lm*.* files. Hence, after changing the ti*.dll to lm*.dll, the driver was loaded.

    Now my questions:
    1. where do I get the 64bit versions of tidfu*.dll files?
    2. is the dfuprog source available and can this be built to generate 64 bit version?

    --
    Vishwanatha

  • Vishwanatha,

    Sorry for the trouble.  The lm* and ti* files are the same, they have just been renamed to show that they are no longer just for Stellaris.  I will file a bug to take a look at these files and make sure they are all consistent (I thought they were...).

    DFUProg source is available in controlSUITE in the MWare/tools/dfuprog directory.  I'm sure this can be built for 64 bit Windows, but I'm not sure what you would gain by doing that.  The current 32 bit version should run just fine on a 64 bit installation of windows.

    Trey

  • Trey,
    1. I meant the source of tidfu.dll, not just dfuprog. It is the DLL that is giving problem.
       Can I also get the source of tiusbdll.dll?
    2. If the 64bit version makes no difference, why do we have a link to 64bit DLLs in the INF?
       this is the section that references 64bit files:
       [SourceDisksFiles.amd64]
        WinUSBCoInstaller2.dll=2
        WdfCoInstaller01009.dll=2
        tiusbdll.dll=1
        tiusbdll.lib=1
        tidfu.dll=1
        tidfu.lib=1
        tiusbdll64.dll=2
        tiusbdll64.lib=2
        tidfu64.dll=2
        tidfu64.lib=2
        And interestingly, I did not see the 64-bit files in the system folders (probably I did not look into proper directory).

        I must thank you for the hint on setupAPI log files. Indeed they are useful in debugging problems in the device installation.
        
    --
    Vishwanatha

  • Vishwanatha,

    Sorry for the slow response, I've been out of the office.

    1) Source for tiusbdll should be available in F2806x/version/MWare/tools/tiusbdll.  Source for tidfu should be in the tidfu folder.  Both of these folders also have Visual Studio projects for building the DLLs.

    2) You asked about DFUProg which is an executable program not the DLL files.  DFUProg is only setup to be built 32 bit, but the DLLs are generated for 32 and 64 bit systems.  I'm honestly not too familiar with DLLs and 32 bit vs 64 bit software in Windows, but I think the executable will use whatever is available on a particular system.  Certainly some of the DLLs in the windows_drivers folder do need to have their file name fixed and I've made a note of this.

    Trey