<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Save important informations on power fail on MK22FX512VLH12 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598839#M35121</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or maybe 'one step down' from a full battery, in the form of a supercapacitor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Sep 2016 03:27:34 GMT</pubDate>
    <dc:creator>egoodii</dc:creator>
    <dc:date>2016-09-08T03:27:34Z</dc:date>
    <item>
      <title>Save important informations on power fail on MK22FX512VLH12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598836#M35118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi. I want to store important information on power fail on the internal flash (from MK22). &lt;/P&gt;&lt;P&gt;I detect the power fail, but how I must write my data on internal flash. I read something about FLEX RAM?&lt;/P&gt;&lt;P&gt;Have anybody an example or idea for me?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2016 14:27:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598836#M35118</guid>
      <dc:creator>ralf1694</dc:creator>
      <dc:date>2016-09-07T14:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Save important informations on power fail on MK22FX512VLH12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598837#M35119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just one quick operational note from me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make SURE you will have enough power-supply holdup time to COMPLETE the (erase?) phrase-write cycle.&amp;nbsp; If the entire cell-write process does NOT complete before Vdd falls out of spec, you risk getting hard-faults when you attempt to read said corrupt phrase on the next power-up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Sep 2016 16:35:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598837#M35119</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2016-09-07T16:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Save important informations on power fail on MK22FX512VLH12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598838#M35120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="270354" data-username="ralf1694" href="https://community.nxp.com/people/ralf1694"&gt;Oliver Schmid&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;As &lt;SPAN class=""&gt;&lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="19946" data-username="egoodii" href="https://community.nxp.com/people/egoodii"&gt;EARL GOODRICH&lt;/A&gt;&lt;/SPAN&gt; mentioned above, it's the key to save the completely important information before the power supply drop out.&lt;/P&gt;&lt;P&gt;So I'd highly recommend that you can adapt the power supply circuit which can provide an backup power supply such as LI-lon battery instead of the original one.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 02:54:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598838#M35120</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-09-08T02:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: Save important informations on power fail on MK22FX512VLH12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598839#M35121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or maybe 'one step down' from a full battery, in the form of a supercapacitor.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 03:27:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598839#M35121</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2016-09-08T03:27:34Z</dc:date>
    </item>
    <item>
      <title>Re: Save important informations on power fail on MK22FX512VLH12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598840#M35122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Earl and jeremyzhou. Thanks for your reply! I have an capacitor on my hardware. But what happened when the power goes down within an phrase write? When I am start the software and I want to read this data Earl said I get an hard fault. Can I intercept this, so that my software do not hanging in the hard fault? And when this is possible, how I com back from the hardfault to my software without reading the corrupt phrase?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 05:47:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598840#M35122</guid>
      <dc:creator>ralf1694</dc:creator>
      <dc:date>2016-09-08T05:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Save important informations on power fail on MK22FX512VLH12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598841#M35123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am reading the interrupts and the cache must be disable when write to the internal flash? Is this correct? I know that an ISR can interrupt the write cycle and maybe the time is to short to write the whole data on flash. Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 05:51:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598841#M35123</guid>
      <dc:creator>ralf1694</dc:creator>
      <dc:date>2016-09-08T05:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: Save important informations on power fail on MK22FX512VLH12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598842#M35124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I write now some data to the flash and I think I have the problem which Earl said. I can not read the data on the next power on.&lt;/P&gt;&lt;P&gt;I see in the Memory window that not all data are written. If I read the data in line 948 with a normal pointer I get an Hard Fault conj an Bus Fault and from Bus Fault to Hard Fault. But this happened sporadic. I write 1000 times to the flash and only once the error occurs. In the followning 2 screenshots from the issue. I can not make the capacitor bigger. Is there a chance to spring from the Hard Fualt back to my software and read other data from flash when which are ok? Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: The pointer is 0x10004210 and the flash addresses from 0x10004210 to 0x10004217 on memory window should be 0x00 but the addresses are not 0x00? In this area I get the hardfault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="error1.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/5507i27B114F1DF535418/image-size/large?v=v2&amp;amp;px=999" role="button" title="error1.PNG" alt="error1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 06:56:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598842#M35124</guid>
      <dc:creator>ralf1694</dc:creator>
      <dc:date>2016-09-08T06:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Save important informations on power fail on MK22FX512VLH12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598843#M35125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="error2.PNG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/5569iBBC8D5B370A56502/image-size/large?v=v2&amp;amp;px=999" role="button" title="error2.PNG" alt="error2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 07:00:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598843#M35125</guid>
      <dc:creator>ralf1694</dc:creator>
      <dc:date>2016-09-08T07:00:05Z</dc:date>
    </item>
    <item>
      <title>Re: Save important informations on power fail on MK22FX512VLH12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598844#M35126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Oliver,&lt;/P&gt;&lt;P&gt;I'd like to range of flash area you choose to save the data, and I'm afraid that you can't&amp;nbsp; should use the pointer to write or read flash, you should use the flash command to do flash operations.&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Ping&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 07:47:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598844#M35126</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2016-09-08T07:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: Save important informations on power fail on MK22FX512VLH12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598845#M35127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use the FlashProgram command to write to flash, but an simple pointer to read them. I try to use the flash command to read the flash. I found two read functions. FlashReadResource() and FlashReadOnce(). I think I need the FlashReadresource function? I see this function have the return value OK and FTFx_ERR_ACCERR. If I read the faulty flash area with this function and the return value is FTFx_ERR_ACCERR, would I jump to the Hard Fault ISR or not. And how can I recreate this error without writting 1000 times or often to the flash because the issue is sporadic? Can I write the same flash area 2 times to get the same issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 08:32:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598845#M35127</guid>
      <dc:creator>ralf1694</dc:creator>
      <dc:date>2016-09-08T08:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Save important informations on power fail on MK22FX512VLH12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598846#M35128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I try to use the FlashReadresource function but I get always an ACCERR. I found this post:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying for several hours to read program flash using the FlashReadResource() function.&amp;nbsp; After reading this post I tried the READ32() macro, and it just worked.&amp;nbsp; Yay!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&lt;/P&gt;&lt;P&gt;Sidenote:&lt;/P&gt;&lt;P&gt;It's strange to me that the C90TFS library has 2 functions to read the P-Flash IFR(FlashReadResource, and ReadOnce), but neither can read the basic program flash.&amp;nbsp; If you try to pass in an absolute address, e.g. 0x7E000 for a 512KB MKW2x chip, the FlashReadResource function will return an access error (ACCERR).&amp;nbsp; After lots of reading I realized that the access error is because these functions are only supposed to access IFR memory (see Table 35-44 of the MKW2x reference manual for valid local address ranges).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my question. Which Flash read function do you mean jeremyzhou?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 12:49:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598846#M35128</guid>
      <dc:creator>ralf1694</dc:creator>
      <dc:date>2016-09-08T12:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Save important informations on power fail on MK22FX512VLH12</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598847#M35129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The hard-fault is, of course, just a vectored-interrupt, and you can put anything you like in the 'handler'.&amp;nbsp; I have NOT confirmed if there is any 'obvious' indication in the ARM fault-registers that would tell you said fault was a flash-access-read-error (like DFSR ending in 0x18 or 0x19?), you might look into that.&amp;nbsp; OR look into the stacked 'return address' pointing to the fault-location, and recognize that as your read-function -- and in that way 'discard' this 'latest' record and restore from a previous, known-good set of info.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Sep 2016 16:55:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Save-important-informations-on-power-fail-on-MK22FX512VLH12/m-p/598847#M35129</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2016-09-08T16:55:01Z</dc:date>
    </item>
  </channel>
</rss>

