Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

store data in a dataflash

Status
Not open for further replies.

algilsan

Advanced Member level 4
Joined
Jan 20, 2002
Messages
116
Helped
7
Reputation
14
Reaction score
6
Trophy points
1,298
Location
chile
Activity points
1,078
hi,
i would like to store some working structure in flash. The main reason is to recover it in case of power failure. having a dataflash in the system, i don´t now if this is reliable due to undurance of dataflash. i mean, can i store data in flash like the system RAM or not?, maybe i must wait to the power failure and then with the aid of an external batterie, store all the information in flash?

regards
 

gigle

Junior Member level 1
Joined
Feb 9, 2006
Messages
19
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,479
Read/Write speed of flash memory is much slower than RAM. If your application doesn't require such a high data speed than you can use the flash memory as a system RAM but if it does then you can think of different approaches.

1) the way you suggested (after power failure, store the data by aid of external battery.
2) periodically store the data into flash memory (you may lose the latest data you didn't back up)
3) store the data into a flash memory and use RAM as a cash/buffer (still you need to store the latest data after power failure like method 1))
.
.
.
depnds on your application....
 

algilsan

Advanced Member level 4
Joined
Jan 20, 2002
Messages
116
Helped
7
Reputation
14
Reaction score
6
Trophy points
1,298
Location
chile
Activity points
1,078
hi all,

My problem is not speed, the main problem i have is that i have to store a data structure of about 100 bytes. When an external event occurs i have to update the structure in RAM and then store a backup in flash due to have the chance to recover the original state of the event in case of power failure. This is the problem because the event's change is impredictible and can occur as many times as it wants. So if i store in flash each time event occur, i'll always be writen in the same position, same page of the flash, so i think the the life due to endurance of the flash could be very low. i know pen drives uses this kind of memories, but they can store many information since they store in free spaces of memory or voice recorders function the same way, store information consecutive until full memory is reached, but my problem is that i will always store the information in the same position of the flash. i don't know is this is reliable.

thanks
 

silvio

Advanced Member level 3
Joined
Dec 31, 2001
Messages
716
Helped
105
Reputation
210
Reaction score
16
Trophy points
1,298
Location
Romania
Activity points
11,497
algilsan said:
but my problem is that i will always store the information in the same position of the flash. i don't know is this is reliable.
If flash write endurance is a serious concern then using a circular buffer in flash memory is a nice approach.
Even for systems that due to unexpected power failures are not able to identify the correct position in the circular buffer, it's a medicine for it.
Read more : http://www.atmel.com/dyn/resources/prod_documents/doc2526.pdf
It's for writing of AVR EEPROM but ideeas are easily expanded to other flash as well.
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top