USBDM 4.3 driver installation / documentation trouble

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USBDM 4.3 driver installation / documentation trouble

Jump to solution
3,675 Views
Obetz
Contributor III

Hello All,

 

the USBDM JM bought from flashgenie.net shows two USB devices:

 

VID_16D0&PID_0567&MI_01 USBDM CDC interface
VID_16D0&PID_0567&MI_00 USBDM BDM interface

 

The documentation doesn't reflect this, and the "Driver Files" directory in USBDM_Win32_4_3.zip has only one entry.

 

Questions:

 

1. What is the correct way to install the driver(s)?

 

2. Why does the interface need to install two virtual ports?

 

Thanks in advance,

 

Oliver

Tags (2)
0 Kudos
1 Solution
1,348 Views
pgo
Senior Contributor V

Dear Obetz,

 

The two devices are the BDM proper and a CDC serial interface.  The documentation for the latter is incomplete. - Sorry!

The two devices in the composite device support the usual BDM interface as well as a serial over USB interface.  They are pretty much independent so you do not need to install two drivers unless you want the functionality of both.

 

Install the libusbV1 driver for

VID_16D0&PID_0567&MI_00 USBDM BDM interface

 as described in the documentation (with some changes to names!) here:

http://usbdm.sourceforge.net/USBDM_V4.3/USBDM_JS16/html/index.html

 

The other device is a CDC serial driver.  The required inf file is in the driver directory however I'm unsure if the hardware you are using supports the serial interface.  If not, there is no need to install the second driver.

 

The JMxx firmware build in V4.3 accidently included the CDC feature - It should have been disabled for this hardware version.  This is probably why it appears in the hardware you are using.

 

bye

View solution in original post

0 Kudos
16 Replies
1,349 Views
pgo
Senior Contributor V

Dear Obetz,

 

The two devices are the BDM proper and a CDC serial interface.  The documentation for the latter is incomplete. - Sorry!

The two devices in the composite device support the usual BDM interface as well as a serial over USB interface.  They are pretty much independent so you do not need to install two drivers unless you want the functionality of both.

 

Install the libusbV1 driver for

VID_16D0&PID_0567&MI_00 USBDM BDM interface

 as described in the documentation (with some changes to names!) here:

http://usbdm.sourceforge.net/USBDM_V4.3/USBDM_JS16/html/index.html

 

The other device is a CDC serial driver.  The required inf file is in the driver directory however I'm unsure if the hardware you are using supports the serial interface.  If not, there is no need to install the second driver.

 

The JMxx firmware build in V4.3 accidently included the CDC feature - It should have been disabled for this hardware version.  This is probably why it appears in the hardware you are using.

 

bye

0 Kudos
1,348 Views
joncas
Contributor II

Dear PGO,

 

I wonder if you could explain in terms understandable to someone not yet familiar with the Eclipse version of CW how to compile the USBDM-JM60 firmware with CDC serial interface enabled?

 

I saw that version 4.3 had it accidentally enabled, so it shows in the Windows device manager, and looking at the CW project for version 4.6, I see you have build versions with the serial interface enabled for the JB16 hardware.

But looking at the configure files, I couldn't see what would need to be changed, since CAP_CDC already seems to have a non-zero value? (had been putting off trying the Eclipse version of CW, but this seems to be the moment...)

 

Many thanks in advance,

Robert

0 Kudos
1,348 Views
joncas
Contributor II

p.s.: with a little more common sense today, I found that one just has to put the CAP_CDC back into the HW_CAPABILITY and the TARGET_CAPABILITY in the configuration file USBDM_JMxxCLD.h

