Further XMOS exploration

http://www.element14.com/community/groups/internet-of-things/blog/2014/05/05/xmos-startkit-introduction-terminologyarchitecture-getting-started-and-example-programs

http://www.element14.com/community/community/raspberry-pi/raspberrypi_projects/blog/2014/05/22/xmos-startkit-building-an-xmos-and-raspberry-pi-robot-xmp-1

http://www.element14.com/community/community/raspberry-pi/raspberrypi_projects/blog/2014/06/22/xmos-startkit-xmos-and-raspberry-pi-oscilloscope-xae-1000

Lots of examples:

https://github.com/dwelch67/xmos_samples/tree/master/startKIT

XmosStartKit/StartKit-Hacking at master · r4d10n/XmosStartKit

https://github.com/r4d10n/XmosStartKit/blob/master/StartKit-Hacking

macgyver.sh.cvut.cz/wiki/vybaveni/demo_boardy/xmos_startkit

http://buildlog.net/cnc_laser/xmos_controller.php

http://amigadrive.blogspot.sg/2013/11/how-use-raspberry-pi-as-amiga-floppy.html

From here:

https://github.com/dwelch67/xmos_samples/tree/master/startKIT

is described in detail how the LED light is programmable to generate any desired pattern:

So as of this writing in XMOS/xTIMEcomposer/Community_13.0.1/configs.  
I see the file XS1-UnA-64-FB96.pkg.    In that file I see

        <Pin name="X0D68">
            <Port bitNum="17" core="0" name="XS1_PORT_32A" node="0" priority="0"/>
            <XLink bitNum="2" dir="in" node="0" number="1"/>
        </Pin>
        <Pin name="X0D69">
            <Port bitNum="18" core="0" name="XS1_PORT_32A" node="0" priority="0"/>
            <XLink bitNum="3" dir="in" node="0" number="1"/>
        </Pin>
        <Pin name="X0D70">
            <Port bitNum="19" core="0" name="XS1_PORT_32A" node="0" priority="0"/>
            <XLink bitNum="4" dir="in" node="0" number="1"/>
        </Pin>

From the schematic, we see
X0D70
X0D69
X0D68
X0D63
X0D62
X0D61
X0D58
X0D57
X0D56

are tied to the leds.  And that all seems to match, except that the
XS1-A8A-64-FB96 datasheet does not have these

X0D69
X0D68
X0D63
X0D62
X0D61
X0D58
X0D57
X0D56

The config file does though.  curious.

So the port is XS1_PORT_32A and these bits in that port are tied to leds

X0D70 is bit 0x80000
X0D69 is bit 0x40000
X0D68 is bit 0x20000
X0D63 is bit 0x01000
X0D62 is bit 0x00800
X0D61 is bit 0x00400
X0D58 is bit 0x00200
X0D57 is bit 0x00100
X0D56 is bit 0x00080

From the schematic the led is tied between 3.3v and the gpio port, so
making the pin high turns the led off (led has 3.3v on both ends, no
current) and making the pin low turns the led on (led has 3.3v on
one end and ground, 0v, on the other, current flows).

They way their code (and now mine) works all 32 bits in that port are
getting written to AFAIK, so it requires more investigation to know
what those other port pins are tied to and whether or not to run examples
that write the whole port (without doing a read-modify-write) if the
board is connected to something and not sitting there by itself.

Start with the figure8 example then ablink01 if interested.

Between the Raspberry Pi and startKIT documentation this is the pinout
for the connection

Raspberry Pi connector
pin raspi       startkit

1   GND         (nc)
3   SDA1        X0D49
5   SCL1        X0D70
7   GPIO_GCLK   X0D69
9   GND         GND
11  GPIO_GEN0   X0D61
13  GPIO_GEN2   X0D58
15  GPIO_GEN3   X0D57
17  GND         (nc)
19  SPI_MOSI    X0D0
21  SPI_MISO    X0D11
23  SPI_SCLK    X0D10
25  GND         GND

2   5.0v        (nc)
4   5.0v        (nc)
6   GND         GND
8   TXD0        X0D68
10  RXD0        X0D63
12  GPIO_GEN1   X0D62
14  GND         GND
16  GPIO_GEN4   X0D56
18  GPIO_GEN5   (nc)
20  GND         GND
22  GPIO_GEN6   (nc)
24  SPI_CE0_N   X0D51
26  SPI_CE1_N   X0D50

So the uart comes into the XMOS on X0D68 and out the XMOS on X0D63, the
Raspberry Pi spi connections are there, something to play with as well
along with some generic gpio.

Lots of hacking with XMOS:

https://thexmoschallenge.wordpress.com/

http://buildlog.net/cnc_laser/xmos_controller.php

http://picatout-jd.blogspot.sg/2014/01/xmos-startkit-generation-signal-vga.html

And from below is shown how to program the XMOS STARTKIT directly, without using Eclipse tool:

http://www.xcore.com/questions/2150/can-i-connect-two-startkits-xmos-links

…..connect two startkits together via links and boot them from SPI. The steps should be as follows:

1. Compile a two tile application with the attached .xn file. You can only use one of the ADC tiles (it isn’t possible to include both in the network since they would have the same routing ID). For example:

xcc app.xc 2_STARTKITS.xn -o app.xe

2. Next generate two flash binary images:

xflash app.xe --noinq --boot-partition-size 0x20000 -o flash_image

This will create two images (flash_image_0 and flash_image_1).

3. Finally write the flash images over jtag:

xflash --id <board_0_id> --write-all flash_image_0 --target STARTKIT
xflash --id <board_1_id> --write-all flash_image_1 --target STARTKIT

4. If you power cycle both boards at the same time they should boot into the two tile application you’ve written to the flash.

Example XN file for combined devices is shown below.

http://www.xcore.com/sites/default/files/2_STARTKITS.xn_.txt

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: