S25FL116K usage

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

cross mob
Anonymous
Not applicable

Hi,

   

i'm after some advice on the best way to change data on the flash device.

   

I've typically used eeprom in the past and modifying individual bytes has never been an issue.

   

I see with the S25FL116k device, to write even 1 byte, that location must first be erased (0xFF). 

   

The smallest amount of data that can be erased is a sector (4kB). 

   

Does this mean that i must copy 4kB of data, erase the sector and then re-write with data along with my new data?

   

It seems like i'm missing something. 

   

How do other people approach this.

   

Kind regards,

   

Damian

0 Likes
1 Solution
Anonymous
Not applicable

Hello Damian,

   

Q)Does this mean that i must copy 4kB of data, erase the sector and then re-write with data along with my new data?

   

A) Your understanding is correct. You need to copy the whole of 4KB, erase and then re write.

   

But it is not true in all the cases. Say initially the data in the location is 0x07(00000111) you can program it to 0x05(00000101) as you are not making any zeroes to one.  But you can not write 0x08 as it involves making the 4th bit zero which is not possible. You need to erase so that all the bits will be 1 and then make 4th bit zero.

   

Also when you are writing for the first there is no need to erase. Only if you are updating the already written data and if it involves changing 0 to 1 you need to erase adn rewrite it. This needs to be implemented in your code.

   

As we know in flash programming means changing 1 to 0. We can not make 0 to 1 which is why we erase and make all 1s.

   

Thanks,

   

Krishna.

View solution in original post

0 Likes
4 Replies