XTAG2 and USB

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
User avatar
rp181
Respected Member
Posts: 395
Joined: Tue May 18, 2010 12:25 am

XTAG2 and USB

Post by rp181 »

The XTAG has UART pins that it converts to USB, which can be read through a virtual COM port. Can the same be done, but through the XLINK for faster speeds (Hi-Speed)?


User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

User avatar
rp181
Respected Member
Posts: 395
Joined: Tue May 18, 2010 12:25 am

Post by rp181 »

Hmm, I was under the impression that XScope was something entirely different. In my case, I need to stream data to the computer as fast as possible (not debug, actual info). That document talks about using a redirect of printf, but in my experience, printf is extremley slow. If I just need to send, say, integers, is there a faster way?

Also, it says for flash deployment, you have to remove the link. Is there a way to automatically detect whether XTAG is connected?

Is there duplex communication, and does the stream appear as a virtual COM port (I need to access the info from a Java program)?
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

printf is one of the options, but you do not need to use printf!
With xscope you can send data over the xmos link that will be logged and saved on the host computer in a XML file. Have you seen the example XML file in that document?

It's single direction at the moment and it does not appear as a virtual com port.
Instead you run your application with xscope on and when you terminate it you will have an XML file with all the logged data. the XDE has some fancy features to display this data in graphs etc.

I haven't tested the transfer rates yet but i think that 4-5MB/seconds at least should be achievable.
Maybe it goes up to full link speed and link utilisation. Much will depend on how fast your host computer is!
I'm not sure whether the received data will be completely buffered before writing it to the XML file.
At high rates without buffering this will be a huge problem because generating the XML file adds a lot of overhead. For example with 10MB/s raw xmos link data (integers or whatever) you problably need to generate the XML file at 200MB/s or more and being able to write it to the disk.
User avatar
rp181
Respected Member
Posts: 395
Joined: Tue May 18, 2010 12:25 am

Post by rp181 »

Ah, too bad. I need a real-time (or close to it) and duplex solution. However, this is very useful for profiling stuff - should be of great use in the future!

EDIT: So I have been trying to get my computer to see the Virtual COM port from the XK1. I just now realized that I was using an XC-1A before, which is ftdi based. I found some old threads basically saying you couldn't do that with the XTAG (access w/ out propietary, or COM port). Has this changed?
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

This has not changed to my knowledge.