Fixing the USB Drivers

USB has two sides: if it works, it is great :-). If it does not, it is really bad :-(. It took a while in the desktop and PC world until USB for common devices (mouse, keyboard, memory sticks, …) was working without issues. But ‘non-standard’ devices like a USB debugging probe/cable are not of that kind of category.

Occasionally I run into USB driver issues in my class. So this post is about identifying the different USB driver parts for the P&E OpenSDA, P&E OSBDM/OSJTAG and P&E Multilinks. And how to install the drivers manually if something is not going well.

WinDriver

Without anything connected, I have the Jungo WinDriver installed and showing up in my Device Manager:

Jungo Windriver

Jungo Windriver

The Jungo WinDriver is used by many companies for their own USB stack development. So for all the cases below, that Jungo WinDriver is *required*. As of today, I have this version of the driver in my system:

WinDriver Properties and Version

WinDriver Properties and Version

OpenSDA

If I connect the debug port of the OpenSDA on the FRDM-KL25Z board, then two more drivers show up:

OpenSDA Debug Driver and Virtual COM Port

OpenSDA Debug Driver and Virtual COM Port

One is the PEMicro OpenSDA Debug Driver: the connection between the debugger and the debug circuit on the board. The other is the CDC virtual COM port driver.

As of today, I have these versions installed:

PEMicro OpenSDA Debug Driver Details

PEMicro OpenSDA Debug Driver Details

OpenSDA CDC Serial Port Driver

OpenSDA CDC Serial Port Driver

P&E USB Multilink

Connecting a P&E USB Multilink/Multilink Universal/Multilink Universal FX, it shows a ‘USB Multilink 2.0’ (without USB CDC port, of course):

USB Multilink 2.0

USB Multilink 2.0

As of today, I have this driver installed:

USB Multilink 2.0 Driver Details

USB Multilink 2.0 Driver Details

OSBDM/OSJTAG

OSBDM/OSJTAG looks different depending on if the latest firmware with USB CDC virtual COM port is installed or not.

If the board is using an older driver, then it looks like this:

OSBDM OSJTAG USB Drivers

OSBDM OSJTAG USB Drivers

It has the PEMicro USB Serial Port which only works with the P&E Terminal utility (but not with a normal terminal program). Additionally there is the LibUSB Open Source BDM – Debug Port driver.

Updating the firmware to V31.xx will show the USB CDC port (see this post how to upgrade the firmware):

OSBDM OSJTAG with latest firmware and USB CDC Port

OSBDM OSJTAG with latest firmware and USB CDC Port

Troubleshooting: Installing WinDriver

What if the WinDriver is not present at all? The trick is to install it manually. For this I use the context menu in the Windows Device manager and select ‘Add Legacy Hardware‘:

Add Legacy Hardware

This opens the ‘Add Hardware Wizard’:

Add Hardware Wizard

Add Hardware Wizard

Next, I select to install the hardware manually:

Install Hardware manually

In the next dialog, I select ‘Show all devices’:

Show all Devices

Show all Devices

In the next dialog I select ‘Have Disk’:

Have Disk to Add Hardware

Have Disk to Add Hardware

In the next dialog, I again select ‘Have Disk’:

Have Disk to select device

Have Disk to select device

Here I browse to

<MCU installation  path>\Drivers\P&E\Drivers\windriver

and select the WinDriver .inf file:

Selecting Windriver File

Selecting Windriver File

With this, I’m going to install the Jungo Windriver:

Selected Jungo Windriver

Selected Jungo Windriver

And installation is only one click away:

Ready to Install WinDriver

Ready to Install WinDriver

With this, we have installed the WinDriver again :-).

Troubleshooting: Updating the drivers

Sometimes things are going wrong, and drivers are not properly installed. What helps here is to re-install the USB drivers.

One way is to get the latest drivers from the P&E support page, e.g. from http://www.pemicro.com/osbdm or from http://www.pemicro.com/opensda.

The other way is to use the drivers from the CodeWarrior installation. I find it inside my installation folder:

<CW Installation Path>\Drivers\P&E\Drivers

To install/update the driver I go to the driver properties and select ‘Update Driver…’:

Update Driver

Update Driver

Next I Browse my computer for driver software (Search automatically will not solve the problem!):

Browse my Computer for driver software

Browse my Computer for driver software

In the next dialog I select Let me pick from a list of device drivers on my computer:

Let me pick from a list of device drivers

Let me pick from a list of device drivers

Next, I press ‘Have Disk…‘ button:

Have Disk Button

Have Disk Button

Now I browse to the <MCU>\Drivers\P&E\Drivers folder to pick my driver:

