XEF232 custom board, is not booting from internal flash of 2mb

New to XMOS and XCore? Get started here.
Post Reply
Sanjeev
Member++
Posts: 16
Joined: Thu Jan 19, 2017 8:34 am

XEF232 custom board, is not booting from internal flash of 2mb

Post by Sanjeev »

Hello,
We have created a custom board using XEF232. It has internal flash of 2MB. I am able to flash (using xTime composer 14.3.3) on the internal flash memory, but the unit is not booting from its internal flash. Do I need to write my own bootloader?

Thanks in advance..
Sanjeev

The xn file generated out of xTime Composer14.3.3, is as below:

<?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>XEF232-1024-FB374-C40 Device</Name>

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

<Packages>
<Package id="0" Type="XS2-UEFnA-1024-FB374">
<Nodes>
<Node Id="0" InPackageId="0" Type="XS2-L16A-512" SystemFrequency="500MHz" OscillatorSrc="1">
<Boot>
<Source Location="bootFlash0"/>
<Bootee NodeId="2"/>
</Boot>
<Tile Number="0" Reference="tile[0]">
<Port Location="XS1_PORT_1B" Name="PORT_SQI_CS_0"/>
<Port Location="XS1_PORT_1C" Name="PORT_SQI_SCLK_0"/>
<Port Location="XS1_PORT_4B" Name="PORT_SQI_SIO_0"/>
</Tile>
<Tile Number="1" Reference="tile[1]"/>
</Node>
<Node Id="2" InPackageId="2" Type="XS2-L16A-512" SystemFrequency="500MHz" OscillatorSrc="3">
<Boot>
<Source Location="LINK" BootMode="4"/>
</Boot>
<Tile Number="0" Reference="tile[2]"/>
<Tile Number="1" Reference="tile[3]"/>
</Node>
<Node Id="1" InPackageId="1" Type="periph:XS1-SU" Reference="usb_tile[0]">
</Node>
<Node Id="3" InPackageId="3" Type="periph:XS1-SU" Reference="usb_tile[1]">
</Node>
</Nodes>
<Links>
<Link Encoding="5wire" Delays="3clk">
<LinkEndpoint NodeId="0" Link="7"/>
<LinkEndpoint NodeId="2" Link="0"/>
</Link>
<Link Encoding="5wire" Delays="3clk">
<LinkEndpoint NodeId="0" Link="4"/>
<LinkEndpoint NodeId="2" Link="3"/>
</Link>
<Link Encoding="5wire" Delays="3clk">
<LinkEndpoint NodeId="0" Link="6"/>
<LinkEndpoint NodeId="2" Link="1"/>
</Link>
<Link Encoding="5wire" Delays="3clk">
<LinkEndpoint NodeId="0" Link="5"/>
<LinkEndpoint NodeId="2" Link="2"/>
</Link>
<Link Encoding="5wire">
<LinkEndpoint NodeId="0" Link="8" Delays="52clk,52clk"/>
<LinkEndpoint NodeId="1" Link="XL0" Delays="1clk,1clk"/>
</Link>
<Link Encoding="5wire">
<LinkEndpoint NodeId="2" Link="8" Delays="52clk,52clk"/>
<LinkEndpoint NodeId="3" Link="XL0" Delays="1clk,1clk"/>
</Link>
</Links>
</Package>
</Packages>

<ExternalDevices>
<Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash0">
<Attribute Name="PORT_SQI_CS" Value="PORT_SQI_CS_0"/>
<Attribute Name="PORT_SQI_SCLK" Value="PORT_SQI_SCLK_0"/>
<Attribute Name="PORT_SQI_SIO" Value="PORT_SQI_SIO_0"/>
</Device>
</ExternalDevices>

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

</Network>


User avatar
akp
XCore Expert
Posts: 578
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

As a quick check, did you ensure X0D01 has a 1K pull-up to VDDIO per the data sheet?
Sanjeev
Member++
Posts: 16
Joined: Thu Jan 19, 2017 8:34 am

Post by Sanjeev »

Yes, X0D01 is connected with a pull up register and the QSPI pin XS1_PORT_4B on tile 0 is left Open; Can some one guide me whether I need to modify the xn file to boot from tile 0 and internal flash?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

Hi. I think your XN file is at fault which appears to imply to boot from an external flash device but consider the following.

Review:
https://www.xmos.com/developer/download ... rc1%29.pdf

and

replace the following:

Code: Select all

<ExternalDevices>
<Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash0">
<Attribute Name="PORT_SQI_CS" Value="PORT_SQI_CS_0"/>
<Attribute Name="PORT_SQI_SCLK" Value="PORT_SQI_SCLK_0"/>
<Attribute Name="PORT_SQI_SIO" Value="PORT_SQI_SIO_0"/>
</Device>
</ExternalDevices>
with (change to suit):

Code: Select all

