Hi Carlos_Mendoza,
Thank you for taking the time to respond. You are correct, I am looking at the examples that come with MCUXpresso.
That's what I found as well, that the spifiDeviceDataSetOptsQuadModeBit9 function exists for Micron parts, and the spifiDeviceDataSetOptsQuadModeBit9Simple exists for other parts.
However, I still see issues with the library.
First, the conditional compilation flags that are used to include/exclude parts from the build process are incorrect. As I've copied here, you can see that the wrong parts are included with the wrong flags. This is very misleading and should be corrected.
#define NEED_spifiDeviceDataSetOptsQuadModeBit9 (SPIFI_DEVICE_ALL | \
SPIFI_DEVICE_S25FL016K | \
SPIFI_DEVICE_S25FL032P | \
SPIFI_DEVICE_S25FL064P | \
SPIFI_DEVICE_S25FL129P_64K | \
SPIFI_DEVICE_S25FL129P_256K | \
SPIFI_DEVICE_S25FL164K | \
SPIFI_DEVICE_S25FL256S_64K | \
SPIFI_DEVICE_S25FL256S_256K | \
SPIFI_DEVICE_S25FL512S | \
SPIFI_DEVICE_W25Q80BV | \
SPIFI_DEVICE_W25Q32FV | \
SPIFI_DEVICE_W25Q64FV)
#define NEED_spifiDeviceDataSetOptsQuadModeBit9Simple (SPIFI_DEVICE_ALL | SPIFI_DEVICE_GD25Q32C)
Second, almost all of the flash parts are defined and configured to use the wrong spifiDeviceDataSetOptsQuadModeBit9. They should be using the "simple" version, but they are using the Micron version. This is a mistake that needs to be corrected.
Third, there are other conditional complication flags that are simply missing. For example, SPIFI_DEVICE_GD25Q32C is not actually defined anywhere.
My suggestion is to completely remove all of these conditional compilation flags (SPIFI_DEVICE_*, NEED_*). They make the code difficult to read, they are out of date, and they are a maintenance nightmare. If someone then wants to remove support for unneeded parts, they can simply delete them and be done with it.
I've done exactly this within my own code base, and it's so much easier to read. I've also formatted the code to get consistent formatting (no tabs, consistent indentation, etc) and it looks much more professional now.
Anyways, just my two cents. I hope these issues get corrected in the SPIFI library. And I hope this is helpful to anyone which might read it.