XUF216 Documentation on Port Usage with USB Clarification Topic is solved

If you have a simple question and just want an answer.
kyle123
Member++
Posts: 25
Joined: Tue May 19, 2015 8:17 pm

XUF216 Documentation on Port Usage with USB Clarification

Post by kyle123 »

Hello All,

I'm reading the documentation for the XUF216 (doc#: X006990) device for use in a new design. I would like some clarification on the following statement:

The USB PHY is connected to the ports on Tile 0 and Tile 1 as shown in Figure 11.
When the USB PHY is enabled on Tile 0, the ports shown can on Tile 0 only be used
with the USB PHY. When the USB PHY is enabled on Tile 1, then the ports shown can
on Tile 1 only be used with the USB PHY. All other IO pins and ports are unaffected.
The USB PHY should not be enabled on both tiles.

Figure11.PNG
(102.28 KiB) Not downloaded yet
Figure11.PNG
(102.28 KiB) Not downloaded yet
Since I want to use the XUF216 as a high speed usb device, the following ports shall not be used on the same tile as the USB PHY:
  • 8A
  • 1k
  • 1H
  • 1J
  • 1I
  • 8B
  • 1E
  • 1F
  • 1G
As I have already used the majority of the pins on Tile 0, I would like to place the USB PHY on Tile 1. However, the following ports are missing from the documentation on Tile 1:
  • 1K
  • 1H
  • 1J
  • 1I
  • 1E
  • 1F
  • 1G

Furthermore, some of the 8A ports on tile 0 are used by the QPSI flash.


The device boots from a QSPI flash (IS25LQ016B) that is embedded in the device.
The QSPI flash is connected to the ports on Tile 0 as shown in Figure 8. An
external 1K resistor must connect X0D01 to VDDIOL. X0D10 should ideally not
be connected. If X0D10 is connected, then a 150 ohm series resistor close to the
device is recommended. X0D04..X0D07 should be not connected.


Therefore, the only possible way to implement the USB and still use the flash memory is if I place the USB PHY on tile 1. Can you please advise the best way to implement the USB on Tile 1 or clarify my understanding of the port usage?

Best Regards,

Kyle


View Solution
kyle123
Member++
Posts: 25
Joined: Tue May 19, 2015 8:17 pm

Post by kyle123 »

Update:

Ok, after finding and downloading the xCore-200 device port map Excel file, I was able to determine that the missing ports are not routed out of the package. I'm assuming that the ports are still connected internally and I can use the USB on tile 1 provided that I keep P8A and P8B clear. I believe this makes sense, but would appreciate a confirmation.

Thanks,

Kyle
Gothmag
XCore Addict
Posts: 129
Joined: Wed May 11, 2016 3:50 pm

Post by Gothmag »

Keep in mind each tile has seperate physical pins. If it says use pin 1B you have to make sure its the appropriate tiles 1B pin.
kyle123
Member++
Posts: 25
Joined: Tue May 19, 2015 8:17 pm

Post by kyle123 »

Agreed.
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

You can use USB from either tile. Ports 8A, 8B and several 1bit ports all get switched over internally on that tile, so no need for any special treatment on the pins of those ports.
kyle123
Member++
Posts: 25
Joined: Tue May 19, 2015 8:17 pm

Post by kyle123 »

Hi Larry,

Could you please clarify the bit about the internal flash memory. It appears that the USB shall only be used on Tile1 when the internal flash memory is used in tandem.

Regards,

Kyle
User avatar
larry
Respected Member
Posts: 275
Joined: Fri Mar 12, 2010 6:03 pm

Post by larry »

kyle123 wrote:Could you please clarify the bit about the internal flash memory. It appears that the USB shall only be used on Tile1 when the internal flash memory is used in tandem.
USB and flash can both be on tile 0. Port 4B will drive pins X0D04-07 and port 8A of tile 0 will be diverted to USB before I/O muxing takes place. Think of it as two layers of muxing, first is "USB or I/O", second is 1/4/8/16/32bit ports.
kyle123
Member++
Posts: 25
Joined: Tue May 19, 2015 8:17 pm

Post by kyle123 »

Ok, a couple of general questions...