<Boot>
<Source Location="bootFlash"/>
</Boot>
<Tile Number="0" Reference="tile[0]">
<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>
and please post your results.
Sanjeev
Member++
Posts: 16
Joined: Thu Jan 19, 2017 8:34 am

Post by Sanjeev »

I tried adding this and still does not boot. Any other hints?
Sanjeev
Member++
Posts: 16
Joined: Thu Jan 19, 2017 8:34 am

Post by Sanjeev »

After doing these changes, I get the following error:
xflash: Error: F03096 Node "2" is configured to boot from a device but no suitable device was found.

Any idea, where is the configuration file located to remove the "Node 2 configuration to boot"

Thanks
Sanjeev
Member++
Posts: 16
Joined: Thu Jan 19, 2017 8:34 am

Post by Sanjeev »

Making those changes ends in build error:
.././XEF232-1024-FB374-C40.xn:16 Error: XN11130 Node "0" boot information does not specify an external device ("bootFlash0").

Ensured: X0D01 pulled high; X0D10 with 150ohms left open, X0D04..X0D07 as left as it is as they are basically pull down by the controller; X2D06 is pulled high,X2D04, X2D05 and X2D07 are left as it is, reason being they are pull down by controller.
Mode0, Mode1 controller (Physical)Pins are left open not connected. Reason being controller has pulled them high internally; meaning there is Mode0=1 and Mode1=1

I also modified the Link Encoding to 2wire from 5wires, still no change; w.r.t boot;

It is necessary to boot from Internal flash of 2MB, not sure, if any other changes to make? I am attaching my updated XN file, please suggest if anything gone wrong to enable it to boot from Internal memory from tile[0];

<?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>XEF232-1024-FB374-C40 Device</Name>

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

<Packages>
<Package id="0" Type="XS2-UEFnA-1024-FB374">
<Nodes>
<Node Id="0" InPackageId="0" Type="XS2-L16A-512" SystemFrequency="400MHz" Oscillator="24MHz">
<Boot>
<Source Location="bootFlash0"/>
<Bootee NodeId="2"/>
</Boot>
<Tile Number="0" Reference="tile[0]">
<Port Location="XS1_PORT_1B" Name="PORT_SQI_CS_0"/>
<Port Location="XS1_PORT_1C" Name="PORT_SQI_SCLK_0"/>
<Port Location="XS1_PORT_4B" Name="PORT_SQI_SIO_0"/>
</Tile>
<Tile Number="1" Reference="tile[1]"/>
</Node>
<Node Id="2" InPackageId="2" Type="XS2-L16A-512" SystemFrequency="400MHz" Oscillator="24MHz">
<Boot>
<Source Location="LINK" BootMode="4"/>
</Boot>
<Tile Number="0" Reference="tile[2]"/>
<Tile Number="1" Reference="tile[3]"/>
</Node>
<Node Id="1" InPackageId="1" Type="periph:XS1-SU" Reference="usb_tile[0]" Oscillator="24MHz">
</Node>
<Node Id="3" InPackageId="3" Type="periph:XS1-SU" Reference="usb_tile[1]" Oscillator="24MHz">
</Node>
</Nodes>
<Links>
<Link Encoding="2wire" Delays="3clk">
<LinkEndpoint NodeId="0" Link="7"/>
<LinkEndpoint NodeId="2" Link="0"/>
</Link>
<Link Encoding="2wire" Delays="3clk">
<LinkEndpoint NodeId="0" Link="4"/>
<LinkEndpoint NodeId="2" Link="3"/>
</Link>
<Link Encoding="2wire" Delays="3clk">
<LinkEndpoint NodeId="0" Link="6"/>
<LinkEndpoint NodeId="2" Link="1"/>
</Link>
<Link Encoding="2wire" Delays="3clk">
<LinkEndpoint NodeId="0" Link="5"/>
<LinkEndpoint NodeId="2" Link="2"/>
</Link>
<Link Encoding="5wire">
<LinkEndpoint NodeId="0" Link="8" Delays="52clk,52clk"/>
<LinkEndpoint NodeId="1" Link="XL0" Delays="1clk,1clk"/>
</Link>
<Link Encoding="5wire">
<LinkEndpoint NodeId="2" Link="8" Delays="52clk,52clk"/>
<LinkEndpoint NodeId="3" Link="XL0" Delays="1clk,1clk"/>
</Link>
</Links>
</Package>
</Packages>

<ExternalDevices>
<Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash0">
<Attribute Name="PORT_SQI_CS" Value="PORT_SQI_CS_0"/>
<Attribute Name="PORT_SQI_SCLK" Value="PORT_SQI_SCLK_0"/>
<Attribute Name="PORT_SQI_SIO" Value="PORT_SQI_SIO_0"/>
<Attribute Name="QE_REGISTER" Value="quad_spi_qe_location_status_reg_0"/>
<Attribute Name="QE_BIT" Value="quad_spi_qe_bit_6"/>
</Device>
</ExternalDevices>

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

