Poor write performance with S25FL127S and S25FL128S

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

cross mob
Anonymous
Not applicable

I am communicating to a NOR FLASH S25FL127S and S25FL128S, using Windows and the FTDI FT4222H in SPI at 40Mhz.
I am able to write the 16 MB of data and read data correctly.

The read speed is 2.4 Mbyte/S reading 32k buffer in one USB/SPI operation.

But write speed is 2.5 Kbyte/S.

It takes about 75 ms to erase a 64k block and 1400 ms to write the 64k in pages of 256 bytes.

   

Is there a way to speed to writing of the data?

Here are the steps I am executing.

Erase64kSector()
   SetWriteRegisterEnable();
   WaitForOperation(); // Wait for chip to not be busy

ForEach 256byte in 64KBuffer
   SetWriteRegisterEnable();
   SPITransfer Page_PROGRAM + 256 bytes
   WaitForOperation(); // Wait for chip to not be busy

Thanks, Fred

0 Likes
1 Solution
TakahiroK_16
Employee
Employee
100 replies posted 50 replies posted 25 solutions authored

Hi Fred,

   

How did you measure the time of page programs?

   

I assume you instrumented a software timer like below, correct?

   

 

   

StartTimer();

   

 

   

ForEach 256byte in 64KBuffer

   

   SetWriteRegisterEnable();

   

   SPITransfer Page_PROGRAM + 256 bytes

   

   WaitForOperation(); // Wait for chip to not be busy

   

   

ReadTimer();

   

 

   

 

   

If yes, I recommend to measure the times for each step individually to identify the bottle neck.

   

Typically, transferring 256 bytes page data can contain system level (i.e., SPI host controller side) overhead and impact whole write throughput.

   

If the FT4222H supports Quad Page Program (QPP) command (0x32) and you don’t use it now,  QPP command can improve transfer rate a little.

   

 

   

Best Regards,

   

Takahiro

View solution in original post

0 Likes
4 Replies
TakahiroK_16
Employee
Employee
100 replies posted 50 replies posted 25 solutions authored

Hi Fred,

   

How did you measure the time of page programs?

   

I assume you instrumented a software timer like below, correct?

   

 

   

StartTimer();

   

 

   

ForEach 256byte in 64KBuffer

   

   SetWriteRegisterEnable();

   

   SPITransfer Page_PROGRAM + 256 bytes

   

   WaitForOperation(); // Wait for chip to not be busy

   

   

ReadTimer();

   

 

   

 

   

If yes, I recommend to measure the times for each step individually to identify the bottle neck.

   

Typically, transferring 256 bytes page data can contain system level (i.e., SPI host controller side) overhead and impact whole write throughput.

   

If the FT4222H supports Quad Page Program (QPP) command (0x32) and you don’t use it now,  QPP command can improve transfer rate a little.

   

 

   

Best Regards,

   

Takahiro

0 Likes
Anonymous
Not applicable

Takahiro, thanks for answering.

   

Yes I implemented a software timer.

   

> Typically, transferring 256 bytes page data can contain system level (i.e., SPI host controller side) overhead and impact whole write throughput. 
Yes it seems that waiting for 256 bytes page to be written is the big issue.

   


>If the FT4222H supports Quad Page Program (QPP) command (0x32) and you don’t use it now,  QPP command can improve transfer rate a little.
I do not think Quad mode would give me a 4 x increase, because the issue is not the transfer time, but the time to wait once the data has been sent to the NOR FLASH.

I am going to experiment with some NAND Flash with SPI interface, TOHISBA offer one that has  a 4k buffer.
I may get better write speed.

   

I do not know if cypress offer NAND Flash with SPI interface?

   

thanks.

0 Likes
ZhiF_31
Employee
Employee
25 sign-ins 10 solutions authored 5 solutions authored

Hi Fred,

   

At this point, Cypress does not offer SPI NAND devices.

   

As per your original question, I think you may want to investigate the 1400ms program time per 64KB sector. The typical program time in S25FL128S for a 256B page is only 250us. In S25FL127S, it is 395us. That means for the full 64KB sector, it should take typical 64ms in FL128S, and 101ms in FL127S. Note that this does not include the data transfer time. 

   

Therefore, I wonder if the measured 1400ms program time for one sector was mainly due to data transfer time. If you are running at 40MHz clock, the transfer time should not take that long, unless there are a lot of gaps in between data bytes. In such a case, you may want to look into optimizing the controller to minimize the gaps to achieve better performance. Moreover, as Takahiro suggested, you may use QPP command to transfer data in Quad IO format so the transfer time is less.

   

If you can provide a logic analyzer trace for a program operation, we can help analyze it.

   

Best regards,

   

Zhi

Anonymous
Not applicable

Zhi, thanks for your answer. I will later re start my testing.
As far I remember the issue was not to send the page of 256 byte for writing, but was after to wait for the FLASH chip to be ready to complete the write operation.

0 Likes