LCP4370 SPIFI support

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LCP4370 SPIFI support

1,177 Views
franz-ottowitte
Contributor II

I use currently the Spansion S25FL032P (4MB with 64KB sectors) . It needs to be by S25FL064L. Unfortunately the generic spifi driver does not work with that chip. Is there any way to modifiy the existing LPC18_43_SPIFI_GENERIC.cfx driver? - Where can I see, which flash parts are supported?

5 Replies

845 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Hi Otto,

Thank you for posting your solution.

Yours,

MCUXpresso IDE Support

0 Kudos

845 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Information on the LPC SPIFI flash drivers can be found in section 12.2.2, "SPIFI Flash drivers" in the MCUXpresso IDE v10.1 User Guide. You can also find the sources in the Examples subdirectory of the MCUXpresso IDE installation directory.

I would expect the current version of the driver to support S25FL064 though. What exactly do you see in the debug log? (See section 16.8, "The Console View" of the IDE v10.1 User Guide for details of how to access the log and copy the text from it.)

Regards,

MCUXpresso IDE Support

0 Kudos

845 Views
franz-ottowitte
Contributor II

Thanks for the quick support.

Looking into the project for the LPC18_43_lpcspifilib_driver.zip I found the following flash parts to be supported:

  • S25FL016K

  • S25FL032P

  • S25FL064P

  • S25FL129P 64k Sector>

  • S25FL129P 256k Sector

  • S25FL164K

  • S25FL256S

  • S25FL512S

  • MX25L1635E

  • MX25L3235E

  • MX25L6435E

  • MX25L8035E

  • W25Q32FV

  • W25Q64FV

  • W25Q80BV

Thus the S25FL064P is supported, but the successor S25FL064L is not. The P version is deprecated. Cypress is recommending to use the L version instead.

I tried already to recompile the SPIFI driver with exchanging JEDEC Ids but it doesn't seem to work so straightforward.

best regards

-Otto Witte

Von: lpcxpresso_support

Gesendet: Donnerstag, 25. Januar 2018 16:52

An: Franz-Otto Witte <otto.witte@teconcept.de>

Betreff: Re: - Re: LCP4370 SPIFI support

<https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg> NXP Community

Re: LCP4370 SPIFI support

reply from LPCX support <https://community.nxp.com/people/lpcxpresso_support?et=watches.email.thread> in MCUXpresso IDE - View the full discussion <https://community.nxp.com/message/981068?commentID=981068&et=watches.email.thread#comment-981068>

0 Kudos

845 Views
lpcxpresso_supp
NXP Employee
NXP Employee

Hi Otto,

From a brief look at the datasheet,  the ID bytes for the new SPIFI definition node should begin like this.


/* Add support for S25FL064L */
{
    static const SPIFI_DEVICE_DATA_T pData = {
        "S25FL064L",
        {{0x01, 0x60, 0x17}, 0, {0}},    /* JEDEC ID, extCount, ext data  */
...

Assuming this is what you have done, please can you let us know the behavour of the flash driver for the following options:

1 - a mass erase (this can be captured using the GUI flash programmer)

2 - a program operation (this can be captured using the debug log)

Also, it would be a good to test whether you can read values from the device (in the debugger memory editor) at 0x14000000. The device should be delivered erase, so should return 0xFF for each byte.

If this continues to fail, then I would next compare the config and status registers for the two parts.

Unfortunately, we currently do not have this particular device available for local testing.

Yours,

MCUXpresso IDE Support

0 Kudos

845 Views
franz-ottowitte
Contributor II

Hi again

A look in the data sheet revealed that the clock setting were the problem - with these settings the spifi driver works also with the S25FL064L

#define SPIFI_DEVICE_S25FL064L 0 /**< Enables Cypress S25FL064L device */

#if SPIFI_DEVICE_ALL || SPIFI_DEVICE_S25FL064L

/* Add support for S25FL064L */

{

static const SPIFI_DEVICE_DATA_T pData = {

"S25FL064L",

{{0x01, 0x60, 0x17}, 0, }, /* JEDEC ID, extCount, ext data */

(SPIFI_CAP_DUAL_READ | SPIFI_CAP_QUAD_READ | SPIFI_CAP_QUAD_WRITE | SPIFI_CAP_FULLLOCK |

SPIFI_CAP_NOBLOCK), /* Capabilities */

128, /* # of blocks */

0x10000, /* block size */

0, /* # of sub-blocks (Does NOT support full sub-block erase) */

0, /* sub-block size 0x1000 */

256, /* page size */

MAX_SINGLE_READ, /* max single read bytes */

54, /* max clock rate in MHz */

108, /* max read clock rate in MHz */

108, /* max high speed read clock rate in MHz */

108, /* max program clock rate in MHz */

108, /* max high speed program clock rate in MHz */

FX_spifiDeviceDataInitDeinit, /* (Fx Id) use generic deviceInit / deInit */

FX_spifiDeviceDataClearStatusS25FL032P, /* (Fx Id) has persistent bits in status register */

FX_spifiDeviceDataGetStatusS25FL032P, /* (Fx Id) getStatus */

FX_spifiDeviceDataSetStatusS25FL032P, /* (Fx Id) setStatus */

FX_spifiDeviceDataSetOptsQuadModeBit9, /* (Fx Id) to set/clr options */

FX_spifiDeviceInitReadCommand, /* (Fx Id) to get memoryMode Cmd */

FX_spifiDeviceInitWriteCommand /* (Fx Id) to get program Cmd */

};

static SPIFI_DEV_NODE_T data; /* Create persistent node */

data.pDevData = &pData; /* save the data in the node */

spifiDevRegister(&devFamily, &data); /* Register the new device */

}

#endif

Thanks for your good support.

-Otto

Von: lpcxpresso_support

Gesendet: Donnerstag, 25. Januar 2018 17:31

An: Franz-Otto Witte <otto.witte@teconcept.de>

Betreff: Re: - Re: LCP4370 SPIFI support

<https://community.freescale.com/resources/statics/1000/35400-NXP-Community-Email-banner-600x75.jpg> NXP Community

Re: LCP4370 SPIFI support

reply from LPCX support <https://community.nxp.com/people/lpcxpresso_support?et=watches.email.thread> in MCUXpresso IDE - View the full discussion <https://community.nxp.com/message/981028?commentID=981028&et=watches.email.thread#comment-981028>