Error F03013, verification failure / programmer writing random value

Technical questions regarding the XTC tools and programming with XMOS.
fletchryde2112
New User
Posts: 2
Joined: Tue Aug 20, 2024 4:19 pm

Error F03013, verification failure / programmer writing random value

Post by fletchryde2112 »

Hey all,

I was recently assigned to a project that involves flashing a custom board with an XE216-C20 chip and onboard flash memory, IS25LP080D.

However, upon following the given documentation and running the command xflash bin/<targetfile>.xe I am presented with the following error:

Code: Select all

.
.
.
XFlash_Builder_Binary::GetSearchLimitPadding : current size (f000) 0
XFlash_Builder_Binary::CalculateBufferSize_Data
XFlash_Builder_Binary::BuildBinary : Allocating buffer - f000
XFlash_Builder_Binary::GetSearchLimitPadding : current size (f000) 0
XFlash_Builder_Binary::WriteBufferToBinary : flash_bin_node0
XFlash_Builder_Storage_PPB::BuildStorage
XFlash_Programmer_Write::DoWrite
XFlash_Programmer_Write::IssueCompileCommand
xcc -w -fxscope -x xn "target-xn-v0-f535c753" -O2 -lquadflash -D xnPORT_SQI_CS0=PORT_SQI_CS -D xnPORT_SQI_SCLK0=PORT_SQI_SCLK -D xnPORT_SQI_SIO0=PORT_SQI_SIO -x xc "fw-f21db6d0" -o "fw-0f76a135" 
XFlash_Utils::BuildRunCommand : xrun --xscope fw-0f76a135 
Site 0 has started.         
Site 0 has ID   0x9d6014.   
Site 0 erase    0x00000000. 
Site 0 write    0x00000000. 
Verify failed for page 0x00000000, offset 0x0000 (read 0x00, expected 0x37).
Error: F03013 Failed to run : 0x7ffc445bae80.
It seems here that, if I understand this correctly, the programmer tries to write a 0 to a location where a 0x37 should be written. Then when it tries to verify the value it gets confused and shuts down. What could be the problem here?
I've tried declaring different options in my environment but all to no avail (such as specifying the partition size, i have yet to change the spi settings), partially due to my current lack of experience with the XMOS architecture.

The board is a verified design and has worked in the past. We recently sourced production from a different company though and the board I am using is a part of that batch. Running the .xe with xrun --xscope bin/<targetfile>.xe is successful.

For reference, the .xn file entry regarding the flash device is is as follows:

Code: Select all

 .
 .
 .
 69   <ExternalDevices>
 70     <Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" Type="ISSI_IS25LP080D" PageSize="256" SectorSize="4096" NumPages="4096">
 71       <Attribute Name="PORT_SQI_CS" Value="PORT_SQI_CS"/>
 72       <Attribute Name="PORT_SQI_SCLK"   Value="PORT_SQI_SCLK"/>
 73       <Attribute Name="PORT_SQI_SIO"  Value="PORT_SQI_SIO"/>
 74     </Device>
 75   </ExternalDevices>
Any suggestions regarding this issue are much appreciated. Thank you!
fletchryde2112
New User
Posts: 2
Joined: Tue Aug 20, 2024 4:19 pm

Post by fletchryde2112 »

Has anyone experienced a similar issue in their custom builds? I have been unable to solve the problem as of yet.

On certain boards in the batch, running the following commands worked:

Code: Select all

xflash -v bin/<path> -o outfile.bin
xflash -v --target-file src/<path> --erase-all
xflash -v --target-file src/<path> --write-all
but the results of this were inconsistent, i.e. many of the boards did not flash at all. And on the boards that flashed, I get USB ERROR -71 upon plugging the device in (fit for a different topic).
Last edited by fletchryde2112 on Wed Aug 21, 2024 3:29 pm, edited 1 time in total.
Joe
Verified
Experienced Member
Posts: 66
Joined: Sun Dec 13, 2009 1:12 am

Post by Joe »

Site 0 has ID 0x9d6014: So the program read the correct device ID from the flash: This corresponds to the IS25LP080D part.

It then programmed one page and read it back to compare and found the first byte of the page was 00 and it should have been 0x37.

Could be a problem with the quad enable bit not being set in flash? This would stop the read working.

What version of tools are you using, and the full xmos device part number?

Cheers,
Joe
XMOS hardware grey beard.
fletchryde2112
New User
Posts: 2
Joined: Tue Aug 20, 2024 4:19 pm

Post by fletchryde2112 »

Hi there and thank you for the response!
Joe wrote: Wed Aug 21, 2024 3:38 pm Could be a problem with the quad enable bit not being set in flash? This would stop the read working.
I modified my .xn file to look like this:

Code: Select all

