<?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>Wireless MCU中的主题 Interrupt Timer</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/Interrupt-Timer/m-p/721823#M3835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey support,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to implement a timer interrupt to my Thread application. Would LPTMR be the easiest to use to accomplish the following? Or would something else be easier?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;An event from one R41Z triggers a function to send a High signal to another R41Z with a motor wired to it. I'd like for this High signal to elapse about 30-35 seconds. After the time has elapsed it would then send the&amp;nbsp;Low signal function to stop the motor.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any pointers or available references would be helpful. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Apr 2018 20:27:02 GMT</pubDate>
    <dc:creator>johanandrade</dc:creator>
    <dc:date>2018-04-10T20:27:02Z</dc:date>
    <item>
      <title>Interrupt Timer</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Interrupt-Timer/m-p/721823#M3835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey support,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to implement a timer interrupt to my Thread application. Would LPTMR be the easiest to use to accomplish the following? Or would something else be easier?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;An event from one R41Z triggers a function to send a High signal to another R41Z with a motor wired to it. I'd like for this High signal to elapse about 30-35 seconds. After the time has elapsed it would then send the&amp;nbsp;Low signal function to stop the motor.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any pointers or available references would be helpful. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Apr 2018 20:27:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Interrupt-Timer/m-p/721823#M3835</guid>
      <dc:creator>johanandrade</dc:creator>
      <dc:date>2018-04-10T20:27:02Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt Timer</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Interrupt-Timer/m-p/721824#M3836</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/johanandrade"&gt;johanandrade&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The easiest way is to use TimersManager module (see TimersManager.c, TimersMnager.h) files.&lt;/P&gt;&lt;P&gt;As API the following functions should be used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;TMR_AllocateTimer - to allocate the timer;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;TMR_StartSingleShotTimer - to start the timer;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;-&amp;nbsp;TMR_FreeTimer - to free the timer;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An example of usage is usually presented in each demo application. Please search in your project after&amp;nbsp; "mAppTimerId" or "tmrStartApp".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ovidiu&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Apr 2018 06:48:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Interrupt-Timer/m-p/721824#M3836</guid>
      <dc:creator>ovidiu_usturoi</dc:creator>
      <dc:date>2018-04-16T06:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupt Timer</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Interrupt-Timer/m-p/721825#M3837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ovi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After analyzing the example, here's what I was able to get working. I tested it using an LED turning on for 10 seconds before turning off. Posting code for reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*==================================================================================================&lt;BR /&gt;Private macros&lt;BR /&gt;==================================================================================================*/&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;#define gLedTimeout_c 10000 /* milliseconds */&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/*==================================================================================================&lt;BR /&gt;Public global variables declarations&lt;BR /&gt;==================================================================================================*/&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;/* Led timer Id */&lt;BR /&gt;tmrTimerID_t mLedTimerId = gTmrInvalidTimerID_c;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;/*==================================================================================================&lt;BR /&gt;Public functions&lt;BR /&gt;==================================================================================================*/&lt;BR /&gt;.&lt;BR /&gt;.&lt;BR /&gt;.&lt;/P&gt;&lt;P&gt;void APP_LightShellEventReceived(void)&lt;BR /&gt;{&lt;BR /&gt; if(isLedOn)&lt;BR /&gt; {&lt;BR /&gt; (void)NWKU_SendMsg(APP_SendExtLedOff, NULL, mpAppThreadMsgQueue);&lt;BR /&gt; isLedOn = FALSE;&lt;BR /&gt; }&lt;BR /&gt; else{&lt;BR /&gt; (void)NWKU_SendMsg(APP_SendExtLedOn, NULL, mpAppThreadMsgQueue);&lt;BR /&gt; isLedOn = TRUE;&lt;/P&gt;&lt;P&gt;if(mLedTimerId == gTmrInvalidTimerID_c)&lt;BR /&gt; {&lt;BR /&gt; mLedTimerId = TMR_AllocateTimer();&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;/* Validate Led timer Id */&lt;BR /&gt; if(mLedTimerId != gTmrInvalidTimerID_c)&lt;BR /&gt; {&lt;BR /&gt; /* Start the led timer. Wait gLedTimeout_c&lt;BR /&gt; to start countdown before turning off led. */&lt;BR /&gt; TMR_StartSingleShotTimer(mLedTimerId, gLedTimeout_c, APP_SendExtLedOff, NULL);&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2018 21:08:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Interrupt-Timer/m-p/721825#M3837</guid>
      <dc:creator>johanandrade</dc:creator>
      <dc:date>2018-04-17T21:08:01Z</dc:date>
    </item>
  </channel>
</rss>

