<?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: Watchdog Interrupt not reached, Cortex M4, mqx KSDK in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-Interrupt-not-reached-Cortex-M4-mqx-KSDK/m-p/710327#M43581</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the method you mentioned in your post and proved the the watchdog interrupt is reached for sure. I think I should come up with some inline assembly to write the stack frame to the external RAM.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you, it was really helpful&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Oct 2017 08:51:27 GMT</pubDate>
    <dc:creator>_ZZ_</dc:creator>
    <dc:date>2017-10-19T08:51:27Z</dc:date>
    <item>
      <title>Watchdog Interrupt not reached, Cortex M4, mqx KSDK</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-Interrupt-not-reached-Cortex-M4-mqx-KSDK/m-p/710323#M43577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is my second question on watchdog of Kinetis MCUs.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been working on this for a while now and I can't get my head around it. I am using a Cortex M4 K20 micro for my application. I have managed to configure the watchdog successfully and it is working fine. but if the watchdog is not kicked on time it does not seem to be executing its interrupt service routine before doing the reset. my watchdog configuration is 100% right, I have even tried the KSDK drivers to do the configuration. none of them seem to be executing the watchdog isr.&lt;/P&gt;&lt;P&gt;I did everything I could to find out whether this isr is executed or not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I did a lot of research online, some -people say, it is not possible to put break point inside the watchdog isr.&amp;nbsp;&lt;/P&gt;&lt;P&gt;does anybody have an example of kinetis watchdog with interrupt enabled which has been tested and works for sure.&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thanks for any response,&lt;/P&gt;&lt;P&gt;Roosbeh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 12:59:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-Interrupt-not-reached-Cortex-M4-mqx-KSDK/m-p/710323#M43577</guid>
      <dc:creator>_ZZ_</dc:creator>
      <dc:date>2017-10-18T12:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog Interrupt not reached, Cortex M4, mqx KSDK</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-Interrupt-not-reached-Cortex-M4-mqx-KSDK/m-p/710324#M43578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Roosbeh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The uTasker project includes verified code for the watchdog interrupt handler for all watchdog types that support it (including the one in the K20 - reference below).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Initialisation:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;UNLOCK_WDOG();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WDOG_TOVALL = (2000/5);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WDOG_TOVALH = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;WDOG_STCTRLH = (WDOG_STCTRLH_STNDBYEN | WDOG_STCTRLH_WAITEN | WDOG_STCTRLH_STOPEN | WDOG_STCTRLH_WDOGEN | WDOG_STCTRLH_IRQRSTEN) // watchdog enabled to generate reset on 2s timeout (no further updates allowed) with interrupt before reset takes pace&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Enable interrupt in NVIC:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;fnEnterInterrupt(irq_WDOG_ID, 0, wdog_irq);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. Interrupt handler:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;static void wdog_irq(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WDOG_STCTRLL = (WDOG_STCTRLL_INTFLG | WDOG_STCTRLL_RES1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // clear interrupt flag&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *BOOT_MAIL_BOX = 0x9876;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set a pattern to the boot mailbox to show that the watchdog interrupt took place&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier,monospace;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After the reset the location &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;BOOT_MAIL_BOX&lt;/SPAN&gt; ( allocation in SRAM that is otherwise not used or initialised) will show the value has been set.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;The interrupt handler only has a very short time (number of clocks) to operate before the reset unconditionally occurs and so breakpoints in the routine (or writing data to Flash) are not possible.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 13:50:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-Interrupt-not-reached-Cortex-M4-mqx-KSDK/m-p/710324#M43578</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-10-18T13:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog Interrupt not reached, Cortex M4, mqx KSDK</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-Interrupt-not-reached-Cortex-M4-mqx-KSDK/m-p/710325#M43579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for your response,&amp;nbsp;&lt;/P&gt;&lt;P&gt;will I get enough time to save the content of the last stack frame somewhere inside a external RAM? or I would run of time time!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Roosbeh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 15:59:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-Interrupt-not-reached-Cortex-M4-mqx-KSDK/m-p/710325#M43579</guid>
      <dc:creator>_ZZ_</dc:creator>
      <dc:date>2017-10-18T15:59:02Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog Interrupt not reached, Cortex M4, mqx KSDK</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-Interrupt-not-reached-Cortex-M4-mqx-KSDK/m-p/710326#M43580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Roosbeh&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are (if I remember correctly) 256 clocks between the watchdog interrupt and the reset so it depends on your code and its efficiency.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If this is not adequate, or you prefer saving more data ot to Flash consider using a HW timer/watchdog combination as described in this topic:&amp;nbsp;&lt;A href="https://community.nxp.com/thread/462210"&gt;https://community.nxp.com/thread/462210&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Oct 2017 17:28:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-Interrupt-not-reached-Cortex-M4-mqx-KSDK/m-p/710326#M43580</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-10-18T17:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog Interrupt not reached, Cortex M4, mqx KSDK</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-Interrupt-not-reached-Cortex-M4-mqx-KSDK/m-p/710327#M43581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the method you mentioned in your post and proved the the watchdog interrupt is reached for sure. I think I should come up with some inline assembly to write the stack frame to the external RAM.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you, it was really helpful&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Oct 2017 08:51:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Watchdog-Interrupt-not-reached-Cortex-M4-mqx-KSDK/m-p/710327#M43581</guid>
      <dc:creator>_ZZ_</dc:creator>
      <dc:date>2017-10-19T08:51:27Z</dc:date>
    </item>
  </channel>
</rss>

