Manual

XA-SK-GPIO Slice Card Hardware Guide

Pack Contents

  • One XA-SK-GPIO Slice Card

GPIO Access Features

  • A variety of XMOS ports of 1 bit, 4 bit and 8bit type are exposed for access via 0.1” headers.
  • Access to 4 LEDs via a 4 bit port
  • Two push buttons are connected via a 4-bit port
  • A small prototyping area is provided

RS232 UART

  • A pair of 1 bit ports (1 each for RX and TX) are used with an RS232 transceiver and DB9 connector to provide a standard UART terminal running up to 115.2 KBaud which can be connected to any PC COM port or Serial-to-USB adapter.

4 Channel ADC With xternal Temperature Sensor

  • An ADC with a standard 2-wire interface is provided, with an external linearised thermistor connected to the first ADC channel. The remaining 3 ADC channels are exposed on testpoints.

This table shows the port mapping for each of the Slice Card Signal IO, and the Slicekit Slot connector pin it is located on.

Function

STAR

TRIANGLE

SQUARE

CIRCLE

PIN

Description

GPIO_0

NC

1A

NC

1A

B2

1 Bit port free for GPIO

GPIO_1

NC

1D

NC

1D

B4

1 Bit port free for GPIO

GPIO_2

NC

1E

NC

1E

A3

1 Bit port free for GPIO

GPIO_3

NC

1H

NC

1H

A4

1 Bit port free for GPIO

UART_TX

1C

1K

1C

1K

B10

RS232 TX

UART_RX

1G

1I

1G

1I

B15

RS232 RX

I2C_SCL

1F

1L

1F

1L

A15

I2C Clock for ADC

I2C_SDA

1B

1J

1B

1J

A8

I2C Data for ADC

GPO_0/LED_0

4A0

4E0

4A0

4E0

B6

GP output, connected to LED

GPO_1/LED_1

4A1

4E1

4A1

4E1

B7

GP output, connected to LED

GPO_6/LED_2

4A2

4E2

4A2

4E2

A6

GP output, connected to LED

GPO_7/LED_3

4A3

4E3

4A3

4E3

A7

GP output, connected to LED

GPO_2

4B0

4F0

4B0

4F0

B9

GP output

GPO_3

4B1

4F1

4B1

4F1

B11

GP output

GPO_4

4B2

4F2

4B2

4F2

A9

GP output

GPO_5

4B3

4F3

4B3

4F3

A11

GP output

BUTTON_A

4C0

8D0

4C0

8D0

B12

Input from Button A

BUTTON_B

4C1

8D1

4C1

8D1

B13

Input from Button B

GPI_0

4D0

1O

4D0

1O

B17

GP Input

GPI_1

4D1

1P

4D0

1P

B18

GP Input

GPI_2

4D2

8D4

4D0

NC

A18

GP Input

GPI_3

4D3

8D5

4D0

NC

A17

GP Input

GPI_4

4C2

8D6

4C2

NC

A12

GP Input

GPI_5

4C3

8D7

4C3

NC

A13

GP Input

XA-SK-GPIO Slice Card Hardware Guide Read More »

sliceKIT hardware manual

Introduction

This document covers the hardware design of the sliceKIT Modular Development System, consisting of the core board, sliceCARDs and xSYS adaptor.

The core board contains a fully pinned out 16-core xCORE multicore microcontroller. All GPIOs are connected to four expansion connectors (termed slots) which interface with expansion cards called sliceCARDs that plug into the slots. The core board also contains all circuitry necessary for operating and debugging the xCORE system. Multiple sliceKIT core boards can be interconnected to form a multi xCORE device system with dual 5-bit xCONNECT Links being present between the boards.

sliceKIT system layout

/files/images/16091/4/slicekitlayout-wide.png

The diagram above shows an overview of the layout of the core board with sliceCARDs attached. Each of the four slots has a specific label – Star, Triange, Square, Circle printed on the core board silkscreen. Triangle and Circle sliceCARDs contain 24 xCORE I/Os, and the Star and Square sliceCARDs have 20 xCORE I/Os (usable as GPIO or two 5-wire xCONNECT links). The label denotes which sliceCARDs are compatible with which core board slots. The sliceCARDs are also marked with one or more of these labels to identify the slot type(s) they function correctly with.

