Page 1 of 1

Boot an XS1-L01A-TQ128 through its XlinkB

Posted: Fri Mar 30, 2012 9:04 am
by scrusson
Hi guys,

This post is linked to my last one (https://www.xcore.com/forum/viewtopic.php?f=26&t=1681). The goal is to link two XK-1A boards and make them boot on the same flash memory. There were two problems that made impossible to make a slave XK-1A boot on a master XK-1A memory flash via an Xlink : only XlinkB had to be used and I had to force the boot mode on "XlinkB mode", that meant put the pins of the XS1 Mode3/Mode2=10. I have made some changes on the boards to correct these two problems : now the slave XK-1A is connected to the master via its XlinkB, and I placed this board in the XlinkB boot mode. So for me, there is no more problems and this should work. But sadly it's not. When I turn on the boards, nothing happens (some leds on both boards should light one after the other). Do you have any explanations, things that I forgot?

Thanks

PS : you can take a look at my .xn file

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>Board</Type>

  <Declarations>
    <Declaration>core stdcore[2]</Declaration>
  </Declarations>

  <Packages>
    <Package id="P1" Type="XS1-L1A-TQ128">
      <Nodes>
        <Node Id="Master" Type="XS1-L1A" InPackageId="0">
          <Boot>
            <Source Location="SPI:bootFlash_0"/>
            <Bootee NodeId="Slave" Core="0"/>
          </Boot>
          <Core Number="0" Reference="stdcore[0]">
            <Port Location="XS1_PORT_1I" Name="PORT_UART_RX_0"/>
            <Port Location="XS1_PORT_1J" Name="PORT_UART_TX_0"/>
            <Port Location="XS1_PORT_1K" Name="PORT_BUTTON_0_0"/>
            <Port Location="XS1_PORT_1L" Name="PORT_BUTTON_1_0"/>
            <Port Location="XS1_PORT_1M" Name="PORT_SPI_MISO_0"/>
            <Port Location="XS1_PORT_1N" Name="PORT_SPI_SS_0"/>
            <Port Location="XS1_PORT_1O" Name="PORT_SPI_CLK_0"/>
            <Port Location="XS1_PORT_1P" Name="PORT_SPI_MOSI_0"/>
            <Port Location="XS1_PORT_4F" Name="PORT_LED_0"/>
          </Core>
        </Node>
      </Nodes>
    </Package>
    <Package id="P2" Type="XS1-L1A-TQ128">
      <Nodes> 
        <Node Id="Slave" Type="XS1-L1A" InPackageId="0">
          <Boot>
            <Source Location="XMOSLINK"/>
          </Boot>
          <Core Number="0" Reference="stdcore[1]">
            <Port Location="XS1_PORT_1I" Name="PORT_UART_RX_1"/>
            <Port Location="XS1_PORT_1J" Name="PORT_UART_TX_1"/>
            <Port Location="XS1_PORT_1K" Name="PORT_BUTTON_0_1"/>
            <Port Location="XS1_PORT_1L" Name="PORT_BUTTON_1_1"/>
            <Port Location="XS1_PORT_1M" Name="PORT_SPI_MISO_1"/>
            <Port Location="XS1_PORT_1N" Name="PORT_SPI_SS_1"/>
            <Port Location="XS1_PORT_1O" Name="PORT_SPI_CLK_1"/>
            <Port Location="XS1_PORT_1P" Name="PORT_SPI_MOSI_1"/>
            <Port Location="XS1_PORT_4F" Name="PORT_LED_1"/>
          </Core>
        </Node>
      </Nodes>
    </Package>
  </Packages>
 
  <Links>
    <Link Encoding="2wire" Delays="4,4">
      <LinkEndpoint NodeId="Master" Link="X0LD"/>
      <LinkEndpoint NodeId="Slave" Link="X0LB"/>
    </Link>
  </Links>

  <ExternalDevices>
    <Device NodeId="Master" Core="0" Class="SPIFlash" Name="bootFlash_0" Type="AT25FS010">
      <Attribute Name="PORT_SPI_MISO" Value="PORT_SPI_MISO_0"/>
      <Attribute Name="PORT_SPI_SS"   Value="PORT_SPI_SS_0"/>
      <Attribute Name="PORT_SPI_CLK"  Value="PORT_SPI_CLK_0"/>
      <Attribute Name="PORT_SPI_MOSI" Value="PORT_SPI_MOSI_0"/>
    </Device>
  </ExternalDevices>

  <JTAGChain>
     <JTAGDevice NodeId="Master"/>
     <JTAGDevice NodeId="Slave"/>
  </JTAGChain>

</Network>

Re: Boot an XS1-L01A-TQ128 through its XlinkB

Posted: Mon Apr 02, 2012 6:29 pm
by Bianco
It's easier to use LinkB on both boards connected to each other. This way you can keep the JTAG chain intact without using hacks. You problably want to test the link first using both cores loaded through JTAG before you go flash boot (take small steps).

I want to note that the XK-1(A) does not use the BOOTROM flash loader but a custom loader in the OTP.
I am not sure whether it behaves different.

Re: Boot an XS1-L01A-TQ128 through its XlinkB

Posted: Tue Apr 03, 2012 3:16 am
by segher
Bianco wrote:I want to note that the XK-1(A) does not use the BOOTROM flash loader but a custom loader in the OTP.
I am not sure whether it behaves different.
Everything always uses the boot ROM. If the "boot from OTP" bit is set, the
boot ROM code reads an image from OTP to RAM, and jumps there.

The image in the XK-1 checks if the mode pins are set for SPI ROM boot,
and if not, jumps back into the boot ROM, which well then boot from whatever
you have the MODE pins set for.

(And if the MODE pins are set for SPI ROM boot, it will run code that is
essentially identical to the boot ROM code for that, just different ports,
and it checks for an image that is too big (unlike the boot ROM code)).

Re: Boot an XS1-L01A-TQ128 through its XlinkB

Posted: Wed Apr 04, 2012 8:39 am
by scrusson
[quote="Bianco"]It's easier to use LinkB on both boards connected to each other. This way you can keep the JTAG chain intact without using hacks. You problably want to test the link first using both cores loaded through JTAG before you go flash boot (take small steps).

Hi Bianco, thanks for your reply.

In my actual configuration, the master XK1-A is linked through its XlinkD to the XlinkB of the slave. But the way I did it keep the JTAG chain intact, also I already tested the link by loading a program using both cores through JTAG.

What I can do :
- loading a program using both cores (sharing a channel) through JTAG
- flashing the same program in both flash memories and make each core boot on its own flash via SPI (in this case my .xn file looks like that

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>Board</Type>

  <Declarations>
    <Declaration>core stdcore[2]</Declaration>
  </Declarations>

  <Nodes>
    <Node Id="0" Type="XS1-L1A-TQ128">
      <Boot>
        <Source Location="SPI:bootFlash_0"/>
      </Boot>
      <Core Number="0" Reference="stdcore[0]">
        <Port Location="XS1_PORT_1I" Name="PORT_UART_RX_0"/>
        <Port Location="XS1_PORT_1J" Name="PORT_UART_TX_0"/>

        <Port Location="XS1_PORT_1K" Name="PORT_BUTTON_0_0"/>
        <Port Location="XS1_PORT_1L" Name="PORT_BUTTON_1_0"/>

        <Port Location="XS1_PORT_1M" Name="PORT_SPI_MISO_0"/>
        <Port Location="XS1_PORT_1N" Name="PORT_SPI_SS_0"/>
        <Port Location="XS1_PORT_1O" Name="PORT_SPI_CLK_0"/>
        <Port Location="XS1_PORT_1P" Name="PORT_SPI_MOSI_0"/>

        <Port Location="XS1_PORT_4F" Name="PORT_LED_0"/>
      </Core>
    </Node>
    <Node Id="1" Type="XS1-L1A-TQ128">
      <Boot>
        <Source Location="SPI:bootFlash_1"/>
      </Boot>
      <Core Number="0" Reference="stdcore[1]">
        <Port Location="XS1_PORT_1I" Name="PORT_UART_RX_1"/>
        <Port Location="XS1_PORT_1J" Name="PORT_UART_TX_1"/>

        <Port Location="XS1_PORT_1K" Name="PORT_BUTTON_0_1"/>
        <Port Location="XS1_PORT_1L" Name="PORT_BUTTON_1_1"/>

        <Port Location="XS1_PORT_1M" Name="PORT_SPI_MISO_1"/>
        <Port Location="XS1_PORT_1N" Name="PORT_SPI_SS_1"/>
        <Port Location="XS1_PORT_1O" Name="PORT_SPI_CLK_1"/>
        <Port Location="XS1_PORT_1P" Name="PORT_SPI_MOSI_1"/>

        <Port Location="XS1_PORT_4F" Name="PORT_LED_1"/>
      </Core>
    </Node>
  </Nodes>
  
  <Packages>
    <Package id="0" Type="XS1-L1A-TQ128">
      <Component NodeId="0" InPackage="0"/>
    </Package>
    <Package id="1" Type="XS1-L1A-TQ128">
      <Component NodeId="1" InPackage="0"/>
    </Package>
  </Packages>
  
  <Links>
    <Link Encoding="2wire" Delays="4,4">
      <LinkEndpoint NodeId="0" Link="X0LD"/>
      <LinkEndpoint NodeId="1" Link="X0LB"/>
    </Link>
  </Links>

  <ExternalDevices>
    <Device NodeId="0" Core="0" Class="SPIFlash" Name="bootFlash_0" Type="AT25FS010">
      <Attribute Name="PORT_SPI_MISO" Value="PORT_SPI_MISO_0"/>
      <Attribute Name="PORT_SPI_SS"   Value="PORT_SPI_SS_0"/>
      <Attribute Name="PORT_SPI_CLK"  Value="PORT_SPI_CLK_0"/>
      <Attribute Name="PORT_SPI_MOSI" Value="PORT_SPI_MOSI_0"/>
    </Device>
    <Device NodeId="1" Core="0" Class="SPIFlash" Name="bootFlash_1" Type="AT25FS010">
      <Attribute Name="PORT_SPI_MISO" Value="PORT_SPI_MISO_1"/>
      <Attribute Name="PORT_SPI_SS"   Value="PORT_SPI_SS_1"/>
      <Attribute Name="PORT_SPI_CLK"  Value="PORT_SPI_CLK_1"/>
      <Attribute Name="PORT_SPI_MOSI" Value="PORT_SPI_MOSI_1"/>
    </Device>
  </ExternalDevices>

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

</Network>
What I can't do :
- loading the same program on the master flash memory and make the slave boot on it through its XlinkB.

And I really don't understand what the problem is. :x

Thanks for your help

Re: Boot an XS1-L01A-TQ128 through its XlinkB

Posted: Wed Apr 04, 2012 11:15 am
by segher
You have

Code: Select all

            <Bootee NodeId="Slave" Core="0"/>
Shouldn't that be

Code: Select all

            <Bootee NodeId="Slave"/>
?

Re: Boot an XS1-L01A-TQ128 through its XlinkB

Posted: Wed Apr 04, 2012 2:23 pm
by scrusson
segher wrote:You have

Code: Select all

            <Bootee NodeId="Slave" Core="0"/>
Shouldn't that be

Code: Select all

            <Bootee NodeId="Slave"/>
?
Thank you very much for your replies and your help. But I tried with your suggestion and it doesn't work either...