Jump to content
  • 0

SF3 - And operation when writing data


rzsmi

Question

I am using a SF3 Fram Pmod. The project originally used an Adafruit SPI Non-Volatile 8KByte FRAM breakout. However, the project needed a larger storage device and the SF3 was chosen.

It appears the SP3 stores data is by doing a bitwise operation between the registers and the new message. Basically, each time a register is written to, the RAM does a bitwise AND operation with the previous value. When the erase command is sent, the registers are set to xFF, so any data can be written there, but when overwriting a previous value (other than xFF), the result may be different than expected.

Example 1:

image.png.3e9e31e08765ff08268f289299c0e805.png

Example 2

image.png.e730ab26d0b2a8f86c1d6f150ed191b4.png

Example 2 shows the correct value because the ‘1’s line up.

The Adafruit FRAM does not have this feature.

image.png.99042f5d68274a4ee6ef086bf0f196b8.png

Am I missing something? Is there a way to store changing data on the SF3 without having to erase an entire block before rewriting a single byte?

Thanks in advance.

 

 

 

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Hi @rzsmi,

I'll clarify up front that the Pmod SF3, https://digilent.com/reference/pmod/pmodsf3/start, is not FRAM, but is instead Serial NOR Flash memory. If you see any Digilent material advertising the Pmod SF3 (or any of our flash memory) as FRAM please let me know so I can get this corrected as to the best of my knowledge Digilent has never made a product with FRAM.

What I believe you are running into is the difference between the FRAM and NOR Flash technologies. As per the Wikipedia page on FRAM, https://en.wikipedia.org/wiki/Ferroelectric_RAM, the read process is destructive, effectively meaning that it erases the data that is read, making it so that you have to re-write data into that byte/region before you can read it again.

Conversely, the read process NOR Flash is not destructive and the write process either sets the bit (binary data value of '0' for NOR Flash) or does not. Resetting the individual bit to it's default state (binary data value of '1' for NOR flash) is only done by applying a large voltage in the opposite polarity across the transistor, i.e. the erase operation. The catch here is that the erase operation on NOR Flash in general is done in batches; for the flash memory on the Pmod SF3 specifically, https://media-www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/n25q/n25q_256mb_3v.pdf, Memory Organization section, the smallest erase area is a subsector which is 4 KBytes (or 16 pages of 256 bytes).

So, both flash memories (the Digilent Pmod and the Adafruit FRAM) are operating as designed and expected.

Let me know if you have any questions.

Thanks,
JColvin

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...