Programming S25FL127S

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
adpac_1560036
Level 4
Level 4
First like received First like given

Hi, I am trying to establish communication with the S25FL127S flash chip with my PSoC 3 CY8CKIT - 030. Can someone please help me in the programming the SPI interface with the chip. 

   

I hope I can get a basic code example how to perform SPI write and read to the device. 

   

Thank you

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi Aditya,

   

Please check the attached file.

   

Thanks,

   

Krishna.

View solution in original post

0 Likes
15 Replies
Anonymous
Not applicable

Hi Aditya,

   

I am attaching the project where basic code for read and write for S25Fl512S is implemented using Cy8CKIT -042. You can use this as reference.

   

The basic read and write operations will be same. Please go through it and let us know if you need any clarifications.

0 Likes
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi Aditya,

   

Please check the attached file.

   

Thanks,

   

Krishna.

0 Likes

Thank you very much Mr.Krishna, I will go through the project file and get back to you for further clarifications. Thank you!!

0 Likes

Mr. Krishna, the files slld.h and slld_targetspecific.h are missing in the project design 3. Are those files from spansion low level driver are taken directly without any changes?. If so, I will copy those files to the project and build it. 

   

Thank you in advance.

0 Likes
Anonymous
Not applicable

Hello Aditya,

   

You need not do any changes in slld.h file. But in slld_targetspecific.h is the file you need to un comment Fl-S family. Since the part belongs to Fl-S family.

   

Below is the line which you need to un comment :

   

#define FL_S

   

Thanks,

   

Krishna.

0 Likes

Thank you Krishna..I will get back to you after I work it out

0 Likes
Anonymous
Not applicable

You can use the files from the low level driver doing the modification mentioned above.

   

Thanks,

   

Krishna.

0 Likes
adpac_1560036
Level 4
Level 4
First like received First like given

Mr.Krishna, I am trying to interface with the FL164K device using the project you have posted. When I un comment the "#define FL_K" line in slld_targetspecific.h file, I am encountering the following warning and error. 'slld_BlockEraseCmd': missing function-prototype and Build error: 'slld_BlockEraseCmd': requires ANSI-style prototype. 

   

But when I un comment the #define FS_S line, the project builds successfully. Could you explain me  what is going wrong?

0 Likes
Anonymous
Not applicable

Hi Aditya,

   

If you are interfacing FL164K you need to un comment  #define FL_1K not FL-K since FL164K belongs to FL_1K family.

   

The reason for the error could be because in the project I have un commented the below line in FS_S section in slld.h file.

   

//#define REMOVE_BLOCKERASECmd

   

​In REMOVE_BLOCKERASECmd  the function slld_BlockEraseCmd is called.

   

Please uncomment only #defineFL1-K  in target specific.h file for S25FL164K device and check. Comment all other families.

   

Thanks,

   

Krishna.

        Oh. Thank you for the clarification Mr.Krishna, I will do so and check.   
0 Likes

Mr.Krishna, I have built the code un commenting only the #defineFL_1K line but still the error I mentioned previously persist. Should I un comment any lines in the FL_1K section of slld.h file?. All the questions I ask may sound silly to you. Could you please explain me why you have un commented  //#define REMOVE_BLOCKERASECmd line in FS_S section?. The chip you used belongs to FL_S family right?. 

0 Likes
lock attach
Attachments are accessible only for community members.
adpac_1560036
Level 4
Level 4
First like received First like given

Dear Mr. Krishna, I have been working on interfacing s25fl164k with psoc 3. I am using the same project you have provided and made changes to suit fl164k. I am not able to succeed in my attempt.  I have decided to make sure my hardware is correct. Please find the attached image of the schematic (it is mentoned as s25fl512s but i am using s25fl164k). Please tell me if it works fine. 

0 Likes
Anonymous
Not applicable

Hi Aditya,

   

Could you please explain me why you have un commented  //#define REMOVE_BLOCKERASECmd line in FS_S section?

   

A) You can comment this line . I think it might have been un commented by mistake. That line does not make any difference as you are using FL1K part. Do you see any errors if you comment out that line.

   

I will review your schematic and will update you.

   

Thanks,

   

Krishna.

0 Likes
Anonymous
Not applicable

Hello Aditya,

   

The RESET pin ( pin no : 3) and  VIO pin ( no : 14) is not present in S25FL164K. They are DNU as per the datasheet.

   

Please refer Figure 5.2 in the datasheet.

   

Datasheet link : http://www.cypress.com/file/196886/download

   

Thanks,

   

Krishna.

0 Likes
lock attach
Attachments are accessible only for community members.
adpac_1560036
Level 4
Level 4
First like received First like given

Krishna, 

   

Thank you very much for the notice. I have designed the schematic for s25fl512s and have mounted s25fl164k. That was a mistake. I will rectify that. I am uploading the bundled workspace of the project I have been working on. Please go through it when you find time. 

0 Likes