bit/byte programmable NOR Flash - Page 1
Forum section: electronics / projects

author: gaminn
author_rank: Frequent Contributor
timestamp: June 22, 2020, 06:49:42 pm
content: 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 devicehttps://www.mouser.com/datasheet/2/949/w25q64jv_revj_03272018_plus-1489671.pdfand the datasheets says "In some cases, less than 256 bytes (apartial 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?

author: FenTiger
author_rank: Regular Contributor
timestamp: June 22, 2020, 07:51:17 pm
content: 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 thatanySPI 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.

author: gaminn
author_rank: Frequent Contributor
timestamp: June 22, 2020, 08:12:46 pm
content: 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 datasheetsISSI IS25xxxx devices: "A program operation can alter “1”s into “0”s. The same byte location or page may be programmed more thanonce, 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 boundarieswith each Page being programmed only once."Microchip SST26WF064C: nothingFor me it seems that we have to pick the NOR flash carefully with this feature in mind.

author: Benta
author_rank: Super Contributor
timestamp: June 22, 2020, 09:30:39 pm
content: FRAM or MRAM. Act as SRAM, but are non-volatile. Cypress and Everspin are the main manufacturers.

author: ejeffrey
author_rank: Super Contributor
timestamp: June 22, 2020, 09:44:07 pm
content: 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.

author: FenTiger
author_rank: Regular Contributor
timestamp: June 22, 2020, 10:09:11 pm
content: Quote from: gaminn on June 22, 2020, 08:12:46 pmSorry, 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.Quote from: gaminn on June 22, 2020, 08:12:46 pmEvery single part we tried worked in this way.Quote from: gaminn on June 22, 2020, 08:12:46 pmThis 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.Quote from: ejeffrey on June 22, 2020, 09:44:07 pmThis could well be correct. We only used (el-cheapo) NOR flash for this, never (high-density) NAND flash.

author: rounin
author_rank: Regular Contributor
timestamp: June 23, 2020, 05:46:09 pm
content: 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.