<?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>MCUXpresso SDK中的主题 Watchdog interrupt not handled</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/Watchdog-interrupt-not-handled/m-p/796877#M954</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using MCUXpresso 10.2.1, with a custom board based on K66 device.&lt;/P&gt;&lt;P&gt;I've enabled the watchdog interrupt that writes a value to an external battery backed up memory, but it doesn't seem to be executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the wdog init code I've used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WDOG_GetDefaultConfig( &amp;amp;WdogConfig );&lt;BR /&gt; WdogConfig.clockSource = kWDOG_AlternateClockSource;&lt;BR /&gt; WdogConfig.prescaler = kWDOG_ClockPrescalerDivide5;&lt;BR /&gt; WdogConfig.workMode.enableStop = true;&lt;BR /&gt; WdogConfig.enableInterrupt = true;&lt;BR /&gt; WdogConfig.timeoutValue = WDOG_TIMEOUT_VAL( CLOCK_GetFreq( kCLOCK_BusClk ), WdogConfig.prescaler );&lt;BR /&gt; WDOG_Init( WDOG, &amp;amp;WdogConfig );&lt;BR /&gt; NVIC_SetPriority( WDOG_EWM_IRQn, WDOG_INTPRIO );&lt;BR /&gt; EnableIRQ( WDOG_EWM_IRQn );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the interrupt function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void WDOG_EWM_IRQHandler( void )&lt;BR /&gt;{&lt;BR /&gt; *(( unsigned long *)0x90000000 ) = 0x1234ABCD;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I stop servicing the watchdog, the CPU resets, but the interrupt is not serviced.&lt;/P&gt;&lt;P&gt;The interrupt priority is higher than every other one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I need other code for the interrupt to be executed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Biafra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 03 Nov 2018 01:07:48 GMT</pubDate>
    <dc:creator>biafra</dc:creator>
    <dc:date>2018-11-03T01:07:48Z</dc:date>
    <item>
      <title>Watchdog interrupt not handled</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Watchdog-interrupt-not-handled/m-p/796877#M954</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using MCUXpresso 10.2.1, with a custom board based on K66 device.&lt;/P&gt;&lt;P&gt;I've enabled the watchdog interrupt that writes a value to an external battery backed up memory, but it doesn't seem to be executed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the wdog init code I've used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WDOG_GetDefaultConfig( &amp;amp;WdogConfig );&lt;BR /&gt; WdogConfig.clockSource = kWDOG_AlternateClockSource;&lt;BR /&gt; WdogConfig.prescaler = kWDOG_ClockPrescalerDivide5;&lt;BR /&gt; WdogConfig.workMode.enableStop = true;&lt;BR /&gt; WdogConfig.enableInterrupt = true;&lt;BR /&gt; WdogConfig.timeoutValue = WDOG_TIMEOUT_VAL( CLOCK_GetFreq( kCLOCK_BusClk ), WdogConfig.prescaler );&lt;BR /&gt; WDOG_Init( WDOG, &amp;amp;WdogConfig );&lt;BR /&gt; NVIC_SetPriority( WDOG_EWM_IRQn, WDOG_INTPRIO );&lt;BR /&gt; EnableIRQ( WDOG_EWM_IRQn );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the interrupt function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;void WDOG_EWM_IRQHandler( void )&lt;BR /&gt;{&lt;BR /&gt; *(( unsigned long *)0x90000000 ) = 0x1234ABCD;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I stop servicing the watchdog, the CPU resets, but the interrupt is not serviced.&lt;/P&gt;&lt;P&gt;The interrupt priority is higher than every other one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I need other code for the interrupt to be executed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Biafra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Nov 2018 01:07:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Watchdog-interrupt-not-handled/m-p/796877#M954</guid>
      <dc:creator>biafra</dc:creator>
      <dc:date>2018-11-03T01:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog interrupt not handled</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Watchdog-interrupt-not-handled/m-p/796878#M955</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="276603" data-username="biafra" href="https://community.nxp.com/people/biafra"&gt;biafra&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Breakpoint in WDOG_EWM_IRQHandler may not let you know whether the watchdog interrupt happens or not.&lt;BR /&gt;Please refer the answer in: &lt;A _jive_internal="true" href="https://community.nxp.com/thread/462439"&gt;Watchdog Interrupt not reached, Cortex M4, mqx KSDK&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 09:14:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Watchdog-interrupt-not-handled/m-p/796878#M955</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2018-11-06T09:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog interrupt not handled</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Watchdog-interrupt-not-handled/m-p/796879#M956</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/novice"&gt;novice&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your answer.&lt;/P&gt;&lt;P&gt;I've not set a breakpoint in&amp;nbsp;the interrupt routine:&amp;nbsp;I've said that interrupt is not serviced because I don't see the&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;0x1234ABCD value at the&amp;nbsp;&lt;SPAN&gt;0x90000000 address.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;The&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;0x90000000 address is located in no_init area, so after reset it should be&amp;nbsp;unchanged. In the same area there is a RAM disk that is fully operational after reset.&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Is the code above correct&amp;nbsp;for the interrupt to be executed?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Many thanks&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Biafra&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2018 09:48:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Watchdog-interrupt-not-handled/m-p/796879#M956</guid>
      <dc:creator>biafra</dc:creator>
      <dc:date>2018-11-06T09:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog interrupt not handled</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Watchdog-interrupt-not-handled/m-p/796880#M957</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry for my last reply!&lt;BR /&gt;I have modify the wdog example in SDK_2.4.1_FRDM-K66F, so that we can see if the value in RAM was modified by &lt;BR /&gt;WDOG_EWM_IRQHandler.(...\SDK_2.4.1_FRDM-K66F\boards\frdmk66f\driver_examples\wdog)&lt;BR /&gt;I have attached the test video and wdog.c file.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="wdog.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/63330iD402CEDE2DE2E06B/image-size/large?v=v2&amp;amp;px=999" role="button" title="wdog.png" alt="wdog.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Robin&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2018 07:58:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Watchdog-interrupt-not-handled/m-p/796880#M957</guid>
      <dc:creator>Robin_Shen</dc:creator>
      <dc:date>2018-11-08T07:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Watchdog interrupt not handled</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Watchdog-interrupt-not-handled/m-p/796881#M958</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/novice"&gt;novice&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've found the reason for not writing the value: the cache was enabled; after it has been disabled, I can see the correct value after the reset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Biafra&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Nov 2018 10:21:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Watchdog-interrupt-not-handled/m-p/796881#M958</guid>
      <dc:creator>biafra</dc:creator>
      <dc:date>2018-11-08T10:21:18Z</dc:date>
    </item>
  </channel>
</rss>