</Network>
Sanjeev
Member++
Posts: 16
Joined: Thu Jan 19, 2017 8:34 am

Post by Sanjeev »

Making those changes ends in build error:
.././XEF232-1024-FB374-C40.xn:16 Error: XN11130 Node "0" boot information does not specify an external device ("bootFlash0").

Ensured: X0D01 pulled high; X0D10 with 150ohms left open, X0D04..X0D07 as left as it is as they are basically pull down by the controller; X2D06 is pulled high,X2D04, X2D05 and X2D07 are left as it is, reason being they are pull down by controller.
Mode0, Mode1 controller (Physical)Pins are left open not connected. Reason being controller has pulled them high internally; meaning there is Mode0=1 and Mode1=1

I also modified the Link Encoding to 2wire from 5wires, still no change; w.r.t boot;

It is necessary to boot from Internal flash of 2MB, not sure, if any other changes to make? I am attaching my updated XN file, please suggest if anything gone wrong to enable it to boot from Internal memory from tile[0];

<?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>XEF232-1024-FB374-C40 Device</Name>

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

<Packages>
<Package id="0" Type="XS2-UEFnA-1024-FB374">
<Nodes>
<Node Id="0" InPackageId="0" Type="XS2-L16A-512" SystemFrequency="400MHz" Oscillator="24MHz">
<Boot>
<Source Location="bootFlash0"/>
<Bootee NodeId="2"/>
</Boot>
<Tile Number="0" Reference="tile[0]">
<Port Location="XS1_PORT_1B" Name="PORT_SQI_CS_0"/>
<Port Location="XS1_PORT_1C" Name="PORT_SQI_SCLK_0"/>
<Port Location="XS1_PORT_4B" Name="PORT_SQI_SIO_0"/>
</Tile>
<Tile Number="1" Reference="tile[1]"/>
</Node>
<Node Id="2" InPackageId="2" Type="XS2-L16A-512" SystemFrequency="400MHz" Oscillator="24MHz">
<Boot>
<Source Location="LINK" BootMode="4"/>
</Boot>
<Tile Number="0" Reference="tile[2]"/>
<Tile Number="1" Reference="tile[3]"/>
</Node>
<Node Id="1" InPackageId="1" Type="periph:XS1-SU" Reference="usb_tile[0]" Oscillator="24MHz">
</Node>
<Node Id="3" InPackageId="3" Type="periph:XS1-SU" Reference="usb_tile[1]" Oscillator="24MHz">
</Node>
</Nodes>
<Links>
<Link Encoding="2wire" Delays="3clk">
<LinkEndpoint NodeId="0" Link="7"/>
<LinkEndpoint NodeId="2" Link="0"/>
</Link>
<Link Encoding="2wire" Delays="3clk">
<LinkEndpoint NodeId="0" Link="4"/>
<LinkEndpoint NodeId="2" Link="3"/>
</Link>
<Link Encoding="2wire" Delays="3clk">
<LinkEndpoint NodeId="0" Link="6"/>
<LinkEndpoint NodeId="2" Link="1"/>
</Link>
<Link Encoding="2wire" Delays="3clk">
<LinkEndpoint NodeId="0" Link="5"/>
<LinkEndpoint NodeId="2" Link="2"/>
</Link>
<Link Encoding="5wire">
<LinkEndpoint NodeId="0" Link="8" Delays="52clk,52clk"/>
<LinkEndpoint NodeId="1" Link="XL0" Delays="1clk,1clk"/>
</Link>
<Link Encoding="5wire">
<LinkEndpoint NodeId="2" Link="8" Delays="52clk,52clk"/>
<LinkEndpoint NodeId="3" Link="XL0" Delays="1clk,1clk"/>
</Link>
</Links>
</Package>
</Packages>

<ExternalDevices>
<Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash0">
<Attribute Name="PORT_SQI_CS" Value="PORT_SQI_CS_0"/>
<Attribute Name="PORT_SQI_SCLK" Value="PORT_SQI_SCLK_0"/>
<Attribute Name="PORT_SQI_SIO" Value="PORT_SQI_SIO_0"/>
<Attribute Name="QE_REGISTER" Value="quad_spi_qe_location_status_reg_0"/>
<Attribute Name="QE_BIT" Value="quad_spi_qe_bit_6"/>
</Device>
</ExternalDevices>

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

</Network>
swissembedded
Junior Member
Posts: 6
Joined: Tue Dec 31, 2019 9:54 am

Post by swissembedded »

we have the same problem, any hint? Not sure if OTP needs initial config?
User avatar
mon2
XCore Legend
Posts: 1913
Joined: Thu Jun 10, 2010 11:43 am
Contact:

Post by mon2 »

@swissembedded

Can you share more details?

Can you post relevant parts of your schematic?

CPU and power rails are key parts to investigate.

Can you access the flash on your custom build? Try the simple USB hid high speed mouse demo from Xmos on your PCBA. Does that run? Simple led blinky?

Otp is not required to run these tests.
Post Reply