<ExternalDevices>
 70     <Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" Type="ISSI_IS25LP080D" PageSize="256" SectorSize="4096" NumPages="4096">
 71       <Attribute Name="PORT_SQI_CS" Value="PORT_SQI_CS"/>
 72       <Attribute Name="PORT_SQI_SCLK"   Value="PORT_SQI_SCLK"/>
 73       <Attribute Name="PORT_SQI_SIO"  Value="PORT_SQI_SIO"/>
 74       <Attribute Name="QE_REGISTER" Value="quad_spi_qe_location_status_reg_0"/>
 75       <Attribute Name="QE_BIT" Value="quad_spi_qe_bit_6"/>
 76     </Device>
 77   </ExternalDevices>
but I'm still getting the same error.

For reference, my entire .xn file is as follows:

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" ManuallySpecifiedRouting="true">
  <Type>Board</Type>
  <Name>xMainboard_v2.0</Name>
  <Declarations>
    <Declaration>tileref tile[2]</Declaration>
    <Declaration>tileref usb_tile</Declaration>
  </Declarations>
  <Packages>
    <Package id="0" Type="XS2-UnA-512-TQ128">
      <Nodes>
        <Node Id="0" InPackageId="0" Type="XS2-L16A-512" OscillatorSrc="1" SystemFrequency="500MHz" referencefrequency="100MHz">
          <Boot>
            <Source Location="SPI: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"/>
            <!-- Audio Ports -->
            <Port Location="XS1_PORT_1M" Name="PORT_MCLK_IN"/>
            <Port Location="XS1_PORT_1N" Name="PORT_PPS_IN"/>
            <Port Location="XS1_PORT_1E" Name="PORT_FSYNC_OUT0"/>
            <Port Location="XS1_PORT_1G" Name="PORT_FSYNC_OUT1"/>
            <Port Location="XS1_PORT_1I" Name="PORT_FSYNC_OUT2"/>
            <Port Location="XS1_PORT_1K" Name="PORT_FSYNC_OUT3"/>
            <Port Location="XS1_PORT_1F" Name="PORT_BCLK_OUT0"/>
            <Port Location="XS1_PORT_1H" Name="PORT_BCLK_OUT1"/>
            <Port Location="XS1_PORT_1J" Name="PORT_BCLK_OUT2"/>
            <Port Location="XS1_PORT_1L" Name="PORT_BCLK_OUT3"/>
            <Port Location="XS1_PORT_4C" Name="PORT_DATA_IN0"/>
            <Port Location="XS1_PORT_4D" Name="PORT_DATA_IN1"/>
            <Port Location="XS1_PORT_4E" Name="PORT_DATA_IN2"/>
            <Port Location="XS1_PORT_4F" Name="PORT_DATA_IN3"/>

          </Tile>
          <Tile Number="1" Reference="tile[1]">
            <Port Location="XS1_PORT_4C" Name="PORT_LEDS"/>
            <Port Location="XS1_PORT_1P" Name="PORT_GPS_RX"/>
            <Port Location="XS1_PORT_1O" Name="PORT_GPS_TX"/>
            <Port Location="XS1_PORT_1D" Name="PORT_GPS_RX_2"/>
            <Port Location="XS1_PORT_1C" Name="PORT_GPS_TX_2"/>
          </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>
  <Nodes>
    <Node Id="2" Type="device:" RoutingId="0x8000">
      <Service Id="0" Proto="xscope_host_data(chanend c);">
        <Chanend Identifier="c" end="3"/>
      </Service>
    </Node>
  </Nodes>
  <Links>
    <Link Encoding="2wire" Delays="4,4" Flags="XSCOPE">
      <LinkEndpoint NodeId="0" Link="XL0"/>
      <LinkEndpoint NodeId="2" Chanend="1"/>
    </Link>
  </Links>
  <ExternalDevices>
    <Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" Type="ISSI_IS25LP080D" PageSize="256" SectorSize="4096" NumPages="4096">
      <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"/>
      <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="1"/>
  </JTAGChain>
</Network>
Joe wrote: Wed Aug 21, 2024 3:38 pm What version of tools are you using, and the full xmos device part number?
Back when the project was originally built, the developer was using XTC 15.2.1. I tried building with that version but I was still getting the same errors. I am now currently running XTC 15.3.0.
The chip I'm using is the XE216-512-TQ128-C20.

Thanks again!
Last edited by fletchryde2112 on Wed Aug 21, 2024 4:14 pm, edited 2 times in total.
fletchryde2112
New User
Posts: 2
Joined: Tue Aug 20, 2024 4:19 pm

Post by fletchryde2112 »

As an update, I was actually able to flash one of the other boards (by sheer luck, I suppose, as it only worked after trying over and over again... maybe a hardware bug has popped up) and plugged it into a Mac, where the device enumerated. Although I'm not too sure that the problem is solved here as the rest of the boards supposed functions do not work. So maybe back to the drawing board here.