usb connection fail

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

usb connection fail

Jump to solution
2,390 Views
banditgangwere
Contributor I

We have two machines: an XP laptop, and a windows laptop with a virtual XP machine. Both have CW 7.2 5.9.0 build 5293. The virtual machine has service pack 2 & 3, builds 91218 and 101102.

 

We have a CW USB TAP BDM 900-7517 rev H.

 

With the XP laptop:

Jungo WinDriver version 9.0.0.0 3/27/2007

When the USB TAP is plugged in, it shows up as system devices -> CW USB TAP freescale, location 0, driver date 8/20/2007 ver 9.0.0.0 TX/RX blinks green

to connect: debug->connect; run/pause steady red; tx/rx cycles red/green/orange && good connection (don't care about executing code right now)

 

The VM is an Oracle Virtual Box 4.3.27 r98716

 

 

Windows 7:

Jungo driver WinDriver 5/12/2013 ver 11.3.0.0

several USB HID devices

With the XP VM:

one USB HID location 0 USB tablet, microsoft 7/1/2-001 ver 5.1.2600.2180

When the USB TAP is plugged in, TX/RX blinks green

under system devices -> CW USB TAP, freescale, location 0 8/20/2007 version 9.0.0.0

--- if you goto the VM devices list and unselect the USB TAP, RX/TX blinks red because the device is not selected - this makes sense

-- the USB TAP is in the USB device filter on boot.

WHEN THE VM IS RUNNING ON THE WIN7 box

device manager reports:

USB Controllers -> Virtual Box USB: Oracle; location Port#0002.Hub_#0003; 3/2/2015 ver 4.3.24.0

 

USB TAP plugged into target board; power to target board ON.

 

Attempt to connect to the USB TAP:

debug->connect

get error message "ColdFire CCS Protocol Adapter: USB open failure"

TX/RX blink LED and run-pause off during connect attempt.

 

The log reports:

 

CCS:    ccs_open

CCS:                ipaddr = 127.0.0.1

CCS:                port = 41475

CCS:                timeout = 60

CCS:                serverh = 0

CCS:                return value = connection_refused

CCS:            ccs_open 

CCS:    ccs_open

CCS:                ipaddr = 127.0.0.1

CCS:                port = 41475

CCS:                timeout = 60

CCS:                serverh = 0

CCS:                return value = ok

 

What?? Why the Ethernet attempt to itself?

 

CCS:            ccs_open 

CCS:    ccs_get_connection_count

CCS:                serverh = 0

CCS:                count = 1

CCS:                return value = ok

CCS:            ccs_get_connection_count 

CCS:    ccs_available_connections

CCS:                serverh = 0

CCS:                cc: (size = 1)

CCS:                cc[0]:: cc_index=0; cc_type=0x0; cc_param=0

CCS:                return value = ok

CCS:            ccs_available_connections 

CCS:    ccs_delete_cc

CCS:                serverh = 0

CCS:                count = 0

CCS:                return value = ok

CCS:            ccs_delete_cc 

CCS:    ccs_config_cc

CCS:                serverh = 0

CCS:                config_string = utap_bdm:0

CCS:                return value = ok

CCS:            ccs_config_cc 

CCS:    ccs_config_driver

CCS:                return value = usb_open_failure

CCS:            ccs_config_driver  ; duration=10 ms (***1)

CCS:    ccs_kill_server

CCS:                serverh = 0

CCS:                return value = ok

CCS:            ccs_kill_server 

 

NOTE (***1) the duration is normally 0.

I went into edit->preferences->Debugger->Remote Connections -> selected USB-TAP BDM ->change

and set the CCS timeout from 10 to 100. (I/F Clock Freq = 5.120 MHz; tried 1.00 MHz still failed) (use default serial number)

 

So: Questions:

 

1) why can I not connect when going through the VM?

 

2) Both USB devices (mouse/tablet and USB-TAP) report location 0 - and does not appear I have any way to change the location of either to a non-zero value

 

3) (more curiosity) Why is the initial connection to 127.0.0.1 (viz itself) over Ethernet?

 

This is starting to be come irritating. I have searched what I know, will continue to search.

 

Client bought a $6K seat - should come with some tech support - looking for the invoice right now.

 

Thanks ... bandit

Labels (1)
0 Kudos
1 Solution
1,698 Views
trytohelp
NXP Employee
NXP Employee

Hi,

Good to know this workaround is running for Coldfire V7.2 on Win 7 64 bit too.

      I was co-writter on this AN.

Most of the time customers using Coldfire Architectures are using P&E Multilink interface.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
8 Replies
1,698 Views
trytohelp
NXP Employee
NXP Employee

Hi,

You've 2 PCs.

PC_1 is using Win XP and PC_2 is using Win 7.

Under PC_2 you've installed VirtualBox and created an XP emulation.

On both PCs you've installed CW for Coldfire V7.2.

Regarding the hardware, you've an USBTap interface.

What is the Win 7 version ?

      32 or 64 bit ?

Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
1,698 Views
banditgangwere
Contributor I

I found the answer.

To your question, just to be clear on the environment:

