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:
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:
OpenSDA
If I connect the debug port of the OpenSDA on the FRDM-KL25Z board, then two more drivers show up:
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:
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):
As of today, I have this driver installed:
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:
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):
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‘:
This opens the ‘Add Hardware Wizard’:
Next, I select to install the hardware manually:
In the next dialog, I select ‘Show all devices’:
In the next dialog I select ‘Have Disk’:
In the next dialog, I again select ‘Have Disk’:
Here I browse to
<MCU installation path>\Drivers\P&E\Drivers\windriver
and select the WinDriver .inf file:
With this, I’m going to install the Jungo Windriver:
And installation is only one click away:
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…’:
Next I Browse my computer for driver software (Search automatically will not solve the problem!):
In the next dialog I select Let me pick from a list of device drivers on my computer:
Next, I press ‘Have Disk…‘ button:
Now I browse to the <MCU>\Drivers\P&E\Drivers folder to pick my driver:
The dialog will propose the matching driver name. Press Open. With this we have set where we copy the driver files from:
Pressing OK gets us back to this dialog:
Pressing ‘Next’ will install the drivers, and hopefully I get:
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 🙂
Have you any suggestions for Ubuntu users?
LikeLike
Hello, unfortunately not. The only thing about Ubuntu I can share is this one: https://mcuoneclipse.wordpress.com/2012/03/06/mcu10-2-on-ubuntu-12-04-64bit/
LikeLike
If you are using the Freedom Board and find yourself missing the OpenSDA debug driver, you may be missing firmware.
LikeLike
With OpenSDA it is possible to load ‘apps’ like on an iPhone, but only one app can be active at a time. By default the FRDM-KL25Z board comes with OpenSDA and the bootloader app loaded which allows you to drag&drop a file to program it. If you want to use the debugger, then the debugger application needs to be loaded. Further details: https://mcuoneclipse.wordpress.com/2012/09/20/opensda-on-the-freedom-kl25z-board/
LikeLike
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.
LikeLike
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?
LikeLike
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.
LikeLike
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
LikeLike
Hi Michael,
I do not use putty much, I use more Termite, and I have not seen such a problem.
Can you give Termite a try? You can download the .exe from http://www.compuphase.com/software_termite.htm so you even do not need to run an installer.
I suspect that there must be something which Putty does not like?
LikeLike
Thanks, Erich.I will try Termit and let you know the result.
Have a nice day!
LikeLike
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
LikeLike
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).
LikeLike
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!
LikeLike
Pingback: Debugging Failure: Check List and Hints | MCU on Eclipse
Pingback: AVR Mk-II for Aurduino and back to AVRStudio | Xtronix