error message : Error in calling open_device()!

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

error message : Error in calling open_device()!

7,120 Views
PeterTsai
Contributor II
I download osbdm build7 package. and then made a osbdm pcb. when I Install USB ICP Drivers ,and then  open USBICP.exe and prompted for an IMP file select jb16_icp_me.imp. but appear as above error message. Why?
 
Peter
Tags (2)
0 Kudos
Reply
12 Replies

1,626 Views
PeterTsai
Contributor II
Hi pgo,
 
Thank a lots for your opinion. At last i can run OSBDM+MC9S08QG8 with CodeWarrior 6.2.
 
But when i run OSBDM+MC9S08SH4. I got another error message. Could you give me some diagnosis again.
 
Happy New Year !!
 
 
peter
 
Message Edited by t.dowe on 2009-10-26 04:56 PM
0 Kudos
Reply

1,626 Views
pgo
Senior Contributor V
Dear Peter,

The message indicates the BDM isn't connecting with the target (obviously!).  The SH chips are a a bit problematic about getting into BDM mode.  Try manually holding the BKGD pin low while switching on the target i.e. short to ground with a temporary link.

This may be similar to problems with the QG chips described here:

Problems getting a blank QG into background mode

You can also look at the improved hardware described here:

Combined TBDML/OSBDM Code

The added power detection handles this situation better.

bye

0 Kudos
Reply

1,626 Views
PeterTsai
Contributor II
Dear pgo :
 
My JB16 of the pcb is not blank really. Because i got it from my friend. But i only have the pcb. So i download the OSBDM built 7 from http://forums.freescale.com/freescale/board/message?board.id=OSBDM08&thread.id=422 and according to the manual to install driver into my computer,
 and then run into above these error messages. the S19 file also come from the package of built 7.
 
My doubts are why the device become unidentified when to run "erase flash" button of the USBICP.exe, moreover, i try to select jg16icp_be.imp and then to run "erase flash" button of the USBICP.exe. It told me OK. but my computer cann't find the device after to program new S19 file. to remove & replace the BDM.  My computer can't still find the device.
 
I am just freshman for OSBDM interface technology. Maybe my questions are superficial. But i am deeply appreciative of your help.
0 Kudos
Reply

1,626 Views
pgo
Senior Contributor V
Dear Peter,

The Configuration file you used with the ICP software was for block erase - This would not erase all of the Flash memory of the chip.  This would normally be used with a chip containing bootstrap code at the top of the flash.  This bootstrap code would usually provide some mechanism for entering ICP mode - for example, the OSBDM code will do this when A.0 is tied low (from memory).   Depending upon what the original code in the chip was, it might be worth trying this?

This also explains why re-programming the chip failed.

A partially erased chip will no longer enter the ICP mode unless the remaining software specifically provides a mechanism as above.

The correct config file to use for mass erase is: jb16icp_me.imp.

I'm sorry but the only way I know of recovering is to use the monitor mode and a MON08 interface - see the Monitor Rom section of the JB16 manual for details.

bye
0 Kudos
Reply

1,626 Views
PeterTsai
Contributor II
Hi pgo
 
Thank you again for help.
 
usb driver has installed OK. I try to program s19 file into JB16. but appear another error as attached file.
 
I also try to run Erase FLASH. but this act cause my computer into wait status still (show busy icon). and then usb device vanishs. I try to remove & replace the BDM.  My computer show "can't  identify the device". get same result when re-start computer. why?
 
peter
 
Message Edited by t.dowe on 2009-10-26 04:54 PM
0 Kudos
Reply

1,626 Views
pgo
Senior Contributor V
Dear Peter,

I can't offer much advice.

The only time I have got the error you have show is when trying to program the device without first erasing it.  This shouldn't occur since the device was blank to get into ICP mode in the first place.  Another possibility would be that the binary file was not correct for the device and you were trying to program a non-flash area.

What S19 file were you programming?

