xflash for XEF232-1024

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
ASDF
New User
Posts: 3
Joined: Fri Feb 25, 2022 1:29 pm

xflash for XEF232-1024

Post by ASDF »

Hey,

I made my own board with an XEF232-1024-FB374-C40 Device and got problems accessing internal flash device.
xtime composer 14.3.3 on win10-64b failed to flash the device, so I went to the command line tool trying to get read access to the flash.
Keeping the factory defaults i made a new folder in C:\Program Files (x86)\XMOS\xTIMEcomposer\Community_14.3.3\targets calles DISIVAL th get an .xn to "play" with the config.

The file contains this code

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>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="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" Type="IS25LP016D">
			<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>

Command line tool:

Code: Select all

>xflash --verbose --target DISIVAL --read-all -o o.txt
XFlash::DoXFlash
XFlash::DoReadWriteErase
XFlash_Programmer_Read::DoRead
XFlash_Programmer_Read::IssueCompileCommand
xcc -w -Xmapper --dontenablesodlinks  -x xn "C:\Program Files (x86)\XMOS\xTIMEcomposer\Community_14.3.3\targets\DISIVAL\DISIVAL.xn" -O2 -lquadflash -D xnPORT_SQI_CS0=PORT_SQI_CS_0 -D xnPORT_SQI_SCLK0=PORT_SQI_SCLK_0 -D xnPORT_SQI_SIO0=PORT_SQI_SIO_0 -x xc "fr-33c47df1" -o "fr-ae67ffd3"
XFlash_Utils::BuildRunCommand : xrun --io fr-ae67ffd3
Error: Failed to recognise flash device at node "0".
xrun: Program received signal ET_LOAD_STORE, Memory access exception.
      0x000408d0 in fl_getPageSize ()
Error: F03013 Failed to run : 0096E96C.

Since it is my board, I got access to all SPI pins, gave X0D01 a 1k pullup and X2D06 a 10k pullup.
Measuring the signals the driver tried to set QPI mode by sending 0xEB followed by a long time of nothing (think will wait for reply?). The nCS is released (went high) again.
Image

Later on, the chip is selected again to read the manufacturer id which is replied by a (for me) default SPI MISO response which is correct for IS25LP016D
Image
This is done 6 times after the script fails.

For me and my limited xmos experience it looks like the flash is not in QPI-mode and the data stream is misinterpreted.

Thanks for your advice,
Erwin


mmar
Experienced Member
Posts: 122
Joined: Fri Jul 05, 2013 5:55 pm

Post by mmar »

Check if you use XEF232-1024-FB374-C40 or XEF232-1024-FB374-C40A . A need other flash config and 14.4 ...
ASDF
New User
Posts: 3
Joined: Fri Feb 25, 2022 1:29 pm

Post by ASDF »

Hey,

thank you for this hint.
It seems like 14.4.1 can read the flash, but E032A2C40 is marked on both chip-revisions?????

Erwin
Post Reply