The final type of connector is on the bottom left of the core board and is marked with a hollow square symbol with an X through it. This is for connecting multiple core boards together to form systems of 32 logical cores or more. It is termed the chain slot.

All slots are 36 pin PCI express style connectors in either socket or edge finger (plug) types.

Star and Triangle slots are pinned out from Tile 0 of the XS1-L16 xCORE device and the Circle and Square slots from Tile 1.

The L16 core board board contains the xCORE device plus support circuitry.

A single XS1-L16-128-QF124 device has all of its GPIO connected to the slots.

/files/images/16091/4/l2_core_board.png

Multiple core boards

Additional sliceKIT core boards can be connected to the Chain slot on the first board via the Square Slot on the second board, to add extra processing capability and I/O through extra sliceCARDs. The first board is termed the Master and the remaining boards are Slaves. When there is only one board, it is the Master.

Setup

For debugging, an xSYS adaptor board is connected to the Chain connector of the Master board to allow connection of an xTAG-2 which provides a debug link from a USB host.

The core board is powered by a 12V external power supply.

Power supply

Power input to the sliceKIT core board is via a standard barrel jack connector. A standard 12V external power supply should be used to power the board. Each core board requires its own 12V supply. This input supply is used to generate the main 5V board supply via a DC-DC converter.

The 5V board supply is then fed to all the slot connectors as well as powering the core board itself. 3V3 and 1V0 supplies are be generated by DC-DC converters from the 5V main supply.

The supplies are sequenced to ensure the power up sequence is 5V then 3V3 then 1V0. When the 1V0 supply is good, the system is released from reset.

The core board provides 3V3 and 5V at 0.25A each for a total of approximately 2W per slice.

Debug

Debug of the system is via the xSYS adapter board connected to the Chain connector.

The JTAG signals are connected as shown below.

/files/images/16091/4/jtagchain-wide.png

Presence detect signals are present on both the Chain connector and Square slot connectors to allow detection of a connected board and subsequent automatic switching of the JTAG chain. In a system of multiple core boards, the Master is the source of the JTAG chain so the system can only be debugged from the master. Other boards will see no devices in the JTAG chain.

The use of xSCOPE is covered in the xCONNECT Links section. The xSCOPE xCONNECT Link can be either enabled or disabled via a switch on the xSYS adapter board.

XS1-L16 boot

Master core boards boot from SPI flash, while slave core boards boot from xCONNECT link XLB from the next connected core board.

To allow re-use of the SPI boot pins (ports 1A, 1B, 1C, 1D) as signal I/O pins for the Star slot, a latched bus switch is used which connects the xCORE SPI pins to either the SPI Flash or to the sliceCARD slots. The switch is controlled by X0D42 and X0D43 (P8D6 and P8D7 on Tile 0 – on the Triangle slot). Once the device has booted, X0D43 is used to enable or disable the SPI interface, X0D42 should then transition from low to high to latch the selection. The SPI selection state is maintained until the system is reset.

/files/images/16091/4/spiselectflow-wide.png

Once this sequence is completed and the selection has been latched, X0D42 and X0D43 return to performing their normal functions in the Triangle slot.

If the SPI is not disabled, then SliceCARDs in the Star slot may not function as expected. If there is no sliceCARD in the Star slot, then it does not matter whether the SPI has been disabled or not. Therefore, applications which require runtime access to the SPI flash should either leave the Star slot unpopulated or check to ensure that the sliceCARD which is in the slot will be unaffected by the operation of the flash device.

The xTAG-2 system can use the boot mode select signal to force all devices in the chain (master and slave core boards) to boot from JTAG (don’t boot) for debug purposes.

If not in this mode, the devices will boot from SPI or xCONNECT Link as appropriate.

The Chain connector contains two 5-bit xCONNECT Links, XLA and XLB, which can be used to chain sliceKIT core boards together. The links from Tile 0 are connected to the Chain connector and the Star slot. The links from Tile 1 are connected to the Square slot.

The only complication in this system is use of the xSCOPE 2-bit xCONNECT Link. This link overlaps a 4 bit port on the Star slot connector so it is not possible to use this for user I/O at the same time as xSCOPE.

To work around this, a switch is present on the xSYS adapter board to either enable or disable the xSCOPE xCONNECT Link.
When disabled, these pins are disconnected from the Chain connector and are free for use on the Star slot. When enabled they will work as an xCONNECT Link and hence appear on the relevant pins of the Star slot.

