<?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: Resetting ColdFire V1 with firmware in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625852#M13067</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-containerid="-1" data-containertype="-1" data-content-finding="Community" data-objectid="15295" data-objecttype="3" href="https://community.nxp.com/people/miduo"&gt;Fang Li&lt;/A&gt; &lt;span class="lia-inline-image-display-wrapper" image-alt="Employee"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122846iA2394B3E4B3D2871/image-size/large?v=v2&amp;amp;px=999" role="button" title="Employee" alt="Employee" /&gt;&lt;/span&gt;&lt;/SPAN&gt;wrote:&lt;/P&gt;&lt;P&gt;&amp;gt; For V1, we recommend to use the ILLEGAL opcode (0x4AFC) to implement the soft reset.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If that worked I would have recommended it in my original post. I read the MCF51JE256 Reference Manual (Rev 2) before posting, and it states:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;5.3.2 Illegal Opcode Detect (ILOP)&lt;BR /&gt;The default configuration of the V1 ColdFire core enables the generation of an MCU reset in response to&lt;BR /&gt;the processor's attempted execution of an illegal instruction (&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;except for the ILLEGAL opcode&lt;/STRONG&gt;&lt;/SPAN&gt;), illegal line&lt;BR /&gt;A, illegal line F instruction or the detection of a privilege violation (attempted execution of a supervisor&lt;BR /&gt;instruction while in user mode).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Table 5-2. ColdFire Exception Vector Table1 (Continued)&lt;BR /&gt; &lt;STRONG style="color: #ff0000;"&gt;The execution of the ILLEGAL instruction (0x4AFC) always generates an illegal instruction&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="color: #ff0000;"&gt;exception&lt;/STRONG&gt;, regardless of the state of CPUCR[30].&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;Also:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Table 5-4. SRS Register Field Descriptions&lt;BR /&gt;Illegal Opcode — Reset was caused by an attempt to execute an unimplemented or illegal opcode. This includes &lt;BR /&gt;any illegal instruction [&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;except the ILLEGAL (0x4AFC) opcode&lt;/STRONG&gt;&lt;/SPAN&gt;...&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;A quick check through the other MCF51 variants to see if the ILLEGAL instruction can be used to cause a Reset on some of them:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MCF51JE: Illegal Instruction can't cause Reset.&lt;BR /&gt;MCF51AC: Same &lt;BR /&gt; MCF51AG: Same &lt;BR /&gt; MCF51CN: Same &lt;BR /&gt; MCF51EM: Same &lt;BR /&gt; MCF51JF: Same &lt;BR /&gt; MCF51JM: Same &lt;BR /&gt; MCF51JM: Same &lt;BR /&gt; MCF51MM: Same &lt;BR /&gt; MCF51QE: Same &lt;BR /&gt; MCF51QM: Same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Mar 2017 23:39:57 GMT</pubDate>
    <dc:creator>TomE</dc:creator>
    <dc:date>2017-03-16T23:39:57Z</dc:date>
    <item>
      <title>Resetting ColdFire V1 with firmware</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625846#M13061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to fully reboot a ColdFire V1 MCU (MCF51JE256) using a firmware instruction. I was able to do this to a V2 MCU using the&amp;nbsp;SOFTRST bit in the RCR (Reset Control Register), but this register doesn't seem to be present in the V1 cores.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a proper way to achieve this with a V1 core?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Feb 2017 18:15:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625846#M13061</guid>
      <dc:creator>markthedark</dc:creator>
      <dc:date>2017-02-11T18:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting ColdFire V1 with firmware</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625847#M13062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Different core, different features. The CF1 core is targeted as being an HCS12 replacement, and usually has peripherals (and peripheral control programming) derived from those families. For instance the GPIO pins are usually forced to be UART pins when the UART is enabled, unlike the CF2 family where the pins have to have their functions explicitly selected elsewhere.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read up on CPUCE[IRD].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Read section "5.3 Microcontroller Reset". That gives all the available "reset sources".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have the options of looping a GPIO to the Reset pin, letting the COP Watchdog bite or executing an illegal instruction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;On restart you check the SRS to see what caused the reset (expected or otherwise) and take any appropriate action.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previous slightly related topic from 2009:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-comment-small" href="https://community.nxp.com/thread/58770?commentID=58771#comment-58771"&gt;https://community.nxp.com/message/58771?commentID=58771#comment-58771&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2017 00:48:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625847#M13062</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2017-02-13T00:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting ColdFire V1 with firmware</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625848#M13063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tom. This is helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As for executing an illegal instruction, can you suggest a value to use?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2017 16:58:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625848#M13063</guid>
      <dc:creator>markthedark</dc:creator>
      <dc:date>2017-02-13T16:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting ColdFire V1 with firmware</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625849#M13064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Section "5.3.2 Illegal Opcode Detect (ILOP)".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd suggest "STOP" or "HALT" if you have SOPT or XCSR set to appropriate values in your system, or for your "illegal instruction" write one of them to the appropriate value. XCSR access requires a WDEBUG sequence, so is tricky. SOPT is write-once, so you can't change it if you've got it set to enable this mode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, the instruction set reference doesn't tell you what instruction formats are "illegal". I'd try an "ADD" with an OPMODE value other than the two listed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This came up 5 years ago and a suggestion was made then:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-comment-small" href="https://community.nxp.com/thread/115830?commentID=116068#comment-116068"&gt;https://community.nxp.com/message/116068?commentID=116068#comment-116068&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2017 23:25:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625849#M13064</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2017-02-13T23:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting ColdFire V1 with firmware</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625850#M13065</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;Yes, as Tom mentioned, the ColdFire V1 is quite different from other ColdFire family. For V1, we recommend to use the ILLEGAL opcode (0x4AFC) to implement the soft reset.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 02:17:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625850#M13065</guid>
      <dc:creator>miduo</dc:creator>
      <dc:date>2017-03-14T02:17:34Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting ColdFire V1 with firmware</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625851#M13066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="15295" data-username="miduo" href="https://community.nxp.com/people/miduo"&gt;Fang Li&lt;/A&gt; &lt;span class="lia-inline-image-display-wrapper" image-alt="Employee"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122845i15C757A9DA552AE5/image-size/large?v=v2&amp;amp;px=999" role="button" title="Employee" alt="Employee" /&gt;&lt;/span&gt;&lt;/SPAN&gt;wrote:&lt;/P&gt;&lt;P&gt;&amp;gt; For V1, we recommend to use the ILLEGAL opcode (0x4AFC) to implement the soft reset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you like to check that advice?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Mar 2017 02:47:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625851#M13066</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2017-03-14T02:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting ColdFire V1 with firmware</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625852#M13067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-containerid="-1" data-containertype="-1" data-content-finding="Community" data-objectid="15295" data-objecttype="3" href="https://community.nxp.com/people/miduo"&gt;Fang Li&lt;/A&gt; &lt;span class="lia-inline-image-display-wrapper" image-alt="Employee"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/122846iA2394B3E4B3D2871/image-size/large?v=v2&amp;amp;px=999" role="button" title="Employee" alt="Employee" /&gt;&lt;/span&gt;&lt;/SPAN&gt;wrote:&lt;/P&gt;&lt;P&gt;&amp;gt; For V1, we recommend to use the ILLEGAL opcode (0x4AFC) to implement the soft reset.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;If that worked I would have recommended it in my original post. I read the MCF51JE256 Reference Manual (Rev 2) before posting, and it states:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;5.3.2 Illegal Opcode Detect (ILOP)&lt;BR /&gt;The default configuration of the V1 ColdFire core enables the generation of an MCU reset in response to&lt;BR /&gt;the processor's attempted execution of an illegal instruction (&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;except for the ILLEGAL opcode&lt;/STRONG&gt;&lt;/SPAN&gt;), illegal line&lt;BR /&gt;A, illegal line F instruction or the detection of a privilege violation (attempted execution of a supervisor&lt;BR /&gt;instruction while in user mode).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Table 5-2. ColdFire Exception Vector Table1 (Continued)&lt;BR /&gt; &lt;STRONG style="color: #ff0000;"&gt;The execution of the ILLEGAL instruction (0x4AFC) always generates an illegal instruction&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="color: #ff0000;"&gt;exception&lt;/STRONG&gt;, regardless of the state of CPUCR[30].&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;Also:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Table 5-4. SRS Register Field Descriptions&lt;BR /&gt;Illegal Opcode — Reset was caused by an attempt to execute an unimplemented or illegal opcode. This includes &lt;BR /&gt;any illegal instruction [&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;except the ILLEGAL (0x4AFC) opcode&lt;/STRONG&gt;&lt;/SPAN&gt;...&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;A quick check through the other MCF51 variants to see if the ILLEGAL instruction can be used to cause a Reset on some of them:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MCF51JE: Illegal Instruction can't cause Reset.&lt;BR /&gt;MCF51AC: Same &lt;BR /&gt; MCF51AG: Same &lt;BR /&gt; MCF51CN: Same &lt;BR /&gt; MCF51EM: Same &lt;BR /&gt; MCF51JF: Same &lt;BR /&gt; MCF51JM: Same &lt;BR /&gt; MCF51JM: Same &lt;BR /&gt; MCF51MM: Same &lt;BR /&gt; MCF51QE: Same &lt;BR /&gt; MCF51QM: Same&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Mar 2017 23:39:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625852#M13067</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2017-03-16T23:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: Resetting ColdFire V1 with firmware</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625853#M13068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Tom and Fang.&lt;/P&gt;&lt;P&gt;I am &lt;EM&gt;&lt;STRONG&gt;finally&lt;/STRONG&gt; &lt;/EM&gt;back to working on this feature of our product! Thank you for all your input and information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I successfully implemented the following solution proposed by &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/JimDon" rel="nofollow noopener noreferrer" target="_blank"&gt;JimDon&lt;/A&gt;‌ in the &lt;A _jive_internal="true" href="https://community.nxp.com/thread/115830?commentID=116068#comment-116068" rel="nofollow noopener noreferrer" target="_blank"&gt;post &lt;/A&gt;that was mentioned above. &lt;/P&gt;&lt;PRE&gt;#define MCURESET&amp;nbsp;&amp;nbsp; asm {\ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;move.l&amp;nbsp; #0,d0\ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;movec&amp;nbsp;&amp;nbsp; d0,CPUCR\ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;HALT\ }&lt;/PRE&gt;&lt;P&gt;The beauty of this solution is that if you are debugging, it will halt the debugger. Perfect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again all!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Apr 2017 16:51:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Resetting-ColdFire-V1-with-firmware/m-p/625853#M13068</guid>
      <dc:creator>markthedark</dc:creator>
      <dc:date>2017-04-04T16:51:37Z</dc:date>
    </item>
  </channel>
</rss>

