Unexpected xflash behaviour with S25FL116K

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
User avatar
CousinItt
XCore Addict
Posts: 212
Joined: Wed May 31, 2017 6:55 pm

Unexpected xflash behaviour with S25FL116K

Postby CousinItt » Wed Jan 13, 2021 3:18 pm

Hi,

the xCORE-200 explorerKIT has been fitted with various flash devices. I have one with a Spansion S25FL116K and I'm resurrecting an old project for it using xTimeComposer 14.4.1 (under windows 10 64-bit). This has meant some modifications to the XN file, which has also uncovered a problem. I'm not sure if this is a bug or if I'm doing something daft. Please advise. Full description follows.

The original device spec in the XN file is:

Code: Select all

    <Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" Type="S25FL116K">
      <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>
The updated spec is:

Code: Select all

    <Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" Type="SPANSION_S25FL116K">
      <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="flash_qe_location_status_reg_0"/>
      <Attribute Name="QE_BIT" Value="flash_qe_bit_6"/>
    </Device>
This works fine: the program can run in RAM or from flash. However, during flashing this warning appears:
The use of libquadflash will be deprecated from XFLASH in xTIMEcomposer 15.0.0. # Please add the PageSize, SectorSize and NumPages attributes to your External Device definitions in your target XN file to enable the use of lib_flash.
When I try that, as follows, xflash claims to have programmed the device successfully, but it doesn't work.

Code: Select all

    <Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" Type="SPANSION_S25FL116K" PageSize="256" SectorSize="4096" NumPages="8192">
...
Comparing the --verbose output of xflash, I can see the following differences:

Working:

Code: Select all

XFlash_DeviceInfo::GetDeviceInfo_Hardware
XFlash_DeviceInfo::GetDeviceInfo_Hardware_IssueCompileCommand : xcc -Xmapper --dontenablesodlinks -Xmapper --wnoXN -x xc "spiinfo-97cad04a" -x xn "target-xn-v0-f9125f54" -o "spiinfo-6a2ac69e" -lquadflash -D xnPORT_SQI_CS0=PORT_SQI_CS -D xnPORT_SQI_SCLK0=PORT_SQI_SCLK -D xnPORT_SQI_SIO0=PORT_SQI_SIO 
XFlash_Utils::BuildRunCommand : xrun --io spiinfo-6a2ac69e 
XFlash::BuildFlashBinaryFile
Faulty:

Code: Select all

XFlash_DeviceInfo::GetDeviceInfo_SQI
XFlash::BuildFlashBinaryFile
The working case later refers to -lquadflash and gives updates as it flashes site 0; the faulty case refers to -lquadspi and then skips any updates but still claims success.

Sorry this is a long post - I wanted to provide all the info.

Who is online

Users browsing this forum: No registered users and 8 guests