It is recommended that if a sliceCARD is used in the Star Slot the XSCOPE switch is off on the xSYS adaptor card to ensure correct operation of the sliceCARD in the Star slot.

Reset

The whole system is held in reset until all power supplies are stable, and reset is connected to all Slice Cards so any circuitry on them can be reset.
Reset also indicates to the sliceCARDs that their power input is stable. The reset from the xTAG-2 resets the whole system, if required for debugging.

Clocking

The system clock has two sources: an on-board 25MHz oscillator or the CLK signal from the Chain connector. The system clock source is selected automatically according to the presence of signals on the Chain connector.

This means the system clock from a Master core board is fed automatically to all of the slave core boards so the whole system will operate synchronously.

The system clock is also fed to each of the sliceCARD slots.

Testpoints

Each xCORE I/O signal is also available on a 0.1” header, next to the slot that it is connected to.
These connections can be used to connect an oscilloscope or logic analyser, or for interconnection of signals for advanced development work.

The signals are identified on the silkscreen layer of the sliceKIT core board; the table below lists their relationship to the internal ports.

L16 Pin

Slot

PCIE

Function

X0D0

TRIANGLE

B2

P1A0

       

X0D1

sliceKIT hardware manual Read More »

GPIO Simple Demo Quickstart Guide

sw_gpio_examples simple demo : Quick Start Guide

This simple demonstration of xTimeComposer Studio functionality uses the XA-SK-GPIO Slice Card together with the xSOFTip I2C Master component to:

  • communicate with the ADC (and external temperature sensing circuit) on the Slice Card
  • display the temperature value on the xTimeComposer debug console when a button is pressed
  • Cycle through the 4 LEDs on the Slice Card when another button is pressed

Hardware Setup

The XP-SKC-L2 Slicekit Core board has four slots with edge conectors: SQUARE, CIRCLE, TRIANGLE and STAR.

To setup up the system:

  1. Connect XA-SK-GPIO Slice Card to the XP-SKC-L2 Slicekit Core board using the connector marked with the SQUARE.
  2. Connect the XTAG Adapter to Slicekit Core board, and connect XTAG-2 to the adapter.
  3. Connect the XTAG-2 to host PC. Note that a USB cable is not provided with the Slicekit starter kit.
  4. Switch on the power supply to the Slicekit Core board.
Hardware Setup for Simple GPIO Demo

/files/images/15821/21/hardware_setup-wide.png

Import and Build the Application

  1. Open xTimeComposer and open the edit perspective (Window->Open Perspective->XMOS Edit).
  2. Locate the 'Slicekit Simple GPIO Demo' item in the xSOFTip pane on the bottom left of the window and drag it into the Project Explorer window in the xTimeComposer. This will also cause the modules on which this application depends (in this case, module_i2c_master) to be imported as well.
  3. Click on the app_sk_gpio_simple_demo item in the Explorer pane then click on the build icon (hammer) in xTimeComposer. Check the console window to verify that the application has built successfully.

For help in using xTimeComposer, try the xTimeComposer tutorials, which you can find by selecting Help->Tutorials from the xTimeComposer menu.

Note that the Developer Column in the xTimeComposer on the right hand side of your screen provides information on the xSOFTip components you are using. Select the I2C master (Single Bit Ports) component in the xSOFTip Browser, and you will see its description together with links to more documentation for this component. Once you have briefly explored this component, you can return to this quickstart guide by re-selecting 'Slicekit COM Port GPIO Demo' in the xSOFTip Browser and clicking once more on the Quickstart link for the GPIO Simple Demo Quickstart.

Run the Application

Now that the application has been compiled, the next step is to run it on the Slicekit Core Board using the tools to load the application over JTAG (via the XTAG2 and Xtag Adaptor card) into the xCORE multicore microcontroller.

  1. Click on the Run icon (the white arrow in the green circle). A dialog will appear asking which device to cvonnect to. Select XMOS XTAG2. The debug console window in xTIMEcomposer should then display the message ** WELCOME TO SIMPLE GPIO DEMO  ** in the Debug Console window. This has been generated from the application code via a call to the printstr() function.
  2. Press Button 1 on the GPIO Slice Card. Each time the button is pressed, the application lights the next LEDs on the Slice Card and displays “Button 1 pressed” in the debug console within xTime Composer Studio. Press the button 5 or 6 times to verify the functionality.
  3. Press Button 2 on the Slice Card. This causes the current temperature value to be read from the ADC over the I2C bus and then reported on the debug console. Press the button a few times.
  4. Do something to alter the temperature of the sensor (use freezer spray, or place your finger on it for a while). Press Button 2 again to verify that the changed temperature is reported.