Single PC, running 64-bit Windows 7.

On that PC, running an Oracle VM with XP, CodeWarrior 7.2 installed (and both patches)

The USB TAP BDM plugged into the PC

The VM device list includes the USB TAP device, with the TX/RX led blinking green.

The solution: Freescale Appnote AN4338 (Rev 1.0; 12/2011): Windows 67: Using USB TAP on a Classic CodeWarrior Installation. (MGT V9.2 - DSC V8.3)

Basically, the "ccs" which does the connection to the USB TAP does not run properly on Windows 7 64-bit. You need to replace the usb driver within the VM with a new ccs driver.

the basic sequence is to replace the (VM) ccs tree in the Coldfire tree with the new ccs tree, then re-install the usb tap driver (which is under (VM) device manager -> system devices) with the 64-bit ccs driver (found at C:\Program Files\Freescale\CodeWarrior for ColdFire V7.2\ccs\drivers\usb\x64). The VM device manager then shows the USB TAP driver (a) removed from system devices and (b) installed at the higher level as (LibUSB-Win32 Devices ->  CodeWarrior USB TAP)

Test: Within CodeWarrior, do debug -> connect. A window with ASM code should appear. The USB TAP pod TX/RX led cycles red/green/amber, and the run/pause led is red.

Thanks for the timely response.

... bandit

0 Kudos
1,699 Views
trytohelp
NXP Employee
NXP Employee

Hi,

Good to know this workaround is running for Coldfire V7.2 on Win 7 64 bit too.

      I was co-writter on this AN.

Most of the time customers using Coldfire Architectures are using P&E Multilink interface.


Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
1,698 Views
banditgangwere
Contributor I

If you are thinking about updating the appnote, a couple of details would be nice to note

(1) not really obvious in the case of running under a VM on exactly how the USB drivers for both sides (the VM and the Windows 7 64-bit) are communicating. I can see where this might be beyond the scope of the specific Appnote, but if you have an Appnote on the VM vs Win7 drivers, please reference each in the respective Appnotes.

(2) If the USB-TAP is plugged in, but the VM is not running, the USP-TAP looks like this in the device manager

Win7_USB-TAP_VM_not_started.PNG.png

and the properties state the USB-TAP device driver is not loaded. This can lead to someone updating to the ccs 64-bit driver - I have not explored the specific case, but I think (based on the old ccs) that the device would end up in the system device list

(3) Although i did not note it in the document I attached to a previous post, if the HOST (Win7) side drivers are not properly setup, when the VM is started, it starts to load XP, then part way thru the boot sound, the VM will just quit. Specifically, the VirtualBox and Jungo drivers under Win7 need to be working correctly or you will see the VM failure.

This also  happened when the VM was aborted because of  a Microsoft Tuesday update which rebooted the system. Took a couple of load sequences to shake out the problems.

BUT - the appnote was the key to several days of creating a head-sized hole in the wall. Took a bit of thinking to adapt to the VM, but it was one of the keys.

CODE WARRIOR FOLKS: you have TOO MANY places to set the programming pod. At a minimum, you need a method of CONSISTENCY checking for us poor engineers, esp us old-farts who are not used to these fancy IDEs that HIDE stuff.

0 Kudos
1,698 Views
banditgangwere
Contributor I

See the attached PDF file. It has step-by-step instructions and screenshots of various drivers, IDE popups, etc. It also has a note about disabling the watchdog (if you have an external one) - ignore the part about a specific board - the critical thing is the MAX watchdog chip as an example and what to do to disable the watchdog.

0 Kudos
1,698 Views
trytohelp
NXP Employee
NXP Employee

Hi,

Thanks a lot for the info and the doc.

Some points I want to share.

1- By default CW for Coldfire V7.2 was designed for Win XP OS.

The tool is running fine under XP.

2- The AN was created to allow users to use USBTap when CW for DSC V8.3 and CW for MGT V9.2 were installed on Win 7.

Under Win XP you don't need to change the CCS.

The tools installed on Win XP are working fine.

3- On my side I tested the VirtualBox + Win XP for DSC V8.3.

After the USBTap was connected with default installation I can debug it without problem (without new CCS).

Can I install CW for Coldfire V7.2 under Win 7 ?

    Yes you can install it.

    In this case you must install new CCS folder.

Can I install CW for Coldfire V7.2 under Win XP via VirtualBox?

    Yes.

    It should work without new CCS.

Problem with Virtualbox and other OS emulation.

Most of the time when you plug the device the first time it's not always connected.

Sometimes we need to unplug/replug the interface.

At second time the interface (USBTap) is correctly running.

Have a great day,
Pascal
Freescale Technical Support
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
1,698 Views
banditgangwere
Contributor I

Thanks for the added notes.

Appreciate your timeliness and attention!

... bandit

Pascal Irrle

replied to the discussion

"usb connection fail"

To view the discussion, visit:

https://community.freescale.com/message/491642?et=watches.email.thread#491642

>

0 Kudos
1,698 Views
banditgangwere
Contributor I

Forgot to add the MPU is a 52258 (but for some reason parts of the configuration wants 52259...)

0 Kudos