Selecting Driver .inf File

Selecting Driver .inf File

The dialog will propose the matching driver name. Press Open. With this we have set where we copy the driver files from:

Copy manufacturer's files from

Copy manufacturer’s files from

Pressing OK gets us back to this dialog:

Update Driver with hardware selected

Update Driver with hardware selected

Pressing ‘Next’ will install the drivers, and hopefully I get:

Updated driver software

Updated driver software

And we are done 🙂

Summary

Screwed up USB drives is a major frustration. Knowing what kind of drivers are present, and knowing how to install them with the device manager helps a lot. Important to note is that the ‘automatic’ way in Windows usually does not help for me: I have to explicitly browse for the drivers, and tell Windows that I have the driver files for it, as shown above. With this it has always worked out well for me.

Happy Installing 🙂

15 thoughts on “Fixing the USB Drivers

  1. Hello, i have some problems with the CDC-Serial installation. I’m using the P&E USB Multilink Universal and I want to debug a kinetis controller on my own prototype board. I downloaded the multilink_universal_installation which should contains the latest firmware (usbmlfs20armens.609). But after the firmware installation there is still no serial device in my windows7 device manager. I also installed the PE_drivers_install.exe.
    The P&E Driver Installation Test says this:
    ERROR!!! C:\Windows\system32\drivers\libusb0.sys not found
    ERROR!!! C:\Windows\syswow64\libusb0.dll not found
    (detected) C:\windows\system32\drivers\windrvr6.sys (Version 11.01)
    (detected) C:\Windows\syswow64\peusba05.dll ()
    (detected) C:\Windows\syswow64\peusba06.dll (Version 11.01)
    (detected) C:\Windows\syswow64\peusbb05.dll (Version 10.01)
    (detected) C:\Windows\syswow64\peusbb06.dll (Version 11.01)
    (detected) C:\Windows\syswow64\peusbmgr.dll ()
    Maybe someone can help me. Thanks in advance.

    Like

    • Hi Dominik,
      where have you found that driver installation test?
      It looks like you have some drivers not installed, maybe P&E should be contacted?
      If it matters: what host operating system are you using?

      Like

      • Hi Erich, thanks for your reply.
        I found the driver test application under Support/Documentation & Downloads/Utility/Driver Test (417 KB) on the P&E Website.

        OS: Windows7 / Windows XP
        Debugger: P&E Multilink Universal
        Debugger Firmware file: usbmlfs20armens.609 (Date:10/2012!)
        Target: Kinetis KL25Z64 on my custom pcb. Debugger is directly connected over SWD to the controller.

        Like

  2. Hi Erich
    I have problem with CDC serial port after updating to P&E Open SDA 1.14. The detail is:
    1.update the booloader itself to V1.11
    2.load the SDA application with firmware V1.14 (Debug and MSD app) to KL25z board
    3. plug the debug port (USB) on KL25Z to computuer, all drivers on the computer looks work fine (like picture in your posting), except the CDC serial port is COM4
    4. download s19 file or debug software, both Debug and MSD app work fine
    5. but CDC serial port doesn’t work becuase my Putty can’t receive any message from KL25Z (before I update Debug app (it was v0.09), the Putty can receive message, the software running on KL25Z is i2c example, but it never works with MSD app. the result is the same for pre-compile example of serial-test-115200.sred )
    6. I tried on two computers: one is Windows 7 64bit and another is Windows XP, no luck for either one
    Please help with your very valualbe experience and time
    Michael

    Like

  3. Hi Erich
    I tried termite yesterday and it didn’t work neither. Then I rolled MSD/Debug v1.14 back to Debug 1.09(The bootloader is still v1.11), this time Putty and Termite both work. So I think there is some bug in MSD/Debug v1.14 for CDC virtual serial port function

    Like

    • Hi Michael,
      I don’t have that problem on my side. I’m using v1.14 with windows7 64bit and my laptop without any issues. Same for all other machines I have seen e.g. in my class room (Win7 32bit, even Mac OS with VM).
      Have you tried different USB ports? Are you using USB 3.0 ports (I don’t have that, and I’m told that USB 3.0 is full of troubles).

      Like

      • Erich
        Thanks for your answer. My computer do have USB3.0 port but I am not sure the port which I use is 3.0 or 2.0, I will double check it and try other USB port.
        Have a nice day!

        Like

  4. Pingback: Debugging Failure: Check List and Hints | MCU on Eclipse

  5. Pingback: AVR Mk-II for Aurduino and back to AVRStudio | Xtronix

What do you think?

This site uses Akismet to reduce spam. Learn how your comment data is processed.