<?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>MPC5xxx中的主题 Re: Reset opcode?</title>
    <link>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535339#M3624</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, thanks for your support.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Jul 2016 08:45:04 GMT</pubDate>
    <dc:creator>jean-christoph7</dc:creator>
    <dc:date>2016-07-27T08:45:04Z</dc:date>
    <item>
      <title>Reset opcode?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535331#M3616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have to implement a mechanism in my software to reset MPC5604B when my program goes in an unused memory area.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Actually I've padded whole my unused flash with the following pattern: 0xDEAD.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With this solution, when the program goes in a section padded with this pattern, the program stop and my watchdog reset the MPC5604B.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is: Is an opcode exist to reset directly the microcontroller? or an opcode jump to the begin of my application?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wish to pad directly with an opcode which permit to reset directly the MPC and don't wait the reset with my watchdog.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I sought in the BOOK_EUM.pdf of the PowerPc architecture to know if an opcode permit to reset the MPC, but I didn't find it.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this opcode exist?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your support.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 07:37:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535331#M3616</guid>
      <dc:creator>jean-christoph7</dc:creator>
      <dc:date>2016-07-25T07:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Reset opcode?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535332#M3617</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there’s no instruction that would reset the device directly. You can use se_illegal instruction to trigger program interrupt IVOR6 and then reset the device in exception handler. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Notice that if you use se_illegal instruction (opcode 0x0000) then it depends if the device is running in debug mode or in standalone mode:&lt;/P&gt;&lt;P&gt;- in debug mode, se_illegal works like software breakpoint. IVOR6 is not triggered. If you just step the code, it works like nop instruction. If you run the code and the program reaches se_illegal instruction, the device will stop execution and it will enter debug mode. &lt;/P&gt;&lt;P&gt;- if the device is running in standalone without debugger, se_illegal will trigger IVOR6 exception.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to test IVOR6 exception in debug mode, use another invalid opcode. For example, 0x0003 is not assigned to any VLE instruction. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mode Entry module can be used to reset the device. Use the code below in IVOR6 exception handler:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;/* software &lt;STRONG&gt;reset&lt;/STRONG&gt; */&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;ME.MCTL.R = 0x00005AF0;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;ME.MCTL.R = 0x0000A50F;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 10:35:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535332#M3617</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2016-07-25T10:35:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reset opcode?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535333#M3618</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You say to test in debug mode, I can use 0x0003 instruction.&lt;/P&gt;&lt;P&gt;But how can I fill unused flash memory in debug mode?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't find a solution in debug mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 11:20:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535333#M3618</guid>
      <dc:creator>jean-christoph7</dc:creator>
      <dc:date>2016-07-25T11:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Reset opcode?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535334#M3619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You wrote:&lt;/P&gt;&lt;P&gt;"Actually I've padded whole my unused flash with the following pattern: 0xDEAD."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just do the same and use 0x0003 opcode.&lt;/P&gt;&lt;P&gt;0xDEAD is recognized as se_stw instruction. 0x0003 is not valid opcode, so it will trigger IVOR6. Simple test:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_0.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/36906i68D62598EE6F9905/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_0.png" alt="pastedImage_0.png" /&gt;&lt;/span&gt; &lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 14:01:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535334#M3619</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2016-07-25T14:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Reset opcode?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535335#M3620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In fact I've padded my flash with a linker command in the *.lcf file. With this method, the *.bin file is padded in the unused memory. But in debug, I use *.elf file and when I see the unused memory area, it is not padded. In debug, I don't know how I can pad the unused memory. If you have a method for the debug, I'm very interested.&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jul 2016 14:36:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535335#M3620</guid>
      <dc:creator>jean-christoph7</dc:creator>
      <dc:date>2016-07-25T14:36:53Z</dc:date>
    </item>
    <item>
      <title>Re: Reset opcode?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535336#M3621</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Which IDE do you use?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 08:11:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535336#M3621</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2016-07-26T08:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reset opcode?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535337#M3622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm using CodeWarrior for MCU 10.6.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jul 2016 08:31:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535337#M3622</guid>
      <dc:creator>jean-christoph7</dc:creator>
      <dc:date>2016-07-26T08:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Reset opcode?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535338#M3623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I got information from CodeWarrior guys that it is known limitation. Elf file does not include padded data. It's present only in s-record file or in binary file. For test purposes (for test of IVOR handler) you can simply create a constant in flash which will contain required invalid opcode. Then just jump to this address and test your exception handler.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Lukas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 07:53:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535338#M3623</guid>
      <dc:creator>lukaszadrapa</dc:creator>
      <dc:date>2016-07-27T07:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Reset opcode?</title>
      <link>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535339#M3624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, thanks for your support.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jul 2016 08:45:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/Reset-opcode/m-p/535339#M3624</guid>
      <dc:creator>jean-christoph7</dc:creator>
      <dc:date>2016-07-27T08:45:04Z</dc:date>
    </item>
  </channel>
</rss>