Screenshot of Console window

/files/images/15821/21/Console.png

Next Steps

Look at the Code

  1. Examine the application code. In xTIMEcomposer navigate to the src directory under app_sk_gpio_simple_demo and double click on the main.xc file within it. The file will open in the central editor window.
  2. Find the main function and note that it runs the app_manager() function on a single logical core. Confirm that there are no other logical cores running (e.g. only one function call within the par{}.
  3. Find the app_manager function within the same file and look at the select statement within it. What do you think this select statement is doing? Review the XC programming guide (Responding to Multiple Inputs
    ) to find out more about select statements. Now use the xSOFTip explorer pane to navigate back to the root of the documentation for this application. Click on the ‘Slicekit GPIO Example Applications and read the notes there about how the code works.
  4. Examine the I2C interface to the ADC on the Slice Card. Take a look at the calls to the I2C Master function library within main.xc, and use the xSOFTip Explorer pane in xTIMEcomposer to locate this module and display its documentation in the Developer Column.

Try the Com Port Demo

  1. If you have a PC with a physical COM port, or a USB to Serial Uart cable you can run the extended version of this application (app_sk_gpio_com_demo) which adds a UART to the application and allows the SliceCard and its buttons, LEDs and ADC to be controlled and interrogated from a serial terminal console on a host PC. Follow the link to the quickstart guide for this application for further information on running this extended demo:

sw_gpio_examples COM Port demo : Quick Start Guide

GPIO Simple Demo Quickstart Guide Read More »

Slicekit GPIO and Ethernet Combo Demo Quickstart Guide

sw_gpio_examples GPIO and Ethernet demo : Quick Start Guide

This example demonstrates the use of two Slice Cards, XA-SK-GPIO and XA-SK-E100 together with the xSOFTip components for Ethernet, XTCP, I2C and WebServer to provide access to the GPIO slice features via a simple embedded webserver.

A webpage served from the sliceKIT and accessed in a browser on a host PC has the following demo functions:
  • Turn GPIO Slice Card LEDS on and off
  • Read the room temperature via the onboard ADC and display on the web page
  • Display GPIO Slice Card button press status

Hardware Setup

The XP-SKC-L2 Slicekit Core board has four slots with edge conectors: SQUARE, CIRCLE, TRIANGLE and STAR.

To setup up the system refer to the figure and instructions below

  1. Connect the XA-SK-E100 Slice Card to the XP-SKC-L2 Slicekit Core board using the connector marked with the CIRCLE.
  2. Connect the XA-SK-GPIO Slice Card to the XP-SKC-L2 Slicekit Core board using the connector marked with the SQUARE.
  3. Connect the XTAG Adapter to Slicekit Core board, and connect XTAG-2 to the adapter.
  4. Connect the XTAG-2 to the host PC. Note that an Ethernet cable is not provided with the Slicekit starter kit.
  5. Connect one end of the Ethernet cable to XA-SK-E100 Slice Card and the other end to the RJ45 jack of your host PC.
  6. Switch on the power supply to the Slicekit Core board.
  7. Ensure the activity LEDs on the XA-SK-E100 Slice Card and the host PC’s Ethernet Jack are toggling.
Hardware Setup for the GPIO and Ethernet Application Demo

/files/images/16450/9/hardware_setup.png

Import and Build the Application

  1. Open xTIMEcomposer, then open the edit perspective (Window->Open Perspective->XMOS Edit).
  2. Locate the 'Slicekit GPIO Ethernet Demo' item in the xSOFTip Broswer window and drag it into the Project Explorer window in the xTIMEcomposer. This will also cause the modules on which this application depends (in this case, module_ethernet_board_support, module_i2c_master, module_webserver) to be imported as well.
  3. Click on the Slicekit GPIO Ethernet Demo item in the Explorer pane then click on the build icon (hammer) in xTIMEcomposer. Check the console window to verify that the application has built successfully.

For help in using xTIMEcomposer, try the xTIMEcomposer tutorials, which you can find by selecting Help->Tutorials from the xTIMEcomposer menu.

Running the Demo

  1. Click on the Run icon (the white arrow in the green circle). A dialog will appear asking which device to connect to. Select XMOS XTAG2.
  2. xTIMEcomposer console displays the ip address obtained by the DHCP client (or local link if DHCP server is not accesible). Please note if the DHCP server is not available on the host PC, it may take a while to obtain the ip address.
  3. Open a web browser on the host PC and type the ip address displayed on the xTIMEcomposer console into the browser’s address bar
  4. On hitting the return key, a web page should get loaded and displayed in the browser as shown in the figure below.
Screenshot of GPIO web page

/files/images/16450/9/gpio_web_page.png

Use the web page options to perform various actions such as
  1. Switch on all the LEDS by turning them all to ‘ON’ in the browser then clicking Submit. The LEDS should light, the ADC temperature display should be updated, and the webpage will report no buttons have been pressed.
  2. Switch off two of the LEDS by turning two to ‘OFF’ in the browser then clicking Submit. Two LEDS should go out and the ADC temperature is reported again. This time also webpage will report no buttons have been pressed.
  3. Press SW1 button on the GPIO slice card and then press submit. The web page should now report that Button 1 is pressed.
  4. Press SW2 button on the GPIO slice card and then press submit. The web page should now report that Button 2 is pressed.
  5. Just hitting Submit now displays both the buttons are not pressed. LEDs state remain unchanged unless they are explicitly changed on the web page.

Next Steps

Building web pages for your applications

This application parses ethernet data to interpret web page commands. Refer to the Programming Guide section within the SliceKit GPIO Example Applications documentation linked from the front page documentation for this demo for more information on how to utilize the Embedded Webserver Function Library component in building your own custom web server applications.

Look at the Code

The application handler runs on one core. It uses I/O pins to read or write data to the LEDs, buttons and the I2C ADC to read the temperature. The web page handler executes in another core, receiving the TCP requests and processing them. It calls the functions described in the webpage (webpage includes embedded function calls into the application code), processing the requests and sending commands over the c_gpio channel to the gpio core (application handler).

  1. Examine the application code. In xTIMEcomposer navigate to the src directory under app_sk_gpio_eth_combo_demo and double click on the main.xc file within it. The file will open in the central editor window.
  2. The channel c_gpio is used between tcp handler and application handler to send web page requests to the application and to collect GPIO status from the application.
  3. In the app_handler.xc file, the API function set_gpio_state is used by the web page in order to apply web page LED settings and similarly the API function get_gpio_state is used by the web page to collect the current GPIO status containing LEDs, button presses and ADC temperature values.
  4. There is some GPIO button scan logic which monitors for value changes on the configured 4-bit button port (XS1_PORT_4C) in the application handler routine as defined in the app_handler.xc file. Whenever this port value changes, the GPIO button states are updated accordingly.
  5. Also verify that that the ADC value is read whenever there is a web page request. This value is interpolated to get a proper temerature value and is updated in the GPIO state structure before sending it to the web page.
  6. As a part of this exercise, modify the IP address settings in main.xc file to a static ip address as in the commented part of ip config, build and run the application. Open a web browser to check whether you are able to open a web page using the new ip address and able to issue LED commands from the web page.

Slicekit GPIO and Ethernet Combo Demo Quickstart Guide Read More »

Slicekit GPIO and Ethernet Combo Demo

  • version

    1.0.4

  • scope

    Example.

    This code is provided as example code for a user to base their code on.

  • description

    This application showcases GPIO features which can be accessed and controlled over Ethernet via a webpage on an embedded webserver, using the GPIO and Ethernet Slices

  • keywords

    Ethernet, I2C, LED, buttons

  • boards

    XP-SKC-L2, XA-SK-GPIO, XA-SK-E100

Features

With this application running on XP-SKC-L2 using XA-SK-GPIO and XA-SK-E100 Slice Cards, you can issue commands using a web page from a host PC to:

  • Turn GPIO Slice Card LEDS on and off
  • Read the room temperature via the onboard ADC and display on the web page
  • Display GPIO Slice Card button presses

Documentation

Slicekit GPIO and Ethernet Combo Demo Read More »

Scroll to Top