Getting Started with the StarterKit

All technical discussions and projects around startKIT
IraqiGeek
Member++
Posts: 23
Joined: Wed Dec 18, 2013 3:10 pm

Re: Getting Started with the StarterKit

Postby IraqiGeek » Mon Dec 30, 2013 6:18 am

I am still unable to find any docs that talk in detail about clock blocks and their configuration. The Ports Specification document skims over configuring a port to use the reference (100MHz) clock block or other configurable blocks, but there are no details as to how said blocks can be configured.

For starters, is this 100MHz reference still valid for the 500MIPS models? or is it now 125MHz?

Page 14 talks about set_port_* functions (mentioning inv, delay and pull_up), but doesn't list all the available functions. In another document, I read pins are tri-state by default, but can be configured to have internal pull-ups or pull-downs. So, is there a set_port_pull_down? Are there any others? I realize I could just fire xTimeComposer and check, but I prefer to read as much as I can about a new platform to get a better idea of the various ways I can accomplish what I want to do and choose the way that suits me best.

Speaking of xTimeComposer, its User Guide isn't. Mostly, its a XC language reference. The little parts left talk about xSOFTip. I realize its based on Eclipse, but do I have to go look at Eclipse tutorials to learn how to use xTimeComposer?

SparkFun's old Eagle tutorials series are a perfect example of simple tutorials that get new people off their training wheels. Each of the three has less than two pages worth of text and explains only the basic stuff people need to know to start using the tool. Would be really great if something like that existed for XTimeComposer.

Serialization/deserialization width is also a bit unclear. Can it have any arbitrary width (ex: 9, 12, 14, or 18 bits)? Or is it limited to 1, 4, 8, 16, 32 bits? What is the FIFO behavior in such if such cases are possible?

Oh, and googling for Xmos timers yielded this really nice XC guide that I haven't seen referenced in all the other documents I've read so far
mrdunky
New User
Posts: 3
Joined: Fri Jul 13, 2012 12:46 am

Postby mrdunky » Mon Dec 30, 2013 2:24 pm

Hi,
In the hope that these comments will eventually make it into a "Common Problems"/Startup Guide, here are the issues I had so far (spent several hours trying to get started, but still no-where in sight):
1. When starting up xTimeComposer, I would normally get "failed to start Java Virtual Machine"
Eventually resolved by changing the -XX:MaxPermSize setting in xtimecomposer.ini
http://www.xcore.com/forum/viewtopic.php?f=26&t=1899

2. The startKIT tutorial says "The fastest way to start developing with startKIT is to import an application from the xCORE Community repository", and describes the "Community" panel in the xTimeComposer. Unfortunately, my community panel says "Refreshing", but never shows anything. Blank. There is an Online/Offline button, but it does not tell you which is which, so I don't know if I am doing something wrong. Also I found a progress window, and this says refreshing Community View, but nothing happens. There are no screen shots in the Tutorial, so I don't know what it should look like. Lastly, although the tutorial says "The fastest way to start....", it does not give any links to any alternative (slower) methods. It also says "Click here to automate this step", but the link does not do anything. (this looks like a browser window, but I cannot tell if there is a network problem, as I don't get the normal browser messages/errors).

Now I am stuck, and I can only try doing the same thing on a different network, doing a network trace to see if messages are really being sent, and perhaps plugging in the startKIT first before doing any of this (maybe I can only do this if it is plugged in).

[Update: 2014/01/06: Problem 2 resolved. Was a slow connection (not dead, as this was the same connection as I did the time composer download on). Now moving forward]
Last edited by mrdunky on Mon Jan 06, 2014 3:03 pm, edited 1 time in total.
marssystems
Member++
Posts: 17
Joined: Mon Dec 16, 2013 11:44 pm

Postby marssystems » Mon Dec 30, 2013 2:50 pm

It sounds like you don't have a 'Live' internet connection - check your router.
User avatar
segher
XCore Expert
Posts: 843
Joined: Sun Jul 11, 2010 1:31 am

Postby segher » Mon Dec 30, 2013 5:06 pm

Clocks...

The first thing you need to know is that all the defaults are
totally reasonable, and the tools take care of the few remaining
details, so you do not need to bother with any of it unless
you know that you do ;-)

The PLL (on a tile) generates the system clock (usually 500MHz),
which is fed through a divider to get the reference clock
(normally 100MHz). You say in the XN file what you want
these clocks to be, and the tools take care of it for you.
The startkit uses these usual values.

Clock blocks... You can have a clock block fed from the system
clock, from the reference clock, or from a 1-bit port. The
clock block can divide the frequency, and you use its output
to clock other things. Clock block #0 normally outputs the
undivided reference clock. Ports by default use this clock block.

Then there are the timers. I forgot if these are clocked from
the reference clock or from clkblk #0; that is normally the
same frequency anyway.

Finally port counters; these tick with the clock used for that
port.
User avatar
segher
XCore Expert
Posts: 843
Joined: Sun Jul 11, 2010 1:31 am

Postby segher » Mon Dec 30, 2013 5:13 pm

Buffered ports can use any (positive ;-) ) multiple of the
port width as transfer width, with a maximum of 32 bits.
You usually use either the port width or 32, whichever is
most convenient or most efficient, but other things work
as well. You can also do partial transfers to handle leftovers.
IraqiGeek
Member++
Posts: 23
Joined: Wed Dec 18, 2013 3:10 pm

Postby IraqiGeek » Mon Dec 30, 2013 7:39 pm

segher wrote: The first thing you need to know is that all the defaults are
totally reasonable, and the tools take care of the few remaining
details, so you do not need to bother with any of it unless
you know that you do ;-)
I know they are reasonable. My questions are about where this is documented?
segher wrote: The PLL (on a tile) generates the system clock (usually 500MHz),
which is fed through a divider to get the reference clock
(normally 100MHz). You say in the XN file what you want
these clocks to be, and the tools take care of it for you.
The startkit uses these usual values.
So, its still 100MHz. Good to know.

Any doc that explains/details how to do that?
segher wrote: Clock blocks... You can have a clock block fed from the system
clock, from the reference clock, or from a 1-bit port. The
clock block can divide the frequency, and you use its output
to clock other things. Clock block #0 normally outputs the
undivided reference clock. Ports by default use this clock block.
Say I need a 30MHz SPI port, can I derive the 30MHz clock internally? Or do I need an external clock? Is it possible to use a programmable oscillator (something like a DS1077) as a clock source (5V)? IE: are pins 5V tolerant?

EDIT: Per Bianco's reply on another thread, the StarterKit is not 5V tolerant. Any recommendations for a simple to configure and use, cheap, programmable oscillator?
segher wrote: Then there are the timers. I forgot if these are clocked from
the reference clock or from clkblk #0; that is normally the
same frequency anyway.
Any doc(s) that explain how to use timers? How are they configured, etc?
segher wrote:Buffered ports can use any (positive ;-) ) multiple of the
port width as transfer width, with a maximum of 32 bits.
You usually use either the port width or 32, whichever is
most convenient or most efficient, but other things work
as well. You can also do partial transfers to handle leftovers.
SPI and I2C are two examples where a user wouldn't use neither port width nor 32-bit.

Say I have a 9-bit SPI peripheral. Is it possible to configure the port as 9-bit? Will I get 3 words worth of buffering? And as always, where is this documented in detail?
Last edited by IraqiGeek on Tue Dec 31, 2013 4:14 am, edited 2 times in total.
IraqiGeek
Member++
Posts: 23
Joined: Wed Dec 18, 2013 3:10 pm

Postby IraqiGeek » Mon Dec 30, 2013 7:49 pm

mrdunky wrote: 2. The startKIT tutorial says "The fastest way to start developing with startKIT is to import an application from the xCORE Community repository", and describes the "Community" panel in the xTimeComposer. Unfortunately, my community panel says "Refreshing", but never shows anything. Blank. There is an Online/Offline button, but it does not tell you which is which, so I don't know if I am doing something wrong. Also I found a progress window, and this says refreshing Community View, but nothing happens. There are no screen shots in the Tutorial, so I don't know what it should look like. Lastly, although the tutorial says "The fastest way to start....", it does not give any links to any alternative (slower) methods. It also says "Click here to automate this step", but the link does not do anything. (this looks like a browser window, but I cannot tell if there is a network problem, as I don't get the normal browser messages/errors).

Now I am stuck, and I can only try doing the same thing on a different network, doing a network trace to see if messages are really being sent, and perhaps plugging in the startKIT first before doing any of this (maybe I can only do this if it is plugged in).
This is a perfect example of why having a hello world tutorial is way more useful, and actually faster beyond the first few minutes, than importing existing projects.

xTimeComposer User Guide isn't much help in this regard. No screen shots here either. The assumption is that people coming to the platform already know the Eclipse UI like the palm of their hands.

Give a man an imported project, and he'll compile for a day. Teach him how to create a project, and he'll compile for a lifetime :P
User avatar
segher
XCore Expert
Posts: 843
Joined: Sun Jul 11, 2010 1:31 am

Postby segher » Mon Dec 30, 2013 8:48 pm

Yes, the documentation web pages are a pain to navigate.
Yes, given the startkit audience there should be a lot more
beginner documentation.
Yes, the documentation is incomplete in places, and even
contains the occasional error.

But if you haven't read the available documentation, you
do not get to complain about it.

Yes, you need to dive in, read the docs, experiment and
play around with the hardware and software, until something
clicks and you just know in your bones what to do. It's
called "learning".

</rant>
marssystems
Member++
Posts: 17
Joined: Mon Dec 16, 2013 11:44 pm

Postby marssystems » Mon Dec 30, 2013 8:49 pm

9-bit SPI? How does that work then?
SPI is a 4 wire Master/Slave setup so you will never need more than 4 pins to connect to.
User avatar
Bianco
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Postby Bianco » Mon Dec 30, 2013 9:00 pm

marssystems wrote:9-bit SPI? How does that work then?
SPI is a 4 wire Master/Slave setup so you will never need more than 4 pins to connect to.
9-bit words instead of the more common 8-bit words

Who is online

Users browsing this forum: No registered users and 2 guests