<?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 Hardware watchdog in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Hardware-watchdog/m-p/167238#M1684</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am looking to get a hardware watchdog going on a MQX 3.7 MJ51 project. As I understand it the example \ watchdog project is software based.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking through some of the header files I modiefied bsp_int.c as follows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;// no define for setting cop to 1/4 second&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; reg_ptr-&amp;gt;SIM.SOPT1 = MCF51XX_SOPT1_STOPE_MASK | MCF51XX_SOPT1_WAITE_MASK | 0x80;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; reg_ptr-&amp;gt;SIM.SOPT2 = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; /*&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; * Add Low voltage detect enable and low voltage detect reset enable&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; reg_ptr-&amp;gt;PMC.SPMSC1 = MCF51XX_PMC_SPMSC1_LVDE | MCF51XX_PMC_SPMSC1_LVDRE | MCF51XX_PMC_SPMSC1_LVDACK;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; reg_ptr-&amp;gt;PMC.SPMSC2 = 0;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; /* INTC_WCR: ENB=1,MASK=0 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; reg_ptr-&amp;gt;INTC.WCR = MCF51XX_INTC_WCR_ENB;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;and added this to one of my tasks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; reg_ptr-&amp;gt;SIM.SRS = 0x55;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; reg_ptr-&amp;gt;SIM.SRS = 0xAA;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It compiles but I do not have working hardware at home and can not test this. Any one know if this will work, or a better way to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, anyone know why Freescale does not support the hardware watchdog?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Sep 2011 08:30:01 GMT</pubDate>
    <dc:creator>bc2</dc:creator>
    <dc:date>2011-09-16T08:30:01Z</dc:date>
    <item>
      <title>Hardware watchdog</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Hardware-watchdog/m-p/167238#M1684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I am looking to get a hardware watchdog going on a MQX 3.7 MJ51 project. As I understand it the example \ watchdog project is software based.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking through some of the header files I modiefied bsp_int.c as follows.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;// no define for setting cop to 1/4 second&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; reg_ptr-&amp;gt;SIM.SOPT1 = MCF51XX_SOPT1_STOPE_MASK | MCF51XX_SOPT1_WAITE_MASK | 0x80;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; reg_ptr-&amp;gt;SIM.SOPT2 = 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; /*&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; * Add Low voltage detect enable and low voltage detect reset enable&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; reg_ptr-&amp;gt;PMC.SPMSC1 = MCF51XX_PMC_SPMSC1_LVDE | MCF51XX_PMC_SPMSC1_LVDRE | MCF51XX_PMC_SPMSC1_LVDACK;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; reg_ptr-&amp;gt;PMC.SPMSC2 = 0;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; /* INTC_WCR: ENB=1,MASK=0 */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; reg_ptr-&amp;gt;INTC.WCR = MCF51XX_INTC_WCR_ENB;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;and added this to one of my tasks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; reg_ptr-&amp;gt;SIM.SRS = 0x55;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; reg_ptr-&amp;gt;SIM.SRS = 0xAA;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It compiles but I do not have working hardware at home and can not test this. Any one know if this will work, or a better way to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, anyone know why Freescale does not support the hardware watchdog?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 08:30:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Hardware-watchdog/m-p/167238#M1684</guid>
      <dc:creator>bc2</dc:creator>
      <dc:date>2011-09-16T08:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Hardware watchdog</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Hardware-watchdog/m-p/167239#M1685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi BC2,&lt;/P&gt;&lt;P&gt;The hardware watchdog is nice for end product but pain in the backside when debugging as often (generically speaking) the hardware watchdog cannot be disable once enabled.&lt;/P&gt;&lt;P&gt;I've implemented it with ColdFire V2 (MCF52259) but not the V1 devices.&lt;/P&gt;&lt;P&gt;I basically did what you did and then had to find various locations in tasks to kick the watchdog to prevent it from activating.&lt;/P&gt;&lt;P&gt;You don't want to place the kicks in the PIT (MQX heart beat and clocking interrupt routine) as tasks could hang and the heart beat continues.&amp;nbsp; The MCF51JM reference manual has good verbage on this in section 5.3.1 Computer Operating Properly (COP) Watchdog.&amp;nbsp; Note that the SOPT1/2 register as write once after reset.&amp;nbsp; So once set you cannot change them dynamically.&lt;/P&gt;&lt;P&gt;Each application is different so the spot to implement the kick is up to the system programmer.&amp;nbsp; But if others have done this, please let us know what you did to help others.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 20:42:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Hardware-watchdog/m-p/167239#M1685</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2011-09-16T20:42:44Z</dc:date>
    </item>
  </channel>
</rss>

