- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear All,
I have a trouble, I use emEEPROM to save program variable,
but found that repeated power on / off process emEEPROM data may be lost.
My program will read the first address emEEPROM in a boot time, check data if it is 0 for handler 1, otherwise for handler 2.
This problem is not always in the ON / OFF power will appear, how do I debug?
In most cases, the data can be normal, but occasionally there will be data loss problems emEEPROM in ON/OFF power process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When are changes written to the EEPROM? Is there a chance that writes overlap with poweroffs? In that case, invalid data might be the result...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had a similar program and save a cumulative value of the function of the numerical calculations, the function will be stored in the numerical changes, but changes in the value of time is not fixed (like a cumulative value).
If the power is lost in the process is written in, whether it is possible to caused by whole page of data flash disappear?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Writing to EEProm usually first clears a "Row" and then re-programs the row again. This process is maintained by the EEProm-device itself. When power goes off in between the erasure and the re-programming a whole row of data is lost. To circumvent this some precautions have to be taken:
An early power-loss detection has to be implemented and when seen, writing to the eeprom must stop.
Supply-voltage for EEProm should be buffered with a gold-cap to give the device time enough to finish any actual work.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This means that I have to make sure that the operating voltage safety before writing, and allows cpu time to complete the work necessary to increase the power off it? My English is poor, sorry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Correcting some horrible spelling -
Simple calculations to hold up power long enough to
complete flash/eeprom write operations. Attached.
Lastly do not forget C is a strong f(Applied Voltage, for certain
C technologies), so factor that into your calculations.
So detect Vdd value first before EEPROM and/or flash operations,
and if high enough, do operations, and calced value of C will hold
up supply long enough (if there was an imemadiate loss of power
when operations were started) to complete operations.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will to review the power supply, Thanks provide these messages
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recently saw a power-supply that monitored the incoming sine-wave with an opto-coupler and so was able to detect a power loss VERY early. Could even be done with some additional internal logic of the PSoC.
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Some possibilities -
Some considerations - http://www.microchip.com/forums/m603446-print.aspx
www.atmel.com/images/doc2508.pdf
You can use the AC power line to detect loss of a single cycle, but AC line
can be pretty noisy, and you are in no need of an immeadiate detection
of power loss, proper cap on Vdd will eliminate need to monitor ac line and
all the safety factors that entails. Just detect voltage to PSOC, and if it is
high enough, and you sized the cap properly, you will have enough time for
your FLASH writes. And no external components that have to be HV related due to
AC line L type loads, motors, etc...
Regards, Dana.