<?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 How to install a timer interrupt in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-install-a-timer-interrupt/m-p/324360#M10329</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was using timer interrupt with PEx, but when I tried to install an isr manually it doesn't work.&lt;/P&gt;&lt;P&gt;That's my code:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;void tpm1_interr(void *user_isr_ptr) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bit2_NegVal(); //Output led &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM1_SC |= 0x10000000; //Clears TOF flag by writing a logical '1' }&amp;nbsp;&amp;nbsp; void Task1_task(uint32_t task_init_data) //Main task { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _int_install_isr(LDD_ivIndex_INT_TPM1, tpm1_interr, NULL); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM1_SC = 0xF; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM1_CNT = 0x2; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM1_MOD = 0x0000ffff; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM1_C0SC = 0x00000050; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM1_C0V = 0x0000ffff; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(;;) &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; _time_delay_ticks(300); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to play the program the debugger goes at this unhandled exception isr:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;PE_ISR(Cpu_Interrupt) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* This code can be changed using the CPU component property "Build Options / Unhandled int code" */ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PE_DEBUGHALT(); }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why this is happening? My isr_install is wrong?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338768" rel="nofollow noopener noreferrer" target="_blank"&gt;full-code-(isr-install).zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Jul 2014 19:22:22 GMT</pubDate>
    <dc:creator>wendersonolivei</dc:creator>
    <dc:date>2014-07-23T19:22:22Z</dc:date>
    <item>
      <title>How to install a timer interrupt</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-install-a-timer-interrupt/m-p/324360#M10329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was using timer interrupt with PEx, but when I tried to install an isr manually it doesn't work.&lt;/P&gt;&lt;P&gt;That's my code:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;void tpm1_interr(void *user_isr_ptr) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bit2_NegVal(); //Output led &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM1_SC |= 0x10000000; //Clears TOF flag by writing a logical '1' }&amp;nbsp;&amp;nbsp; void Task1_task(uint32_t task_init_data) //Main task { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _int_install_isr(LDD_ivIndex_INT_TPM1, tpm1_interr, NULL); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM1_SC = 0xF; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM1_CNT = 0x2; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM1_MOD = 0x0000ffff; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM1_C0SC = 0x00000050; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM1_C0V = 0x0000ffff; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(;;) &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; _time_delay_ticks(300); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try to play the program the debugger goes at this unhandled exception isr:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="c++" name="code"&gt;PE_ISR(Cpu_Interrupt) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* This code can be changed using the CPU component property "Build Options / Unhandled int code" */ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PE_DEBUGHALT(); }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why this is happening? My isr_install is wrong?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338768" rel="nofollow noopener noreferrer" target="_blank"&gt;full-code-(isr-install).zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jul 2014 19:22:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-install-a-timer-interrupt/m-p/324360#M10329</guid>
      <dc:creator>wendersonolivei</dc:creator>
      <dc:date>2014-07-23T19:22:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to install a timer interrupt</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-install-a-timer-interrupt/m-p/324361#M10330</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the vector number (in your code is LDD_ivIndex_INT_TPM1) is not right&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 12:21:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-install-a-timer-interrupt/m-p/324361#M10330</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2014-07-24T12:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to install a timer interrupt</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-install-a-timer-interrupt/m-p/324362#M10331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached an example to install interrupt handler, for your reference. You can set break point in Task1_task, at the last line, you can get the result, isr_ptr-&amp;gt;TICK_COUNT is 200. &lt;/P&gt;&lt;P&gt;This task installs a new ISR to replace the timer ISR.,&amp;nbsp;&amp;nbsp; It then waits for some time, finally printing out the&amp;nbsp;&amp;nbsp;&amp;nbsp; number of times the ISR ran.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Daniel&lt;/P&gt;&lt;P&gt;&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, 24 Jul 2014 13:04:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-install-a-timer-interrupt/m-p/324362#M10331</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2014-07-24T13:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to install a timer interrupt</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-install-a-timer-interrupt/m-p/324363#M10332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to make a code, like as your example, but it stills doesn't works.&lt;/P&gt;&lt;P&gt;I attached my code, can you give a little look on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jul 2014 13:12:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-install-a-timer-interrupt/m-p/324363#M10332</guid>
      <dc:creator>wendersonolivei</dc:creator>
      <dc:date>2014-07-24T13:12:57Z</dc:date>
    </item>
    <item>
      <title>Re: Re: How to install a timer interrupt</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-install-a-timer-interrupt/m-p/324364#M10333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry I forgot to add opensda debug support in this project.&amp;nbsp; now I attached the updated version.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 01:56:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-install-a-timer-interrupt/m-p/324364#M10333</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2014-07-25T01:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to install a timer interrupt</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-install-a-timer-interrupt/m-p/324365#M10334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now i can run this on my FRDM, it's working fine!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot, have a nice day.&lt;/P&gt;&lt;P&gt;Wenderson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jul 2014 11:38:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-to-install-a-timer-interrupt/m-p/324365#M10334</guid>
      <dc:creator>wendersonolivei</dc:creator>
      <dc:date>2014-07-25T11:38:37Z</dc:date>
    </item>
  </channel>
</rss>