1) How do you actually enable the USB on Tile1? I've imported the latest usb library and put all usb functionality on tile[1] inside of main. However, when I compile the code, xTIMEComposer still thinks that usb functionality should be implemented on tile[0]. Do I need to import a special library? For instance, I read that the xCore-200 devices now use the XS2 architecture...(#include <xs2.h> doesn't seem to be a thing).

2) Also, I appear to be able to flash to the device. However, the device doesn't boot after a power cycle. Are there any special configurations that need to be set in xTimeComposer? I'm using the previous version of tools, Version: Community_14.1.2 (build 17961, Dec-04-2015) . I'm hesitant to update to the latest version since this tool set has worked on each of the dev kits that I have tested. After some soul searching, I decided --force-pll-reset in the flash options to no avail.

Thanks,

--Kyle

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<Network xmlns="http://www.xmos.com"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.xmos.com http://www.xmos.com">
  <Type>Device</Type>
  <Name>XEF216-512-TQ128-C20 Device</Name>

  <Declarations>
    <Declaration>tileref tile[2]</Declaration>
    <Declaration>tileref usb_tile</Declaration>
  </Declarations>

  <Packages>
    <Package id="0" Type="XS2-UFnA-512-TQ128">
      <Nodes>
        <Node Id="0" InPackageId="0" Type="XS2-L16A-512" SystemFrequency="500MHz" OscillatorSrc="1">
          <Boot>
            <Source Location="bootFlash"/>
          </Boot>
          <Tile Number="0" Reference="tile[0]">
          	<Port Location="XS1_PORT_1A" Name="OSC_EN"/>
          	<Port Location="XS1_PORT_1D" Name="TILE0_CLKB"/>
          	<Port Location="XS1_PORT_1E" Name="PORT_DCLK"/>
          	<Port Location="XS1_PORT_1F" Name="PORT_CNV"/>
          	<Port Location="XS1_PORT_1G" Name="PORT_BUSY"/>
          	<Port Location="XS1_PORT_1H" Name="PORT_SDO"/>
          	<Port Location="XS1_PORT_1I" Name="PORT_SCK"/>
          	<Port Location="XS1_PORT_1J" Name="PORT_PD"/>
          	<Port Location="XS1_PORT_1K" Name="PORT_RESET"/>
          	<Port Location="XS1_PORT_1L" Name="PORT_DIN"/>
          	<Port Location="XS1_PORT_1M" Name="PORT_T0_EXT_CLK"/>
          	<Port Location="XS1_PORT_1N" Name="PORT_T0_LOOP1"/>
          	<Port Location="XS1_PORT_1O" Name="PORT_T0_LOOP2"/>
          	<Port Location="XS1_PORT_1P" Name="PORT_T0_LOOP3"/>
          	<Port Location="XS1_PORT_4E" Name="TILE0_INDICATORS"/>  	
            <Port Location="XS1_PORT_1B" Name="PORT_SQI_CS"/>
            <Port Location="XS1_PORT_1C" Name="PORT_SQI_SCLK"/>
            <Port Location="XS1_PORT_4B" Name="PORT_SQI_SIO"/>
          </Tile>
          <Tile Number="1" Reference="tile[1]">
          	<Port Location="XS1_PORT_4E" Name="TILE1_INDICATORS"/>
          	<Port Location="XS1_PORT_1P" Name="TILE1_CLKB"/>
          	<Port Location="XS1_PORT_1O" Name="PORT_T1_EXT_CLK"/>
          	<Port Location="XS1_PORT_1N" Name="PORT_T1_LOOP1"/>
          	<Port Location="XS1_PORT_1M" Name="PORT_T1_LOOP2"/>
          	<Port Location="XS1_PORT_1L" Name="PORT_T1_LOOP2"/>
          </Tile>
        </Node>
        <Node Id="1" InPackageId="1" Type="periph:XS1-SU" Reference="usb_tile" Oscillator="24MHz">
        </Node>
      </Nodes>
      <Links>
        <Link Encoding="5wire">
          <LinkEndpoint NodeId="0" Link="8" Delays="52clk,52clk"/>
          <LinkEndpoint NodeId="1" Link="XL0" Delays="1clk,1clk"/>
        </Link>
      </Links>
    </Package>
  </Packages>

  <ExternalDevices>
    <Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash">
      <Attribute Name="PORT_SQI_CS" Value="PORT_SQI_CS"/>
      <Attribute Name="PORT_SQI_SCLK" Value="PORT_SQI_SCLK"/>
      <Attribute Name="PORT_SQI_SIO" Value="PORT_SQI_SIO"/>
    </Device>
  </ExternalDevices>

  <JTAGChain>
    <JTAGDevice NodeId="0"/>
  </JTAGChain>

