Author Topic: bit/byte programmable NOR Flash  (Read 1970 times)

0 Members and 1 Guest are viewing this topic.

Offline gaminnTopic starter

  • Frequent Contributor
  • **
  • Posts: 343
  • Country: 00
bit/byte programmable NOR Flash
« on: June 22, 2020, 06:49:42 pm »
Hi,
in my embedded device I would like to store some records in NOR flash. The record contains some meta data that can be updated eventually. Are there NOR flash chips capable of programming single bits (or at least bytes) at bit/byte locations containing 1s but at page that was already written with some data? Because I don't want to reprogram the whole updated record to erased page....

I found e.g. this device https://www.mouser.com/datasheet/2/949/w25q64jv_revj_03272018_plus-1489671.pdf and the datasheets says "In some cases, less than 256 bytes (a
partial page) can be programmed without having any effect on other bytes within the same page".

However, I would like to be 100% sure that programming bits/bytes into already programmed pages won't degrade the memory array.

Do you know any devices capable of this?
 

Offline FenTiger

  • Regular Contributor
  • *
  • Posts: 88
  • Country: gb
Re: bit/byte programmable NOR Flash
« Reply #1 on: June 22, 2020, 07:51:17 pm »
A few years ago I designed a Flash file system for embedded use which relied heavily on the ability to flip any single bit from 1 to 0, even if other bits had already been cleared in the same page, or even in the same byte.

I won't go as far as to say that any SPI NOR Flash will support this, but we used this in production for years, with a variety of different Flash devices, and never had a problem with it.

What you can't do is program a 0 bit back to 1. That has to be done to an entire erase block at once.
 

Offline gaminnTopic starter

  • Frequent Contributor
  • **
  • Posts: 343
  • Country: 00
Re: bit/byte programmable NOR Flash
« Reply #2 on: June 22, 2020, 08:12:46 pm »
Hi FenTIger and thank you for your reply. Do you remember exactly which NOR flash chips you use?

I found this info in several NOR flash's datasheets

ISSI IS25xxxx devices: "A program operation can alter “1”s into “0”s. The same byte location or page may be programmed more than
once, to incrementally change “1”s to “0”s. An erase operation is required to change “0”s to “1”s"

Cypress S25FL064L: "For the very best performance, programming should be done in full pages of 256bytes aligned on 256byte boundaries
with each Page being programmed only once."

Microchip SST26WF064C: nothing

For me it seems that we have to pick the NOR flash carefully with this feature in mind.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6420
  • Country: de
Re: bit/byte programmable NOR Flash
« Reply #3 on: June 22, 2020, 09:30:39 pm »
FRAM or MRAM. Act as SRAM, but are non-volatile. Cypress and Everspin are the main manufacturers.

 

Online ejeffrey

  • Super Contributor
  • ***
  • Posts: 4034
  • Country: us
Re: bit/byte programmable NOR Flash
« Reply #4 on: June 22, 2020, 09:44:07 pm »
There is a difference between supporting it and describing it in the datasheet vs. it working.  Standard NOR flash would need to take special precautions to prevent this from working, so it will probably work in most flash chips.

One thing that I have heard about (I think) NAND flash, not sure if true or if it applies to NOR flash is that writing '0' to to an already programmed bit causes excessive wear.  Therefore it is recommended that when you execute your subsequent write you only try to program the bits that are still erased.  If you do that you have to be careful that you don't break any write verification you are using.
 

Offline FenTiger

  • Regular Contributor
  • *
  • Posts: 88
  • Country: gb
Re: bit/byte programmable NOR Flash
« Reply #5 on: June 22, 2020, 10:09:11 pm »
Do you remember exactly which NOR flash chips you use?

Sorry, I can't give you any specific part numbers. It was a while ago, and all the schematics / BOMs etc were the company's property, not mine, so I don't have any record at all of these details. All I can remember was that they were bog-standard cheap serial Flash chips, 8-pin SOICs if i remember correctly, from a variety of vendors. I doubt that's very helpful, though. ;)

ISSI IS25xxxx devices: "A program operation can alter “1”s into “0”s. The same byte location or page may be programmed more than once, to incrementally change “1”s to “0”s. An erase operation is required to change “0”s to “1”s"

Every single part we tried worked in this way.

Cypress S25FL064L: "For the very best performance, programming should be done in full pages of 256bytes aligned on 256byte boundaries with each Page being programmed only once."

This certainly seems correct - programming regions more than once, or programming sub-page regions, necessarily incurs more overhead. I used the "clear a bit in an already programmed byte" operation for correctness / atomicity, not for performance. You should try to follow this rule for writing bulk data.

One thing that I have heard about (I think) NAND flash, not sure if true or if it applies to NOR flash is that writing '0' to to an already programmed bit causes excessive wear.

This could well be correct. We only used (el-cheapo) NOR flash for this, never (high-density) NAND flash.
« Last Edit: June 22, 2020, 10:11:24 pm by FenTiger »
 

Offline rounin

  • Regular Contributor
  • *
  • Posts: 125
  • Country: us
Re: bit/byte programmable NOR Flash
« Reply #6 on: June 23, 2020, 05:46:09 pm »
Some fancier modern NOR flashes have ECC per page that becomes invalidated when you overwrite / re-write a page. It works, but the chip remembers that the ECC is bad now and won't give ECC-bad errors for that page. Some super modern (I guess small process size that don't hold a lot of charge) NOR flashes support overwriting pages but don't recommend it because it could case a disturbance of the other bits or reduce retention time. I don't have a part number on the top of my head that said that, but remember seeing it sometime a couple years ago when looking for 20+ year retention time flash.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf