<?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: Reset MCF51JM in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Reset-MCF51JM/m-p/180619#M7345</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; but in production writing 0xFF in SRS will reset CPU?.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As long as you don't disable the watchdog.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is something you should be able to test very easily. Write some code that attempts a reset and shows what it is doing on a serial port. LED, LCD or whatever you have, load it and run it. It will do what you expect or it won't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jul 2012 06:16:26 GMT</pubDate>
    <dc:creator>TomE</dc:creator>
    <dc:date>2012-07-20T06:16:26Z</dc:date>
    <item>
      <title>Reset MCF51JM</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Reset-MCF51JM/m-p/180616#M7342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can i soft reset MCF51JM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In spec sais :&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, if any value other than 0x55 or 0xAA is written to SRS, the microcontroller&amp;nbsp;is immediately reset.&lt;/P&gt;&lt;DIV&gt;&lt;BR /&gt;This does not work for me at least in debug mode, so how can i reset CPU?&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2012 16:29:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Reset-MCF51JM/m-p/180616#M7342</guid>
      <dc:creator>ralu</dc:creator>
      <dc:date>2012-07-18T16:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Reset MCF51JM</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Reset-MCF51JM/m-p/180617#M7343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Watchdogs and debugging are always a problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some CPUs allow debugging with a watchdog by having the watchdog stop when the debugger stops the CPU.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other ones, like the MCF5329 which I'm familiar with have a "HALTED" configuration bit, which as well as having the watchdog stop when the debugger halts the CPU, disables the "write once" operation of the debugger control registers, so the debugger can turn the watchdog on and off as required.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The MCF51JM doesn't seem to have any of those capabilities.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So it looks like you can't (or can't easily) debug code with the watchdog.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To fix this you normally have to write your startup code to find out somehow if you're running under the debugger or not, and to disable the watchdog when you are. Otherwise, the "debugger startup script" should disable the watchdog.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;gt; How can i soft reset MCF51JM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Back to your original question. The MCF5329 has a "Soft Reset" bit in a register. The MCF51JM doesn't. So you have to use the Watchdog to cause a soft reset, unless you've disabled it or it is disabled under the debugger.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You really don't want thave the CPU reset itself out from under the debugger or you'll probably lose control of it. "Debugging resets" is as problematic as "debugging the watchdog". You can reset the CPU from the debugger, so that what you should do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You should probably write your code to try and reset using the watchdog, and then sit in a loop waiting for the reset. When you're debugging it, when it is stuck in a loop that means you have to manually reset it from the debugger.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to be able to reset it without using the debugger, connect a GPIO pin back to the Reset pin and drive that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may want to be able to debug resets, watchdogs and all that, but you may be using a chip that simply doesn't support that, and requires you to make compromises. Maybe the chip and the debugger can conspire to do this well enough, but you can't find any documentation telling you how to do this. Check your debugger/development documentation. Maybe someone else here who has used this chip knows if this can be done.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 06:45:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Reset-MCF51JM/m-p/180617#M7343</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2012-07-19T06:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Reset MCF51JM</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Reset-MCF51JM/m-p/180618#M7344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So reset is just skipped im my case whith debugger , but in production writing 0xFF in SRS will reset CPU?.&lt;BR /&gt;&lt;BR /&gt;(i need reset because i am doing bootloader)&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 17:11:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Reset-MCF51JM/m-p/180618#M7344</guid>
      <dc:creator>ralu</dc:creator>
      <dc:date>2012-07-19T17:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Reset MCF51JM</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Reset-MCF51JM/m-p/180619#M7345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt; but in production writing 0xFF in SRS will reset CPU?.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As long as you don't disable the watchdog.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is something you should be able to test very easily. Write some code that attempts a reset and shows what it is doing on a serial port. LED, LCD or whatever you have, load it and run it. It will do what you expect or it won't.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 06:16:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Reset-MCF51JM/m-p/180619#M7345</guid>
      <dc:creator>TomE</dc:creator>
      <dc:date>2012-07-20T06:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Reset MCF51JM</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Reset-MCF51JM/m-p/180620#M7346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;An ILOP will cause a reset under th following conditions:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&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 (except for the ILLEGAL opcode), 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;BR /&gt;The attempted execution of the STOP instruction with (SOPT[STOPE] = 0 &amp;amp;&amp;amp; SOPT[WAITE] = 0) is&lt;BR /&gt;treated as an illegal instruction.&lt;BR /&gt;The attempted execution of the HALT instruction with XCSR[ENBDM] = 0 is treated as an illegal&lt;BR /&gt;instruction.&lt;BR /&gt;The processor generates a reset in response to any of these events if CPUCR[IRD] = 0. If this&lt;BR /&gt;configuration bit is set, the processor generates the appropriate exception instead of forcing a reset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also ILAD:&lt;/P&gt;&lt;P&gt;5.3.3 Illegal Address Detect (ILAD)&lt;BR /&gt;The default configuration of the V1 ColdFire core enables the generation of an MCU reset in response to&lt;BR /&gt;any processor-detected address error, bus error termination, RTE format error or fault-on-fault condition.&lt;BR /&gt;The processor generates a reset if CPUCR[ARD] = 0. If this configuration bit is set, the processor&lt;BR /&gt;generates the appropriate exception instead of forcing a reset, or simply halts the processor in response to&lt;BR /&gt;the fault-on-fault condition.&lt;BR /&gt;5.4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 20:52:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Reset-MCF51JM/m-p/180620#M7346</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2012-07-20T20:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Reset MCF51JM</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Reset-MCF51JM/m-p/180621#M7347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This should work as a reset on the V1, it's a an FSAVE instruction which is not implemented:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;   asm {     dc.w 0xF300        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:30:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Reset-MCF51JM/m-p/180621#M7347</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2020-10-29T09:30:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reset MCF51JM</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Reset-MCF51JM/m-p/180622#M7348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found some other details here.&lt;/P&gt;&lt;P&gt;For one thing, you really need to this:&lt;/P&gt;&lt;PRE&gt;&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; movec&amp;nbsp;&amp;nbsp; d0,CPUCR
&lt;/PRE&gt;&lt;P&gt;To insure it does not cause an exception instead of&amp;nbsp; a reset.&lt;/P&gt;&lt;P&gt;Also, it seems you can just use the HALT instruction. When debugging, it will just cause a break point. If not debugging, it will reset the V1 MCU.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:30:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/Reset-MCF51JM/m-p/180622#M7348</guid>
      <dc:creator>JimDon</dc:creator>
      <dc:date>2020-10-29T09:30:34Z</dc:date>
    </item>
  </channel>
</rss>

