<?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>CodeWarrior for MCUのトピックRe: Use of SWI</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Use-of-SWI/m-p/667568#M13909</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jennie,&lt;/P&gt;&lt;P&gt;The JMP solution works fine and now the project is complete. (I only have four more to do, but a lot of the code can be copied across for the completed project) Thanks for all your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Aug 2017 10:18:41 GMT</pubDate>
    <dc:creator>juliancox</dc:creator>
    <dc:date>2017-08-19T10:18:41Z</dc:date>
    <item>
      <title>Use of SWI</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Use-of-SWI/m-p/667565#M13906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jennie.&lt;/P&gt;&lt;P&gt;Two items.&lt;/P&gt;&lt;P&gt;Firstly - My application has been working for some time and my sample code is also working, but they will not work together. I believe that I have too many variables to co-reside withe the "code in RAM" and the need for a bigger stack so I have come up with two solutions and I would appreciate your opinion. They are based on the premise that the only volatile variable is the one that I am saving in ROM.&lt;/P&gt;&lt;P&gt;1.1 when I need to save a value, call FlashInit() and CopyToRam(), disable the Interrupts and call FlashCmd(). Add a while(1); (wait here forever) and wait for the watchdog to issue a reset. All variables will be re- initialised and the variable saved in ROM will be read out (this happens already).&lt;/P&gt;&lt;P&gt;1.2 Exactly the same as above, except that two instructions are added to FlashCmd() - Enable interrupts and a Software interrupt (SWI) and the SWI will do a jump to the address stored in the RESET vector.&lt;/P&gt;&lt;P&gt;I believe either solution will work, but the second on appears the best.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My second point is really not for you directly and I shall post a more detailed entry in the USBDM forum.&lt;/P&gt;&lt;P&gt;I have been re-designing an new processor into &amp;nbsp;four products &amp;nbsp;(all with 50% of the code being common) &amp;nbsp;that would require approximately 50 000 pieces P/A. &amp;nbsp;I started with a DEMOQE board and then moved to a S08SH4 - based target hardware board with a USBDM. Initially the DEMOQE board worked and I completed the preliminary software design. The two USBDMs (one JS16 and one JM60.) the JS worked most of the time and the JM worked occasionally. I would typically re-load the drivers 4 or 5 times before anything would work. Currently the DEMOQE and the JS16 are not "seen" and the JM60 works with USBDM 4.12, but not with CodeWarrior. In Debug Settings &amp;gt; Connection Type my choices are - &amp;nbsp;GDI Generic, P&amp;amp;E HCS08 FCS, or USB Multilink (none of which I have). If I select P&amp;amp;E HCS08 the debug session starts, but the program loops continuously on a single instruction in the initialisation sequence.&lt;/P&gt;&lt;P&gt;I don't wish to bore you with masses of detail (I will keep that for the other forum), but if I cannot even debug my code I may need to consider another processor. I am just going around and around in circles.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Aug 2017 14:48:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Use-of-SWI/m-p/667565#M13906</guid>
      <dc:creator>juliancox</dc:creator>
      <dc:date>2017-08-07T14:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: Use of SWI</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Use-of-SWI/m-p/667566#M13907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Julian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thinks solution 1.2 is better, but please note to enable interrupts and SW interrupt after Flash Command is done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Jennie Zhang&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>Wed, 09 Aug 2017 08:38:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Use-of-SWI/m-p/667566#M13907</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2017-08-09T08:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: Use of SWI</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Use-of-SWI/m-p/667567#M13908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the advice. It has just occurred to me that if the ISR for the SWI simply calls a jump, why do I need the SWI? I can simply replace the "return()" with a jump instruction when the flash routines are complete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 09:01:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Use-of-SWI/m-p/667567#M13908</guid>
      <dc:creator>juliancox</dc:creator>
      <dc:date>2017-08-10T09:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Use of SWI</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Use-of-SWI/m-p/667568#M13909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jennie,&lt;/P&gt;&lt;P&gt;The JMP solution works fine and now the project is complete. (I only have four more to do, but a lot of the code can be copied across for the completed project) Thanks for all your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Aug 2017 10:18:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Use-of-SWI/m-p/667568#M13909</guid>
      <dc:creator>juliancox</dc:creator>
      <dc:date>2017-08-19T10:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Use of SWI</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Use-of-SWI/m-p/667569#M13910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are welcome Julian.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Aug 2017 08:44:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Use-of-SWI/m-p/667569#M13910</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2017-08-21T08:44:08Z</dc:date>
    </item>
  </channel>
</rss>

