Flash memory management issue

Thread Starter

zazas321

Joined Nov 29, 2015
926
Hello. I have a flash memory with these specifications:

Page size: 256 bytes
Sector size : 16 pages (4096 bytes)

I am writing 25 byte chunks of data which gives me 10 chunks per page +6 extra bytes that I skip and leave empty.


The issue for me is that the smallest erase is sector which only allows me to erase 16 pages. That means whenever I fill my flash memory, I need to erase first 16 pages and start rewriting the oldest data with the new data.

It is not good that I can only erase 16 pages because I loose 160 chunks of data just to rewrite a new 25 byte chunk.


I wonder what are the ways to manage that? What should I do when I want to delete the oldest chunk and rewrite this with a new chunk?
 

ericgibbs

Joined Jan 29, 2010
15,691
hi z,
What is the type number for the flash, or a data sheet.?
E

OT:
Did you consider my program for that Thermistor project, it has 3 decimal places of resolution, you could easily reduce that to one decimal place.,
 

Thread Starter

zazas321

Joined Nov 29, 2015
926
The datasheet of the flash memory:
https://datasheet.datasheetarchive.com/originals/dk/DKDS-24/460477.pdf


By the way, this is the same project where I have asked about the Thermistor. I still use the same method that I have managed to develop a while ago where I have 1 ADC value per each temperature degree. I just take multiple readings and match the adc reading to the closest match and determine what is the temperature that way. I may go back to this at some point if I see that there is not enough accuracy.


Back to the flash memory topic, I am considering to switch the FLASH chip to EEPROM chip . I believe that EEPROM does not have any limits in terms of erase the data so should be much more convenient. Are there any other drawbacks when using EEPROM apart from the smaller size?
 

ericgibbs

Joined Jan 29, 2010
15,691
hi z,
Am I missing something in your description, you say 4096 Bytes.??

New Family of SpiFlash Memories
– W25Q32JV: 32M-bit / 4M-byte
– Standard

E

OK , ref the Thermistor
 
Top