• AVR Freaks

Hot!SST26VF032B flash memory issue.

Author
Akshayy
Super Member
  • Total Posts : 351
  • Reward points : 0
  • Joined: 2016/07/29 06:35:35
  • Location: 0
  • Status: offline
2018/03/30 10:51:58 (permalink)
0

SST26VF032B flash memory issue.

Hi,
 
   I am using this flash memory in my application.I have to send packets to server with 5sec interval.each packets has incremental frame number which is stored in flash.Every time I send packet to server I have to increment this number and write to flash.Till now what I have been doing is i have fixed one location of flash.I write this location every 5sec ( incrementing frame number ).But that location may get corrupted within 5-6 days I we have ~100000 write cycles.
    What is the best algorithm/technic to get it done.

Regards,
Akshay.
#1

5 Replies Related Threads

    RISC
    Super Member
    • Total Posts : 5983
    • Reward points : 0
    • Status: offline
    Re: SST26VF032B flash memory issue. 2018/03/30 12:39:38 (permalink)
    0
    Hi,
    Which capacity do you need ?
    If you need a very large number or write cycles and you can accept 4kbits / 16kbits capacity, then you should check the EERAM memory
    This memory combines the advantages or SRAM and EEPROM and uses a I2C interface.
    It looks like a SRAM and if power supply drops it automatically copies into EEPROM. When power comes back EEPROM is copied back into SRAM.
    Because it is SRAM it is fast and it has no limit in R/W cycles.
    Regards
    #2
    NKurzman
    A Guy on the Net
    • Total Posts : 19148
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: SST26VF032B flash memory issue. 2018/03/30 13:20:34 (permalink)
    4 (1)
    One method is to erase a full page. Set one bit per write. After the entire page is written erase the page and then add that number of bits to the total.
    #3
    jlian168
    New Member
    • Total Posts : 11
    • Reward points : 0
    • Joined: 2014/07/02 22:56:25
    • Location: 0
    • Status: offline
    Re: SST26VF032B flash memory issue. 2020/12/31 01:15:19 (permalink)
    0
    Hi : 
    1. U need to change RAM is better.
    2.or in some situation that can save the data.
     
    #4
    cirilo.b
    Junior Member
    • Total Posts : 59
    • Reward points : 0
    • Joined: 2020/09/08 18:40:42
    • Location: 0
    • Status: offline
    Re: SST26VF032B flash memory issue. 2020/12/31 14:40:43 (permalink)
    0
    As the others have said, use a different memory technology for storing any data which changes very frequently.  Personally I would question the design decision to save such a counter; however, assuming there is a good reason for that, FRAM EEPROM (now manufactured by Cypress) has essentially unlimited read/write durability and minimum 10 year data retention. Models are available with a variety of busses: parallel, SPI, I2C. Memory density is very low, the larger memories increase in price very quickly, and there are the occasional production/supply problems, but they are unmatched when it comes to reliability for storage of frequently changing data.
    #5
    malaugh
    Super Member
    • Total Posts : 426
    • Reward points : 0
    • Joined: 2011/03/31 14:04:42
    • Location: San Diego
    • Status: offline
    Re: SST26VF032B flash memory issue. 2021/01/01 10:03:46 (permalink)
    4 (1)
    As the other posters have said, you have number of options
     
    1) Do not store the sequence number on flash.  Is there a reason for this? If you are trying to retain the last sequence number in the event of losing power, I would consider some type of reset procedure rather than storing in flash.  I have a similar problem with one of my designs, and made it so sequence number zero reset the sequence count on both client and server. 
     
    2) If you really need to store the sequence number, how are you replacing the old sequence number with the new, erasing a page every time?
     
    3) If you have no other options, google "wear leveling" to find algorithms.  For you application, if you are erasing a page, then just use a different byte in the page for every write. The way this works is you will need to store a "valid" bit along with the sequence value, this bit needs to be a 1, because you can only change a 1 to a zero without erasing, not a zero to a 1.  Them for the next sequence number, change the valid bit at the current location to a zero, increment to the next location, and write the next value with the valid bit set.  I am not recommending this, I think you will still run into wear problems,
     
     
     
     
    #6
    Jump to:
    © 2021 APG vNext Commercial Version 4.5