Dear enrico,
I found one more interesting situation. When WinXP recognized the device correctly and when I switch usbdm into ICP mode and when trying to upgrade firmware via Test_USBDM I see upgarde dialog, but when click OK I see this:
found 4 bussesfound 4 bussesError: bdm_sts() failedSpeed = 8000000.00 MHz (0 ticks, sync=0.0 us)
But I don't have any error on my notebook(intel chpiset)running on WinXP. USBDM was always recognized correctly. I think that the bug is in JM60 usb enumeration. I also have a USBDM based on JB16 using this same driver but this hardware is always recognized.
I think that the pgo schould check once again usb enumartion code.
Best Regards,
Macias
Hi,
I seen some interesting think:
1-st connect: Device not recognized
2-nd connect: Device not recognized
3-rd connect: Device recognized correctly.
This situation is repeted when I restart my PC.Device is always recognized correctly after 3-rd connect.
I attache detailed logs from my USB analyzer.
Best Regards, Macias
Dear pgo,
I have tried the code you posted on two "faulty" PCs, but the problem seems to persist.
I have the possibility to use another commercial BDM and the USB analyzer,
so it is ok for me to try to track down the problem. I am not at home this weekend,
but from monday I am ready to try.
Thank you very much
Enrico
Dear pgo,
I have tried to record the USB connection packets on a "working" system and on a "not working"
system ; I've used an "USB Inspector" I borrowed (but I'm not sure of the accuracy of my recordings
because it is the first time I've used this inspector). I have attached a series of .txt files with
recorded data (two of them with the SOF packets removed). I hope this data can be helpful.
While I was testing on one of the "not working" PCs, after some "connect-disconnect" cycles the USBDM was correctly recognized. Now on that PC the USBDM is recognized every time I connect it.
This PC is the one from wich I recorded the "working data".
On another "not working" PC, I tried to cycle connection a lot of times, but nothing changed;
this PC is the one from wich I recorded the "not working data".
Now I'll try to load and test the firmware that you have posted. Thank you for your support!
Enrico
Dear pgo,
I've built your latest version of USBDM08 (v1.4), flashed with a commercial BDM .
I've successfully connected the interface on a PC running Windows XP, installed the drivers when
requested and tested with CW 6.1 Special Edition.
The problem is with another PC running Windows 2000 (SP4). When I connect the interface,
the OS starts the driver installation procedure and then says that (I translate from Italian) "Installation
not possible. Specify a function driver for device instance", without asking me for drivers. Then,
on device properties, the system says "Driver not installed". If I try to reinstall it (giving it the right
driver path), the system tells that the "C:\winnt\inf\usb.inf"(?) driver is already installed. Clicking
on "Next", I get the previous error message. On "properties" window, I see "Driver not installed".
Am I (probably) doing something wrong or Win2K is not supported?
Thank you for your big work
Enrico
Dear enrico,
I'm sorry but I don't have Win2000 to try it on - I've only tested under WINXP and Vista. There may well be some problem with the drivers - I'm not even sure if libusb is supported under Win2000.
bye
Dear pgo,
Thank you for your support.
I'm sorry, but I've made a wrong assumption with Win2K: I was able to try on another WinXP machine
and the result is: Regardless of OS type, on some machines, when I connect my USBDM, the board is
correctly found and the OS asks for the driver; on other machines, the OS founds the board but
gives me the error reported on my first task.
On Win2K, I see the uncorrectly installed board on device manager (I see "USB Device"),
but seems not possible to see the vid&pid on device properties window.
On WinXP (the one on wich the board didn't install properly) I can see the vid&pid
and it is "0000 0000" .
On all the machines, if I try to uninstall the driver from device manager, then disconnect and
reconnect the board, the situation don't change; on the PCs where the USBDM works, it continues
to be correctly found; on the PCs where the USBDM isn't found correctly, it continues to be
uncorrectly found.
Maybe the problem could be on different USB timings from PC to PC...
Can you tell me if tere is a "timing requirement" on USB negotiation procedure that could be
disattended by, for example, the crystal oscillator on my board that fails to lock on a reasonable time?
Thank you very much
Dear enrico,
From your description it seems that there must be a bug in my USB enumeration code. I've tried the BDM on a number of different machines without problems. So, as you suggest, it may be some kind of timing problem. I'll have a look at the code and see if I can spot anything likely but without a failing machine it is very difficult to track down such a problem.
Could you check the type of USB chip used on the machines that are causing problems? Are they the same hardware by any chance?
To do this:
Plug in the device
Open the device manager
Select View->devices by connection
Look through the device tree until you find the offending device.
It should look something like the attached (except - unknown device!). The highlighted device is the hardware I'm interested in.
Also - check the reset hardware on the BDM. You could try increasing the size of cap on the reset signal or adding a pull-up resistor. This would affect the timing between reset and USB bus connection.
Thanks
Dear pgo,
the strange thing is that the error message comes out before the system asks for the driver.
So I think the problem is not in the driver files, but eventually on a "conflict" between
the USBDM USB settings (eg. VID/PID values) and a driver pre-installed on Win2K
installation, or eventually on a particular firmware boot-up timing that "hangs" the
system installer.
I have tried on three Windows 2000 Professional (SP4) machines (one of them
with the OS freshly installed) and the board didn't work.
I've also tried to install the drivers (right clicking on the .inf file and selecting "install")
before connecting the USBDM, but nothing changes.
Another strange thing: my USBDM seems running fine on a Windows 2000 Server (SP4)
machine.
Dear Enrico,
Could you plug in the device under win2000 and then go into device manager and see if it appears as a device.
If it does then right-click and look at the properties - One page should show the VID/PID. This will at least indicate if the device is enumerating properly. May give us a hint what is going on.
bye
Hi pgo,
USBDM is very interesting, I have just one question : is it possible to use the JM60CQH version ? It is the QF64 version of the JM60, and like I make my PCBs myself, I prefer using QFP instead of LQFP component...
If I use CQH version, which s19 file could I use ? The one for CLD version ?
Thanks !
jOJo
Dear jOJo,
The two devices (CQH and CLD) have the same pin spacing and pad size so why do you find the larger chip easier to use?
Since you would be designing your own board you can use either Flash file (CLD or CLC). Just check the schematics and make sure you use the correct pins for whatever port is needed - neither chip is pin-compatible with the device you intend using.
In any case, since your main need was programming the 51JM128 I would suggest that you look at the JB16 version of USBDM and see if there is a Flash version that can be used with your existing JB16 OSBDM. See this link Combined TBDML/OSBDM Code.
bye
Hi pgo
Thanks to respond so fast !
CQH is a 64QFP, whereas the other are 44LQFP and 32LQFP, so the pin spacing of the CQH is larger, and easier to use.
I started to make a PCB of the JM60 USBDM, with the CQH version.
About the JB16 version of the USBDM, I have seen it, and of course it is interesting, but I don't find any version of the software witch could be used with my OSBDM. My OSBDM have BDM_IN and BDM_OUT connected together, and RST_IN and RST_OUT also connected together. It has also a RST_DRV line and a BDM_DRV line. I have attached the schematic. All the JB16 USBDM version I have seen don't have the RST_DRV line, and IN and OUT lines are separated (like on this one : http://www.freescale.com/files/community_files/OSBDM08/USBDM_JB16_SOIC_JB16JDWE.pdf).
So I don't think my OSBDM could be used. Maybe I'm wrong and there is a software version witch could be OK.... ?
The problem with OSBDM and programming MCF51JM128 device only appends when the device is a new one. If it has already been programmed with a PEMicro programmer, it can be programmed then with the OSBDM without troubles. Maybe there will be a software release of the OSBDM in order to solve this issue.... ?
Thanks
jOJo
Dear jOJo,
The TBDML circuit you refer to is my preferred circuit as it avoids a hardware conflict if transceivers are used.
The JB16 distribution has a number of schematic and flash files in the "USBDM_Flash_Images" directory. I believe your schematic is very similar to the OSBDM or WTBDMS08 schematics provided. One of the corresponding Flash files should be suitable.
Worth trying provided you can restore the original Flash file you are currently using.
May I ask where you obtained your BDM or did you build it. I'll add it to the list of supported ones if it is a commercial version.
The problem programming is probably related to reseting a blank chip into BKGD mode. The USBDM uses a different strategy (including using the reset pin & prompting the user to cycle the power if necessary!) that would have more success.
Finally the 64 pin QFP package has pins on a .8mm spacing as does the 44 pin LQFP. The smaller package is more convenient I would think. The thiner chip makes little difference but the actual pins may be a bit more thin as well.
bye
Hi pgo
First I want to say that you are really nice to help me, so thank you very much.
You talk to me about the Wiztronic version of the OSBDM (WTBDMS08), so I had a look this morning and I realised that it was a very similar version than my OSBDM version. The only one difference is the pull-up on PTD3.
So I tried the USBDM-JB16 Version software for WTVDMS08 hardware version, and it works (after a copy of the DLL in CodeWarrior installation path) ! I have tested with a S08DZ60 device. Programming and debugging is OK. I think I will try to program a MCF51JM128 this week (I have to order a JM128 device and then I will try).
The OSBDM I realised is here : http://www.68hc08.net/modules/smartsection/item.php?itemid=106 (French Forum). I have realised my own PCB and I used a JB16 witch is a SOIC28 instead of LQFP32.
You're right about LQFP44 and QFP64 also, I thought that LQFP was a 0.5 pin spacing version, but both have 0.8mm pin spacing.
Like USBDM-JB16 seems to work, I will delayed the realisation of the USBDM-JM60 I think.
Again, thank you very much for your help.
I will post here about my experiment with MCF51JM128 as soon as possible.
Bye
jOJo
Dear Pgo,
I was built you USBDM on JM60 CLH version. After programming by initial flash image, when I connect it to usb I see "USB Device was not recognized". Another USB application (examples from freescale) are works fine. The problem is connected with this uC version, CLH not CLD?
Best regards,
Maciej Bojczuk
Sorry FIBO. This is a chicken and egg problem. You need a HCS08 programmer to do the initial programming! Once programmed it can be updated through the USB.
If you need one that can be used without this problem you could look at the following JB16 version:
http://forums.freescale.com/freescale/board/message?board.id=TBDML&thread.id=240&page=1
Perhaps build the minimal version to program your JM16 version!
bye