I am using xTime Composer community 14.2.2 and I can't find the libquadflash in the libraries window. Where do I find this library and how do I add it to a project?

I have found the libquadflash API document but it doesn't say how to load the library.

I have also found the document Application Note: AN00188 Using QuadSPI flash memory for persistent storage with xCORE-200. In this document it talks about using the library by adding an XCC_FLAG to the make file. However, I would like access to the actual library source code to use the low level functions in my own high level routines. Is this possible with this library?

Proceed with caution as we found assorted issues with this code during our last review. Perhaps the code has improved since our last review but the datecode of this github is 3 years old so still looks to be the same. Recommend to test the code by starting with standard SPI commands to R/W/E your target SPI flash and then shifting into QSPI mode. Invested weeks into this topic and brought in the QSPI flash plugin and verified our understanding against the Zeroplus logic analyzer. Found that Spansion QSPI flash devices were better behaved than Winbond. Our DUT was mated with shielded logic probes which may have been too long for QSPI testing but we observed that standard and QSPI operations were stable with Spansion but Winbond would fail when used in QSPI mode (standard SPI mode worked fine). Alerted Winbond on our observations and they then supplied us with an improved die version which featured a pin drive register. Believe with that version of the flash device worked.

Also, the xflash tool is able to R/W/E with QSPI devices and also better maintained. However, so far, we have not validated the operation of QSPI mode using the xflash tool. Recommend to test your target design with the latest xflash tool - if that works for you with stability, then proceed to work with the above git hub code to test the same.

Spansion is now Cypress. Cypress is doing their usual, slashing and burning most of the acquired Spansion line of devices so you will need to check on their website as to which flash devices are still active.

the datecode of this github is 3 years old so still looks to be the same.

Hi guys - that is true and, as you have deduced, the code is no longer maintained there. This library was pulled into the tools at that time and is now included as part of an internal XMOS tools repo.

Included in xTIMEcomposer is flash.h which provides the API for the maintained version of this library. The library itself, is supplied as a compiled library object in the tools which will be linked if you use the

As infiniteimprobability has rightly pointed out the libraries libflash, and the new libquadflash are shipped as part of the xTIMEcomposer tools. As it is libquadflash that you wish to use, then you will need to include quadflash.h and link to -lquadflash as described in the AppNote AN00188 that you have already referred to. Note that you will only have access to the high level functions as described in the API document (or quadflash.h). No access is provided to the low level functions that are used to execute the commands on the QSPI device itself.

OK thanks however this is not useful to me as I am trying to get a new hardware platform working and the quad flash is not responding so I need to debug it at a low level. So if I cannot have API access to these low level routines, then I will need to write and debug my own. My preference of course would be to not reinvent the wheel. Any help here would be appreciated.

The symptom of not responding is that when I try to program the quad flash device, xflash hangs.

1) A QSPI flash should be fine to allow R/W using standard SPI flash commands (ie. not QSPI mode). Upload a working LED flasher code into your target flash device and then solder back onto your target board and confirm that the CPU is able to boot from this flash device for your blinky.

2) Using the same set of tools for standard SPI mode, you can then enable the bit to force the QSPI mode. Proceed accordingly to test the QSPI mode of access.

Openly we could not digest the many steps to use the QSPI mode of XFLASH so just proceeded to R/W using standard mode. Did a very similar exercise to duplicate the QSPI flash device for the XCORE AUDIO board. Started with a blank and used only the very slow standard SPI commands to read out the original contents -> transplanted to a blank -> then enabled the QSPI mode and soldered back onto the XMOS board -> worked 100%.