<?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>8-bit MicrocontrollersのトピックRe: QG8 flash write on LVD interrupt</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-flash-write-on-LVD-interrupt/m-p/174040#M11946</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;A further thought on the multiple interrupt/reset issue.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Assuming you were to cause an immediate reset using&amp;nbsp;the illegal opcode method (after programming the flash byte), since the SPMSC1_LVDRE bit&amp;nbsp;is set out of reset, I assume a reset condition would be held during the remainder of the power-down process.&amp;nbsp; If this be true, then multiple resets or interrups could never occur during a power "ramp down".&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by bigmac on &lt;SPAN class="date_text"&gt;2007-12-20&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;12:50 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Dec 2007 09:48:59 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2007-12-20T09:48:59Z</dc:date>
    <item>
      <title>QG8 flash write on LVD interrupt</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-flash-write-on-LVD-interrupt/m-p/174038#M11944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I would like to use the LVD interrupt to save one byte of data to flash in the QG8 part when power is&amp;nbsp;going down.&amp;nbsp; The flash will already be erased, so I'll only need to program the one byte as power goes down. I'm using&amp;nbsp;CodeWarrior with Processor Expert.&amp;nbsp; &amp;nbsp;I have two questions:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;1. Can I write to flash from within the LVD interrupt using SetByteFlash?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;2. What is the safest thing to do after the flash is programmed?&amp;nbsp; I don't want the code to run amuck as power goes down.&amp;nbsp; Is there any software way of forcing the chip into reset?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 07:01:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-flash-write-on-LVD-interrupt/m-p/174038#M11944</guid>
      <dc:creator>glennk</dc:creator>
      <dc:date>2007-12-19T07:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: QG8 flash write on LVD interrupt</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-flash-write-on-LVD-interrupt/m-p/174039#M11945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;It should be feasible to&amp;nbsp;program the byte value to flash within the ISR code.&amp;nbsp; Of course, the code that controls the programming process will actually be running from RAM (probably the stack).&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;After programming is complete, I guess there are a&amp;nbsp;couple of possibilities -&lt;/FONT&gt;&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Enter a wait loop within the ISR, and rely on the COP timer to initiate a reset.&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;FONT size="2"&gt;Execute an illegal opcode within the ISR to immediately initiate a reset.&lt;/FONT&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;One thing you may have to guard against is the occurrence of multiple LVD interrupts&amp;nbsp;should reset initialisation occur more than once for the same power event.&amp;nbsp; Ideally, the LVD should interrupt the first time, and hold a reset condition the second time.&amp;nbsp; The problem will be detecting which is first and second time.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2007 09:24:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-flash-write-on-LVD-interrupt/m-p/174039#M11945</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-12-19T09:24:55Z</dc:date>
    </item>
    <item>
      <title>Re: QG8 flash write on LVD interrupt</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-flash-write-on-LVD-interrupt/m-p/174040#M11946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;A further thought on the multiple interrupt/reset issue.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Assuming you were to cause an immediate reset using&amp;nbsp;the illegal opcode method (after programming the flash byte), since the SPMSC1_LVDRE bit&amp;nbsp;is set out of reset, I assume a reset condition would be held during the remainder of the power-down process.&amp;nbsp; If this be true, then multiple resets or interrups could never occur during a power "ramp down".&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by bigmac on &lt;SPAN class="date_text"&gt;2007-12-20&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;12:50 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Dec 2007 09:48:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/QG8-flash-write-on-LVD-interrupt/m-p/174040#M11946</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-12-20T09:48:59Z</dc:date>
    </item>
  </channel>
</rss>

