Need help using new flash device

Technical questions regarding the XTC tools and programming with XMOS.
Posts: 1
Joined: Tue Jun 13, 2017 3:33 pm

Need help using new flash device

Post by kaphely »

Hi all, I am new to the this forum so I might ask questions that have already been answered in the past. Excuse me if it is the case.

We want to use a ISSI IS25LP080D flash chip to store the code for the XU216-512-TQ128-C20 chip.

We were using the natively supported IS25LQ080B flash chip before but since it is obsolete now, we want to move to a replacement.

I read the steps on how to use a custom flash device in the documentation but this seems to be more related on how to actually talk to the chip while code is running. I do not need to do this. I just want to be able to program the new IS25LP080D using xTime composer Flash tool (using xFlash basically) using an Xtag programmer, then I want the XMOS chip to be able to boot on its own using this chip.

Right now, we saw that the XMOS does not boot from the new flash as it does not recognize its Manufacturer ID and device ID while talking to it.

So I already changed my xn file to tell it to use a IS25LP080D:
<Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash"
<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" />

But what else do I need to update so the environment understands what a IS25LP080D is? Where do I need to store that flash spec file as mentioned in the documentation (this is really something that is unclear to me). And more specifically, how do I tell the XMOS bootloader how to talk to this new chip?

Any help will be gratly appreciated.



User avatar
XCore Expert
Posts: 754
Joined: Thu Dec 10, 2009 6:56 pm

Post by Bianco »

You can add the following to the device tree that you posted above in the XN file to indicate the location of the Quad-Enable bit:

Code: Select all

<Attribute Name="QE_REGISTER" Value="quad_spi_qe_location_status_reg_0"/>
<Attribute Name="QE_BIT" Value="quad_spi_qe_bit_6"/>
Modify to suite your new device.
The above should be correct for IS25LP080D, considering these are also the default values taken, this might not be your issue.

You cannot tell the ROM bootloader anything about new devices, it expects that your quad-spi flash device conforms some standard with regards to protocol for reading.
Experienced Member
Posts: 74
Joined: Mon Dec 16, 2013 12:14 pm

Post by colin »

Hi Kaphely

You can store your spi-spec file anywhere you choose. When you use xflash be sure to pass the spi-spec file in with your xflash command. i.e. xflash my_xe --spi-spec=path/to/my/spi-spec.

Best Wishes
Posts: 1
Joined: Wed Aug 02, 2017 10:37 pm

Post by asr »

Has anyone been able to figure out how to get the new flash chip that Kaphely is using to work?
New User
Posts: 3
Joined: Sun Nov 05, 2017 4:05 am

Post by mditsler »

asr wrote:Has anyone been able to figure out how to get the new flash chip that Kaphely is using to work?
Yes. I'm using the ISSI IS25LP080D on a custom board that was originally designed for the IS25LQ080. I got the new version to work with the following settings:

In my xn file:

Code: Select all

<Device NodeId="0" Tile="0" Class="SQIFlash" Name="bootFlash" Type="IS25LP080D">
  <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"/>

And for the spi-spec file, I used:

Code: Select all

    10,			/*  flash id = value returned by fl_getFlashType						*/
    256,			/*  page size in bytes											*/
    4096,			/*  number of pages												*/
    3,                         /*  number of address bytes to send								*/
    3,                       	/*  divider to generate the SPI clock from the reference clock				*/
    0x9F,			/*  command to read the device ID									*/
    0,                       	/*  number of dummy bytes returned before the ID						*/
    3,				/*  ID size in bytes												*/
    0x9D6014,		/*  expected device ID											*/
    0x20,			/*  command to erase all or part of a sector							*/
    4096,			/*  number of bytes erased by sector erase;  0 = entire sector				*/
    0x06,			/*  command to write-enable the device								*/
    0x04,			/*  command to write-disable the device								*/
    PROT_TYPE_NONE,	/*  protection type;  PROT_TYPE_NONE = no protection				*/
    {{0,0},{0,0}},		/*  description of the device protection								*/
    0x02,			/*  command to program a page									*/
    0xEB,			/*  command to read data										*/
    6,				/*  number of dummy bytes returned before the data					*/
    SECTOR_LAYOUT_REGULAR,	/*  sector layout; SECTOR_LAYOUT_REGULAR=all sectors same size	*/
    {4096,{0,{0}}},	/*  sector sizes													*/
    0x05,			/*  command to read  the status register								*/
    0x01,			/*  command to write the status register								*/
    0x01,			/*  bit mask for the Write In Progress bit								*/
I haven't fully tested libflash (or libquadflash) with the above, but I'm happily flashing code and booting from it without any issues.

Posts: 1
Joined: Thu Nov 23, 2017 11:54 am

Post by gro »

Hi all,
I'm a Newbie in using xcores and the composer. As 'kaphely' we want to use use a ISSI IS25LP080D flash chip instead the B-type to store the code for the XU216-512-TQ128-C20 chip. We can't buy them anymore.

I studied the User guide and the posts above to change the flash type but I cant make it. Can anybody show me the steps how to change the composer to use the new flash memory?

Posts: 27
Joined: Sat May 09, 2020 4:20 pm

Post by fabra »

Good news: xTimeComposer 14.4. seems to support more flashes