Hi all, I'm writing a program that needs to store a large amount (thousands?) of small chunks of data (maybe 32 bytes length) into flash (cpu 12DG256). No problems in read / write / erasure, but I found what I think is a weak point in the process. Sometimes, due writing of new data in previous written space requires full sector (512 bytes) backup, erasure and restoration. If, for example, power is turned off during the process (after sector erasure) all data contained in that sector will be lost. Any ideas to improve the realibility ? Jordi Costa - www.bitsnvolts.com www.interlastech.com |
|
flash data storing & realibility
Started by ●April 23, 2004
Reply by ●April 23, 20042004-04-23
Copy all your good data to another sector before erasing the now old sector.
See AMD's data management software and demo. Andrew ----- Original Message ----- From: Jordi Costa To: Sent: Friday, April 23, 2004 4:00 PM Subject: [68HC12] flash data storing & realibility Hi all, I'm writing a program that needs to store a large amount (thousands?) of small chunks of data (maybe 32 bytes length) into flash (cpu 12DG256). No problems in read / write / erasure, but I found what I think is a weak point in the process. Sometimes, due writing of new data in previous written space requires full sector (512 bytes) backup, erasure and restoration. If, for example, power is turned off during the process (after sector erasure) all data contained in that sector will be lost. Any ideas to improve the realibility ? Jordi Costa - www.bitsnvolts.com www.interlastech.com --------------------To learn more about Motorola Microcontrollers, please visit http://www.motorola.com/mcu o learn more about Motorola Microcontrollers, please visit http://www.motorola.com/mcu ------ Yahoo! Groups Links a.. To |
Reply by ●April 23, 20042004-04-23
Hi Jordi. Maybe off topic, just in case, MC9S12T64 features, with calibration ram. Regards, Gilles MC9S12T64 Features 16-bit HCS12 CPU Upward compatible with M68HC11 instruction set Interrupt stacking and programmer's model identical to M68HC11 Instruction pipe Enhanced indexed addressing Memory 64K byte Flash EEPROM 2K byte Calibration RAM (CALRAM) 2K byte RAM Low voltage detector On-chip real time calibration functionality Flash EEPROM programming without writes to array CALRAM mappable over Flash EEPROM and accessible with the same timing as Flash EEPROM Fast BDM (FBDM) for real time communication with SPI interface or existing single wire interface Two asynchronous serial communications interfaces (SCI) 8-channel Analog-to-Digital Converter, 10-bit resolution 8 channel timer module 8 channel Pulse Width Modulator One synchronous Serial Peripheral Interface (SPI) http://e-www.motorola.com/files/microcontrollers/doc/data_sheet/9S12T64AF16V 1.pdf At 05:00 PM 4/23/2004, you wrote: >Hi all, > >I'm writing a program that needs to store a large amount (thousands?) of >small chunks of data (maybe 32 bytes length) into flash (cpu 12DG256). No >problems in read / write / erasure, but I found what I think is a weak >point in the process. Sometimes, due writing of new data in previous >written space requires full sector (512 bytes) backup, erasure and >restoration. If, for example, power is turned off during the process >(after sector erasure) all data contained in that sector will be lost. > >Any ideas to improve the realibility ? > >Jordi Costa - >www.bitsnvolts.com >www.interlastech.com > > >--------------------To learn more >about Motorola Microcontrollers, please visit >http://www.motorola.com/mcu >o learn more about Motorola Microcontrollers, please visit >http://www.motorola.com/mcu > >Yahoo! Groups Links > > |
Reply by ●April 23, 20042004-04-23
Hi Gilles, For several reasons, software should run in DG256. One possibility could be the temporary backup of sector in EEPROM instead of RAM, but we are afraid that too many cycling could shorten EEPROM live. Jordi ----- Original Message ----- From: "Gilles Blanquin" <> To: <> Sent: Friday, April 23, 2004 5:19 PM Subject: Re: [68HC12] flash data storing & realibility > > Hi Jordi. > > Maybe off topic, just in case, MC9S12T64 features, with calibration ram. > > Regards, > > Gilles > |
Reply by ●April 23, 20042004-04-23
Hi Andrew, Yes, it is one possibility. It would be more easy if data chunk were just one sector. In case of 32 bytes chunks we should then modify the 16 possible "pointers" to such data and work in a way that try to preserve empty sectors. We should think about. Any link to AMD's data ? Thank you, Jordi ----- Original Message ----- From: "Andrew Lohmann's New Email Server" <> To: <> Sent: Friday, April 23, 2004 5:17 PM Subject: Re: [68HC12] flash data storing & realibility > Copy all your good data to another sector before erasing the now old sector. See AMD's data management software and demo. > > Andrew > > ----- Original Message ----- > From: Jordi Costa > To: > Sent: Friday, April 23, 2004 4:00 PM > Subject: [68HC12] flash data storing & realibility > Hi all, > > I'm writing a program that needs to store a large amount (thousands?) of small chunks of data (maybe 32 bytes length) into flash (cpu 12DG256). No problems in read / write / erasure, but I found what I think is a weak point in the process. Sometimes, due writing of new data in previous written space requires full sector (512 bytes) backup, erasure and restoration. If, for example, power is turned off during the process (after sector erasure) all data contained in that sector will be lost. > > Any ideas to improve the realibility ? > > Jordi Costa - > www.bitsnvolts.com > www.interlastech.com > |
Reply by ●April 26, 20042004-04-26
Hi Jordi,
I have no current link but AMD is at http://www.amd.com try search for
"dms" the software is for their Flash parts. The principal is that
fill up you flash with data, marking data in a way that identifies it's
newness. Consequently you only copy good data from a sector to be erase just
before you erase that sector to minimise flash program/erase cycles.
Andrew Lohmann AIIE Design Engineer PLEASE NOTE NEW EMAIL ADDRESS IS: Bellingham + Stanley Ltd. Longfield Road, Tunbridge Wells, Kent, TN2 3EY, England. Tel: +44 (0) 1892 500400 Fax: +44 (0) 1892 543115 Website: www.bs-ltd.com ----- Original Message ----- From: Jordi Costa To: Sent: Friday, April 23, 2004 5:31 PM Subject: Re: [68HC12] flash data storing & realibility Hi Andrew, Yes, it is one possibility. It would be more easy if data chunk were just one sector. In case of 32 bytes chunks we should then modify the 16 possible "pointers" to such data and work in a way that try to preserve empty sectors. We should think about. Any link to AMD's data ? Thank you, Jordi ----- Original Message ----- From: "Andrew Lohmann's New Email Server" <> To: <> Sent: Friday, April 23, 2004 5:17 PM Subject: Re: [68HC12] flash data storing & realibility > Copy all your good data to another sector before erasing the now old sector. See AMD's data management software and demo. > > Andrew > > ----- Original Message ----- > From: Jordi Costa > To: > Sent: Friday, April 23, 2004 4:00 PM > Subject: [68HC12] flash data storing & realibility > Hi all, > > I'm writing a program that needs to store a large amount (thousands?) of small chunks of data (maybe 32 bytes length) into flash (cpu 12DG256). No problems in read / write / erasure, but I found what I think is a weak point in the process. Sometimes, due writing of new data in previous written space requires full sector (512 bytes) backup, erasure and restoration. If, for example, power is turned off during the process (after sector erasure) all data contained in that sector will be lost. > > Any ideas to improve the realibility ? > > Jordi Costa - > www.bitsnvolts.com > www.interlastech.com > --------------------To learn more about Motorola Microcontrollers, please visit http://www.motorola.com/mcu o learn more about Motorola Microcontrollers, please visit http://www.motorola.com/mcu ------ Yahoo! Groups Links a.. To |
Reply by ●April 27, 20042004-04-27
Thank you. AMD info is in document 22274.pdf , but now unavailable
on-line. I'll try later. Jordi ----- Original Message ----- From: "Andrew Lohmann's New Email Server" <> To: <> Sent: Monday, April 26, 2004 9:50 AM Subject: Re: [68HC12] flash data storing & realibility > Hi Jordi, > I have no current link but AMD is at http://www.amd.com try search for "dms" the software is for their Flash parts. The principal is that fill up you flash with data, marking data in a way that identifies it's newness. Consequently you only copy good data from a sector to be erase just before you erase that sector to minimise flash program/erase cycles. > > > Andrew Lohmann AIIE > Design Engineer > > PLEASE NOTE NEW EMAIL ADDRESS IS: |
Reply by ●April 27, 20042004-04-27
On Fri, Apr 23, 2004 at 05:00:10PM +0200, Jordi Costa wrote: > Any ideas to improve the realibility ? I don't know if this is feasible for you, but how about a big capacitor to hold up the supply rail long enough to complete programming even if the power turns off midway? Use a low voltage detector IC to determine that the power is going out, so you don't start programming after the main supply is down. Stephen -- Stephen Trier Technical Development Lab Cleveland FES Center |
|
Reply by ●April 27, 20042004-04-27
Stephen, Nowadays that is even easier with suprcaps. In the pdp-11, a little 6v transformer's output could be used to get the power-fail information after 1 missing cycle. Cheers, Nigel Johnson MCSE, MIEEE VE3ID/G4AJQ New address effective 2003 10 27: Technological Arts Inc. 533 College Street, Suite #301 Toronto, Ontario, Canada, M6G 1A8 Phone +1(416)963-8996 Extension 112 Fax: +1(416)963-9179 Toll-Free in USA and Canada (877)963-8996 > -----Original Message----- > From: Stephen Trier [mailto:] > Sent: Tuesday, April 27, 2004 11:52 AM > To: > Subject: ***[Possible UCE]*** Re: [68HC12] flash data storing > & realibility > On Fri, Apr 23, 2004 at 05:00:10PM +0200, Jordi Costa wrote: > > Any ideas to improve the realibility ? > > I don't know if this is feasible for you, but how about a big > capacitor to hold up the supply rail long enough to complete > programming even if the power turns off midway? Use a low > voltage detector IC to determine that the power is going out, > so you don't start programming after the main supply is down. > > Stephen > > -- > Stephen Trier > Technical Development Lab > Cleveland FES Center > > ------------------------ Yahoo! Groups Sponsor > ---------------------~--> Buy Ink Cartridges or Refill Kits > for your HP, Epson, Canon or Lexmark Printer at MyInks.com. > Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cidU11 http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/dN_tlB/TM ---------------------------------~-> --------------------To learn more about Motorola Microcontrollers, please visit http://www.motorola.com/mcu o learn more about Motorola Microcontrollers, please visit http://www.motorola.com/mcu Yahoo! Groups Links |
|
Reply by ●April 27, 20042004-04-27
Hi Spephen, Nigel, Andrew, Gilles and others, Thank you very much for your ideas. Me and my colleagues are working in several projects. In one of them we have a 50 Hz zero crossing detector, for sync purposes, that we already successfully used as power failure detector in order to avoid flash operations in such circumstances. In other project mains monitoring could be difficult (remote switched power supply) and flash protection mechanisms as suggested by AMD could be good. The basics are: don't erase one sector before information has been correctly written and verified in other flash location. In order to accomplish it, some header in each sector storing information relative to each data cell such: "erased", "used and allocated to ...", "dirty", ... will be useful. We will try to implement the process even if mains failure can be detected. Nigel: I remember the old times and the PDP-11, the punched tapes, entering the start-up code by switches, ... Regards, Jordi Costa EA3CIU ----- Original Message ----- From: "Stephen Trier" <> To: <> Sent: Tuesday, April 27, 2004 5:51 PM Subject: Re: [68HC12] flash data storing & realibility > On Fri, Apr 23, 2004 at 05:00:10PM +0200, Jordi Costa wrote: > > Any ideas to improve the realibility ? > > I don't know if this is feasible for you, but how about a big capacitor > to hold up the supply rail long enough to complete programming even if > the power turns off midway? Use a low voltage detector IC to determine > that the power is going out, so you don't start programming after the > main supply is down. > > Stephen > > -- > Stephen Trier > Technical Development Lab > Cleveland FES Center > > > --------------------To learn more about Motorola Microcontrollers, please visit > http://www.motorola.com/mcu > o learn more about Motorola Microcontrollers, please visit > http://www.motorola.com/mcu > > Yahoo! Groups Links |
|