Max usb tranfer speed on Startkit?

All technical discussions and projects around startKIT
User avatar
asid61
Active Member
Posts: 36
Joined: Sat May 31, 2014 6:39 am

Max usb tranfer speed on Startkit?

Postby asid61 » Sun Jul 20, 2014 8:15 am

I'm looking at transferring an array of 160 integers over the usb on the startkit. Each integer only needs to store up to a 16-bit value though, so I need to transfer a total of 2560 bits per packet.
I need to transfer these bits aat a minimum speed of 1000 times per second (so 2.56Mbits per second). However, I noticed that printing the values via the text window in the editor is extremely slow. How can I read the data via a c or java program external to the Composer tools? And is this kind of speed possible for the Startkit?
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm

Postby Folknology » Sun Jul 20, 2014 11:44 am

You might want to try using xscope realtime probing to move values back to the host. You can use the command line Xrun in --xscope-realtime mode to provide these via a socket interface. Not sure how fast it would be, it has a relatively low latency (compared to print) so well worth trying.

regards
Al
User avatar
asid61
Active Member
Posts: 36
Joined: Sat May 31, 2014 6:39 am

Postby asid61 » Mon Jul 21, 2014 9:33 am

Folknology wrote:You might want to try using xscope realtime probing to move values back to the host. You can use the command line Xrun in --xscope-realtime mode to provide these via a socket interface. Not sure how fast it would be, it has a relatively low latency (compared to print) so well worth trying.

regards
Al
Thank you very much! XScope looks like it can port data very quickly.
I still have a couple questions though:
1. XScope is not working properly for me. Is there a tutorial for using the XScope somewhere? Example programs have not worked for me. It keeps on spitting out "undefined reference" errors even though I have included xscope.h

2. How can I access data sent over USB by the Starkit via an external program (without the Composer)? I need to manipulate the data in a 3D model on a different program.
User avatar
Folknology
XCore Legend
Posts: 1274
Joined: Thu Dec 10, 2009 10:20 pm

Postby Folknology » Mon Jul 21, 2014 11:04 am

asid61 wrote:
Folknology wrote:You might want to try using xscope realtime probing to move values back to the host. You can use the command line Xrun in --xscope-realtime mode to provide these via a socket interface. Not sure how fast it would be, it has a relatively low latency (compared to print) so well worth trying.

regards
Al
asid61 wrote: Thank you very much! XScope looks like it can port data very quickly.
I still have a couple questions though:
1. XScope is not working properly for me. Is there a tutorial for using the XScope somewhere? Example programs have not worked for me. It keeps on spitting out "undefined reference" errors even though I have included xscope.h

2. How can I access data sent over USB by the Starkit via an external program (without the Composer)? I need to manipulate the data in a 3D model on a different program.
1) Make sure you add xscope to the XT Composer project settings (or manually add -fxscope to your XCC_FLAGS in your Makefile).
2. When you run 'xrun --xscope-realtime bin/yourbinary.xe' on the command line it will pass the xscope data from the startkit usb to a socket interface which you can access programatically. If you want to see what the data looks like try running 'xrun --xscope-file xscopedata/somedatafile bin/yourbin.xe' then peruse 'somedatafile' contents, or just redirect the output to the console.

regards
Al
User avatar
asid61
Active Member
Posts: 36
Joined: Sat May 31, 2014 6:39 am

Postby asid61 » Tue Jul 22, 2014 7:24 am

Folknology wrote:
asid61 wrote:
Folknology wrote:You might want to try using xscope realtime probing to move values back to the host. You can use the command line Xrun in --xscope-realtime mode to provide these via a socket interface. Not sure how fast it would be, it has a relatively low latency (compared to print) so well worth trying.

regards
Al
asid61 wrote: Thank you very much! XScope looks like it can port data very quickly.
I still have a couple questions though:
1. XScope is not working properly for me. Is there a tutorial for using the XScope somewhere? Example programs have not worked for me. It keeps on spitting out "undefined reference" errors even though I have included xscope.h

2. How can I access data sent over USB by the Starkit via an external program (without the Composer)? I need to manipulate the data in a 3D model on a different program.
1) Make sure you add xscope to the XT Composer project settings (or manually add -fxscope to your XCC_FLAGS in your Makefile).
2. When you run 'xrun --xscope-realtime bin/yourbinary.xe' on the command line it will pass the xscope data from the startkit usb to a socket interface which you can access programatically. If you want to see what the data looks like try running 'xrun --xscope-file xscopedata/somedatafile bin/yourbin.xe' then peruse 'somedatafile' contents, or just redirect the output to the console.

regards
Al
Thank you so much! I got it working, and it's definitely fast enough for my needs. More speed couldn't hurt, but I won't need any more speed for a long time.
User avatar
XMatt
XCore Addict
Posts: 147
Joined: Tue Feb 23, 2010 6:55 pm

Postby XMatt » Thu Jul 24, 2014 3:36 pm

There is an library for implementing the communication with xscope host applications here if you want to see how to parse the data from the socket interface from xrun.

https://github.com/xcore/sc_xscope_support

Who is online

Users browsing this forum: No registered users and 1 guest