Xtag random connections

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
User avatar
mike34
Member
Posts: 10
Joined: Thu Apr 08, 2010 2:33 pm

Xtag random connections

Post by mike34 »

I write and ask in here as i think there are many people developing and that means maybe someone else but me experiencing the same or similar issues.
I have one copy of USB audio 2.0 ref board and 2 Xtag adapters(same problem with both).
I run win 7. Have XDE 9.9.2 and the signed tagdrivers.
The problem i have i cant really explain except it gives different error messages related to connecting to the target. This happens with debug, xrun or shooting a firmware.
Now to solve the problem allways is easy but a bit annoying, all i have to do is to unplug the xtag from USB and stick it back in and its fine again for a while.
I tried to stick both the xtag and the USB audio card directly into each USB connector so i dont think its a problem with powersupply.
One thing that might hint is that when the firmware missbehaves because of a programming error or similar then allmost 100% sure i get problems running a new debugsession. But then again i can run debug of a wellbehaving firmware for hours with a few restarts or changes in the code and still end up in connection issues that to me seems random. I dont use breakpoints,stepping or get suspended tasks, just run the code. When i run a new version xdbg halts and removes the old but then it can fail to launch the new. Saying in XDE connect 0 ...... and then popup telling me (unable to open target interface). I tried in commandline to fiddle with the same but its no difference really so i suspect its lower level. Xtag is visible in the devicelist as normal when this happens, can be useful to know.

Is there another person except me that have these issues or anyone who knows what to do to cure this?

/Mikael


User avatar
mike34
Member
Posts: 10
Joined: Thu Apr 08, 2010 2:33 pm

Post by mike34 »

Did some further tests.

In windows devicelist i can normally disable and enable the XTAG device as many times as i like. Well when this situation occurs the device is still visible as normal and i can disable it, but when I try to enable it again windows thinks its an unknown device.
A reboot of the computer does not help, I have to unpower the device and plug it in again for all to get back to normal.
Does this give any more clues ?
bearcat
Respected Member
Posts: 283
Joined: Fri Mar 19, 2010 4:49 am

Post by bearcat »

As on my prior post, I also am having a flaky XTAG2. They sent me a replacement, and it works much better. Same problem, the XTAG2 will go out, and give unknown device in windows. My first one only lasts <50 operations before failure. The new one I have only used maybe 20 minutes, and only saw one failure, better.
Last edited by bearcat on Fri Apr 16, 2010 5:37 pm, edited 2 times in total.
User avatar
mike34
Member
Posts: 10
Joined: Thu Apr 08, 2010 2:33 pm

Post by mike34 »

Hello Bearcat

Yes I read your own thread about xtag2 problems and at first glance it didnt to me look like it was the same problem, but after testing with the device in windows some more and comparing I think its exactly the same problem we are experiencing.
I have not run any debugging step by step yet as I feel i havent even got started developing or doing any real work but rather ran into this annoying problem with the development kit.

What is really happening in the XTAG2 when it gets stuck like that. As I understand the OTP on the device contains a small loader that sucks up the rest of the code from USB runtime.
I guess in one way or another this code is still processing as long as the device have power hence reboot isnt gonna fix the problem only powercycle will help. So if windows cant recognize the device it must me for some reason, is the code running havoc inside the L1? trapped in some exceptionstate and cannot respond to USB or whats going on?
I have to tell you that I use or did use a 12-15 cm long ribboncable extending the 20 pin connection and with that cable plugged in it have not behave nor better or worse so I cant really say its sensitive in that way or maybe on a level not affected by a bit longer path.

So debugging the debugger is where I have to start to find an answer?
Im not sure but I have a weak memory of reading somewhere that the USB soundcard is cranked up in speed also, if this is true will that put more stress on this XTAG-2 device and maybe thats the reason it cant behave ?
User avatar
Andy
Respected Member
Posts: 279
Joined: Fri Dec 11, 2009 1:34 pm

Post by Andy »

Unfortunately I don't own an Xtag 2 or the audio board, so I can't help much. I'd be surprised if it was a general hardware problem with the Xtag, as I haven't seen anyone using it with an XK-1 experience the same problems.

If you haven't done so already, I recommend creating a support ticket to get in touch with XMOS directly about this problem.
User avatar
leon_heller
XCore Expert
Posts: 546
Joined: Thu Dec 10, 2009 10:41 pm
Location: St. Leonards-on-Sea, E. Sussex, UK.

Post by leon_heller »

I've not had any problems using it with the XK-1. I have Win7 x64 on my laptop, and I use WinXP on my desktop PC. Perhaps the problem is something to do with the target board.
bearcat
Respected Member
Posts: 283
Joined: Fri Mar 19, 2010 4:49 am

Post by bearcat »

The XK1 does have buffers on the target board, as I mentioned above. I also believe it is running at 400MHz instead of 500 on the audio board.

I haven't had time to debug the XTAG2 since I received the second one. So I haven't gotten back with XMOS yet.

I still think we need to be able to lower the JTAG frequency. I don't mind taking a little longer to debug, and not needing any buffers on the target boards that adds cost.
Last edited by bearcat on Fri Apr 16, 2010 5:45 pm, edited 1 time in total.
User avatar
Woody
XCore Addict
Posts: 165
Joined: Wed Feb 10, 2010 2:32 pm

Post by Woody »

If you want to reduce the jtag scan speed you can do so using xrun's 'jtag-speed' option. E.g.
xrun --jtag-speed 10

Or in xgdb:
connect --jtagspeed 10
bearcat
Respected Member
Posts: 283
Joined: Fri Mar 19, 2010 4:49 am

Post by bearcat »

Thanks woody. But can you help me understand where to specify that for xgdb. Found option in manual, ok. Parameter is a divider for the JTAG freq, ok. Connected a scope, default JTAG freq is 12.5MHz.

If I use XMOS's IDE (Eclipse) to debug on Windows, where do I configure this? Tried adding it to the debug configurations / arguments: connect --jtagspeed 10. It does execute in the command window for gdb, says ok. But runs after an attach command, which I figure is not correct. No change in JTAG Freq. Could not find any config files to modify.

Bear with me, I am not an Eclipse expert or gdb expert (yet).
User avatar
Woody
XCore Addict
Posts: 165
Joined: Wed Feb 10, 2010 2:32 pm

Post by Woody »

I'm afraid you can't do it within Eclipse at the moment. I'll submit a bug and we'll try and get that sorted soon: thanks for highlighting the problem.

To get you going and to determine if there actually is a problem with the JTAG speed on your setup you need to work on the command line with xgdb. Try this to get the xgdb running:

Code: Select all

xgdb mycode.xe
You can then connect (setting the JTAG speed), load and run the code, stop the code and investigate the results something like this:

Code: Select all

connect --jtagspeed 10
run
<cntl-C>
info registers
If you get the same results with and without the jtagspeed switch, then there is not a problem with the jtag speed.