After programming (or partially programming) the device it may not enter ICP mode any longer.

Does the device appear in the hardware manager?

bye


0 Kudos
Reply

1,626 Views
PeterTsai
Contributor II
My OS is XP-sp3. Has this affect? or it must use in windows 2000.
 
Peter
0 Kudos
Reply

1,626 Views
pgo
Senior Contributor V
Dear Peter,

The error message means that the software did not detect a HC08JB16 in ICP mode connected to a USB port.

The software works fine under XP so it is more likely to be a problem with the hardware.

Refer to the following Appnote for more information on ICP:

http://www.freescale.com/files/microcontrollers/doc/app_note/AN2399.pdf?fsrch=1

Good Luck
0 Kudos
Reply

1,626 Views
PeterTsai
Contributor II
Hi pgo:
According to the manual, i had already installed the USB driver successfully. I can see it in device manager. and also two pull-down resistor(470k) had been connected. Are there are other potential cause?
 
thanks for you reply
 
peter
0 Kudos
Reply

1,626 Views
pgo
Senior Contributor V
Dear Peter,

A couple of questions:

When you first plugged in the JB16 were you prompted for the driver i.e. the usual WIndows "Found new hardware" dialogue?

When you say you can see the driver in the device manager do you mean as shown in one of the attached JPEGs (Please identify which)?

The only other things to check are:

Is the crystal oscillating (really need a CRO to check this).
Is there a capacitor on the reset line.  There have been some issues with reliable resetting to ICP mode.
Are the two USB lines correct (not transposed - this caught me once!)
You have already confirmed the pull-down resistors.
You can try changing the pull-down on D- to a 1k5 pull-up - this should at least get windows to complain about a strange device being connected.

bye




Message Edited by pgo on 2008-12-23 11:55 PM

Message Edited by pgo on 2008-12-24 12:13 AM

 

Correct_Driver.jpg

Incorrect_Driver.jpg

Message Edited by t.dowe on 2009-10-26 04:52 PM
0 Kudos
Reply

1,626 Views
PeterTsai
Contributor II
Hi Pgo
 
My image of device manager as attached file. Is it incorrect? Please double check for me.
(to install by OSBDMDistribution_b7_05202008\Host\OpenSourceBDMDriver\drivers\inf-wizard.exe)
 
does PTD3 port must connect to ground? When I release the port and remaind pull up resistor(10k) to VCC_USB(VDD). device manager will don't discover the usb device.
 
peter
 
Message Edited by t.dowe on 2009-10-26 04:53 PM
0 Kudos
Reply

1,626 Views
pgo
Senior Contributor V
Dear Peter,

The second dialogue from the libusb utility indicates that the JB16 is correctly identifying itself.  The first dialogue (from hardware manager) indicates that you have created a libusb driver for the JB16 in ICP mode - This is NOT correct!

You are not asked to run the inf-wizard - This is part of libusb and is used by a developer  to create a driver to allow libusb to interface to a new device.  The required driver is the one that comes with the ICP software from Freescale.

To fix:

Download the ICP software from Freescale.  AN2399SW : Software files for AN2399 (zip) and unzip it somewhere convenient.  It includes a driver in the directory PC Software.
Right click on the entry for the JB16 in the hardware manager and select uninstall.  Complete the process.
Remove & replace the BDM.  This should result in a Found New Hardware Wizard.
Choose Don't search. I will choose the driver to install and select Next.
Select Have Disk and then Browse to the above directory in AN2399SW and select USBICP.INF.
Make sure Motorola JB16/JG16 ICP Device is selected and then select Next.

This should install the correct driver and you should now see the device manager entry similar to the one posted earlier.

You may then use the Freescale ICP software to program the USBDM firmware into the JB16.

Good Luck.

bye







Message Edited by pgo on 2008-12-24 04:13 AM

Message Edited by pgo on 2008-12-24 04:15 AM
0 Kudos
Reply