</Network>

Code: Select all

int main(){

    interface i_led0 i0;
    interface i_led1 i1;
    interface i_led2 i2;
    interface i_led3 i3;
    interface i_led4 i4;

    chan c_ep_out[XUD_EP_COUNT_OUT], c_ep_in[XUD_EP_COUNT_IN];
    par{
        on tile[0]: STATUS(i0, i1, i2, i3, i4);
        on tile[0]: heartbeat(i0);

        on tile[1]: xud(c_ep_out, XUD_EP_COUNT_OUT, c_ep_in, XUD_EP_COUNT_IN,
                                null, XUD_SPEED_HS, XUD_PWR_SELF);
        on tile[1]: endpoint0(c_ep_out[0], c_ep_in[0]);
        on tile[1]: custom_endpoint(c_ep_out[1], c_ep_in[1]);
    }
    return 0;
}

Code: Select all

Creating xCore-8Ch-ADC.xe
/Users/klu/workspace/lib_usb/xudlib/XUD_Manager.xc: Error: Program on "tile[1]" contains a reference to resource "rx_usb_clk" not resident on that tile.
/Users/klu/workspace/lib_usb/xudlib/XUD_Manager.xc: Error: Program on "tile[1]" contains a reference to resource "tx_usb_clk" not resident on that tile.
/Users/klu/workspace/lib_usb/xudlib/XUD_Manager.xc: Error: Program on "tile[1]" contains a reference to resource "p_usb_clk" not resident on that tile.
/Users/klu/workspace/lib_usb/xudlib/XUD_Manager.xc: Error: Program on "tile[1]" contains a reference to resource "flag2_port" not resident on that tile.
/Users/klu/workspace/lib_usb/xudlib/XUD_Manager.xc: Error: Program on "tile[1]" contains a reference to resource "flag1_port" not resident on that tile.
/Users/klu/workspace/lib_usb/xudlib/XUD_Manager.xc: Error: Program on "tile[1]" contains a reference to resource "flag0_port" not resident on that tile.
/Users/klu/workspace/lib_usb/xudlib/XUD_Manager.xc: Error: Program on "tile[1]" contains a reference to resource "rx_rdy" not resident on that tile.
/Users/klu/workspace/lib_usb/xudlib/XUD_Manager.xc: Error: Program on "tile[1]" contains a reference to resource "p_usb_rxd" not resident on that tile.
/Users/klu/workspace/lib_usb/xudlib/XUD_Manager.xc: Error: Program on "tile[1]" contains a reference to resource "p_usb_txd" not resident on that tile.
/Users/klu/workspace/lib_usb/xudlib/XUD_Manager.xc: Error: Program on "tile[1]" contains a reference to resource "tx_readyin" not resident on that tile.
/Users/klu/workspace/lib_usb/xudlib/XUD_Manager.xc: Error: Program on "tile[1]" contains a reference to resource "tx_readyout" not resident on that tile.
xmake[1]: *** [bin//xCore-8Ch-ADC.xe] Error 1
xmake: *** [bin//xCore-8Ch-ADC.xe] Error 2
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi Kyle.

The details on how to move the USB function onto Tile 1 is posted inside this example note:

USB-HID-Class---Extended-on-xCORE-200-Explorer(1.1.2rc1).pdf

https://www.xmos.com/published/an00182- ... ion=latest

Image
kyle123
Member++
Posts: 25
Joined: Tue May 19, 2015 8:17 pm

Post by kyle123 »

Thank you! The -DUSB_TILE=tile[1] did the trick:)
Post Reply