(haven't yet tested it in the hardware) ...

0 Kudos
1,348 Views
pgo
Senior Contributor V

Dear Joncas,

 

Glad you found it.

 

bye

0 Kudos
1,348 Views
wrljet
Contributor II

Are there known bugs with the CDC interface?

 

I have it turned on with the 4.6 firmware.  it works, but it seems if I send it a burst a characters from the micro side, it stops sending to the PC.

 

Bill

 

0 Kudos
1,348 Views
pgo
Senior Contributor V

Dear Bill,

 

I spent some time trying to find a problem with this but I've had mixed results.  As far as I can tell the BDM is doing the right thing but (under windows) every odd USB packet is being dropped - sometimes.  I've had it run 10 hours without problem and then remove and re-plug and have it behave intermittently.

 

I've done the following:

The V4.7 CDC code has been re-written (trying to eliminate this bug) but without change in results.

I've built a simple USB analyser - haven't found a problem with the USB traffic.

 

Anyway - It would appear that the problem is not with the BDM but with the driver installation (I hope).   This still needs some checking and I have not tested with V4.6.   I've had 100% success with the V4.7 version and a modified installation inf file.

 

If convenient can you try re-installing the serial driver using the attached inf file.  This may improve the V4.6 performance but I can't guarantee this since I'm unsure what is actually wrong with the driver installation.

 

To re-install the driver it would be necessary to uninstall using the Device Managerand then re-install using the provided inf file.

 

bye

0 Kudos
1,348 Views
joncas
Contributor II

Hello PGO and wljet,

 

I was wondering whether the problem might not be something with the baud tolerance of the JM's SCI, because I noticed that for example, when connecting with the debugger going where the target clock is not trimmed accurately and runs a few percent too fast, the CDC communication has garbage characters, but restarting the target without the debugger so the clock is accurate, the transmission works fine.

0 Kudos
1,348 Views
wrljet
Contributor II

Testing so far with USBDM 4.7 and the new .INF file, at 38400 baud (all I tried so far) it seems to work well.

Sent output to it continuously for a few hours.

 

But the BDM stopped working a couple times.  Just sitting there it lost the connection with the target.

I restarted the connection successfully without disturbing the comm output.

 

Is it possible there's some timing issue that wrecks the BDM connection if a

lot of data is flying through the comm section?

 

(this is on WinXP SP3 32-bit, CW6.3)

 

Bill

 

0 Kudos
1,348 Views
pgo
Senior Contributor V

Dear Bill,

 

This is certainly possible.  The CDC stuff involves a lot of interrupts both from the serial interface and the USB pipes.  I suspect that there is an infrequent timing problem.  I re-wrote the CDC code in V4.7 to address some issues but didn't come across any problems in testing.

 

There are other more pressing issues that I need to address so this will be on hold for the moment.  I hope the performance is workable.

 

Also, note that the CDC code doesn't have flow control so I would expect it to drop characters at high baud rates if the USB is busy.  There is very limited RAM available for buffering especially in the JS16 version.   I thought this a resonable compromise considering that it is intended for a debugging situation rather than production.

 

bye

0 Kudos
1,348 Views
wrljet
Contributor II

Yes, it's very workable.   The CDC is a very handy feature for me. 

 

I (and we all do) very much appreciate all your excellent work on this whole project!

 

Bill

 

0 Kudos
1,348 Views
Obetz
Contributor III

Hello pgo,

 

thanks for the explanation.

 

I suggest to add it to the installation instructions, since USBDM_BDM_Interface.inf in USBDM_Win32_4_3.zip doesn't work (missing MI_00). Zadig creates a working driver.

 

It should also be mentioned that USBDMSerial.inf in the "USB_Driver" directory is for the CDC driver.

 

BTW: The Flash Programmer Utility reports firmware version 4.2 - does the 4.3 firmware report a wrong version?

 

Oliver

0 Kudos
1,348 Views
pgo
Senior Contributor V

Dear Oliver,

 

The installation instructions indicate the use of Zadiag to install the USBDM driver.  The "Driver Files" directory was not meant to be in the upload.  Sorry for the confusion.  It will be deleted in the next version.

 

I'm unsure which program you are referring to about the version number.  The current flash images on Sourceforge all report as 4.3 in the Bootloader utility and the programmers report the same version for the DLL and firmware after flashing.

 

bye

 

 

 

 

0 Kudos
1,348 Views
Obetz
Contributor III

Hello pgo,

 

it's "HCS08_FlashProgrammer.exe" reporting "BDM Firmware Ver 4.2", "DLL Ver 4.30".

 

Oliver

0 Kudos
1,348 Views
pgo
Senior Contributor V

Dear Oliver,

 

The current  flash images on Sourceforge all report V4.3 as they should so it looks like there is a slightly older version in your BDM.  Probably not worth changing until the next version is released.

 

bye

0 Kudos
1,348 Views
Obetz
Contributor III

Hello pgo,

 

thanks for checking. Since everything seems to work, I don't change anything unless I'm forced to.

 

Oliver

0 Kudos
1,348 Views
pgo
Senior Contributor V
0 Kudos