EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Flash Erase Problems When Lose Power -- SOLUTION

Started by one00100100 January 15, 2013
Hey Guys,
Thanks to all who tried to help me as I have struggled with this problem. I have placed a file in the files section detailing the algorithm. This was a tough nut for me. The breakthroughs came after I realized that the PMMIFG interrupt could interrupt a flash erase operation. This by itself would not be bad, but it delayed the erase until we lost power, and for those who don't know, losing power during erase can corrupt the entire flash memory. Then I discovered I could disable the non-maskable interrupt, but still use it's flag to detect power loss. We have now tested this algorithm extensively and believe it is able to save data on power loss in flash and retrieve it on power up. Actually, our original algorithm did this, but failed at certain frequencies of a off/on/off/on sequence from normal running. If anyone needs more information after reading the file, "Using PMM and Flash...", I will try to help.
Thanks again,
Mike Raines

Beginning Microcontrollers with the MSP430

can u please share what are you doing....i want to know more about this
particular problem...
On 15 January 2013 22:31, one00100100 wrote:

> **
> Hey Guys,
> Thanks to all who tried to help me as I have struggled with this problem.
> I have placed a file in the files section detailing the algorithm. This was
> a tough nut for me. The breakthroughs came after I realized that the PMMIFG
> interrupt could interrupt a flash erase operation. This by itself would not
> be bad, but it delayed the erase until we lost power, and for those who
> don't know, losing power during erase can corrupt the entire flash memory.
> Then I discovered I could disable the non-maskable interrupt, but still use
> it's flag to detect power loss. We have now tested this algorithm
> extensively and believe it is able to save data on power loss in flash and
> retrieve it on power up. Actually, our original algorithm did this, but
> failed at certain frequencies of a off/on/off/on sequence from normal
> running. If anyone needs more information after reading the file, "Using
> PMM and Flash...", I will try to help.
> Thanks again,
> Mike Raines
>
>
>

--
Sanjat


Sanjat,
You need to re-read my post and then read the file, then ask a specific question...

Mike Raines

________________________________
From: m... [mailto:m...] On Behalf Of sanjat panigrahi
Sent: Tuesday, January 15, 2013 12:08 PM
To: m...
Subject: Re: [msp430] Flash Erase Problems When Lose Power -- SOLUTION

can u please share what are you doing....i want to know more about this
particular problem...

On 15 January 2013 22:31, one00100100 m...@hofferflow.com> wrote:

> **
> Hey Guys,
> Thanks to all who tried to help me as I have struggled with this problem.
> I have placed a file in the files section detailing the algorithm. This was
> a tough nut for me. The breakthroughs came after I realized that the PMMIFG
> interrupt could interrupt a flash erase operation. This by itself would not
> be bad, but it delayed the erase until we lost power, and for those who
> don't know, losing power during erase can corrupt the entire flash memory.
> Then I discovered I could disable the non-maskable interrupt, but still use
> it's flag to detect power loss. We have now tested this algorithm
> extensively and believe it is able to save data on power loss in flash and
> retrieve it on power up. Actually, our original algorithm did this, but
> failed at certain frequencies of a off/on/off/on sequence from normal
> running. If anyone needs more information after reading the file, "Using
> PMM and Flash...", I will try to help.
> Thanks again,
> Mike Raines
>

--
Sanjat






The 2024 Embedded Online Conference